diff --git a/README b/README index 510ca35..7cea676 100644 --- a/README +++ b/README @@ -314,9 +314,13 @@ OPTIONS X is not also Gmail. Activated with --gmail1 unless --noskipcrossduplicates + --skipallmailduplicates : Used when host1 is GMail. Skips messages in + [Gmail]/All Mail that are also in some other folder. + --debugcrossduplicates : Prints which messages (UIDs) are skipped with --skipcrossduplicates (and in what other folders - they are). + they are). Also prints messages skipped by + --skipallmailduplicates. --pipemess cmd : Apply this cmd command to each message content before the copy. diff --git a/README.md b/README.md index 8a6fe04..56a71ee 100644 --- a/README.md +++ b/README.md @@ -331,9 +331,13 @@ OPTIONS X is not also Gmail. Activated with --gmail1 unless --noskipcrossduplicates + --skipallmailduplicates : Used when host1 is GMail. Skips messages in + [Gmail]/All Mail that are also in some other folder. + --debugcrossduplicates : Prints which messages (UIDs) are skipped with --skipcrossduplicates (and in what other folders - they are). + they are). Also prints messages skipped by + --skipallmailduplicates. --pipemess cmd : Apply this cmd command to each message content before the copy. diff --git a/W/imapsync.1 b/W/imapsync.1 index 383fa01..fcf363b 100644 --- a/W/imapsync.1 +++ b/W/imapsync.1 @@ -470,9 +470,13 @@ and user1 user2 are the \-\-user1 \-\-user2 values. \& X is not also Gmail. \& Activated with \-\-gmail1 unless \-\-noskipcrossduplicates \& +\& \-\-skipallmailduplicates : Used when host1 is GMail. Skips messages in +\& [Gmail]/All Mail that are also in some other folder. +\& \& \-\-debugcrossduplicates : Prints which messages (UIDs) are skipped with \& \-\-skipcrossduplicates (and in what other folders -\& they are). +\& they are). Also prints messages skipped by +\& \-\-skipallmailduplicates. \& \& \-\-pipemess cmd : Apply this cmd command to each message content \& before the copy. diff --git a/imapsync b/imapsync index eed26e9..29669e0 100755 --- a/imapsync +++ b/imapsync @@ -345,10 +345,14 @@ and user1 user2 are the --user1 --user2 values. in another folder, good from Gmail to X when X is not also Gmail. Activated with --gmail1 unless --noskipcrossduplicates + +--skipallmailduplicates : Used when host1 is GMail. Skips messages in + [Gmail]/All Mail that are also in some other folder. --debugcrossduplicates : Prints which messages (UIDs) are skipped with --skipcrossduplicates (and in what other folders - they are). + they are). Also prints messages skipped by + --skipallmailduplicates. --pipemess cmd : Apply this cmd command to each message content before the copy. @@ -1104,7 +1108,7 @@ my( $uidnext_default, $fixcolonbug, $create_folder_old, - $skipcrossduplicates, $debugcrossduplicates, + $skipcrossduplicates, $debugcrossduplicates, $skipallmailduplicates, $disarmreadreceipts, $mixfolders, $fetch_hash_set, @@ -2487,7 +2491,9 @@ FOLDER: foreach my $h1_fold ( @{ $sync->{h1_folders_wanted} } ) if ( ( not exists $h2_hash{ $m_id } ) and ( not ( exists $sync->{ h2_folders_of_md5 }->{ $m_id } ) - or not $skipcrossduplicates ) ) + or ( not $skipcrossduplicates + and ( not $skipallmailduplicates + or $h1_fold ne "[Gmail]/All Mail" ) ) ) ) { # copy my $h2_msg = copy_message( $sync, $h1_msg, $h1_fold, $h2_fold, $h1_fir_ref, $permanentflags2, $cache_dir ) ; @@ -16802,6 +16808,7 @@ sub get_options_cmd 'maxsleep=f' => \$mysync->{maxsleep}, 'skipcrossduplicates!' => \$skipcrossduplicates, 'debugcrossduplicates!' => \$debugcrossduplicates, + 'skipallmailduplicates!' => \$skipallmailduplicates, 'log!' => \$mysync->{log}, 'tail!' => \$mysync->{tail}, 'logfile=s' => \$mysync->{logfile},