diff --git a/CREDITS b/CREDITS index c988d42..05e2246 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,8 @@ #!/bin/cat +Subbarao & Prasanthi Punnamaraju +Asked how to move emails from InBox to a sub-folder. + Sven Havemann Moved from Braunschweig to Graz and asked how to move Braunschweig mail sorted into diff --git a/ChangeLog b/ChangeLog index 2114dce..cc187fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,21 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.158 +head: 1.159 branch: locks: strict access list: symbolic names: keyword substitution: kv -total revisions: 158; selected revisions: 158 +total revisions: 159; selected revisions: 159 description: ---------------------------- +revision 1.159 +date: 2006/03/11 13:00:52; author: gilles; state: Exp; lines: +11 -8 +Added failure story dkimap +Fixed bug when both --minage and --maxage are used. +Changed message date selection : date sent instead of internal date. +---------------------------- revision 1.158 date: 2006/03/02 06:28:30; author: gilles; state: Exp; lines: +38 -29 Made acls_sync() to_folder_name() diff --git a/FAQ b/FAQ index 4885ac2..8334e09 100644 --- a/FAQ +++ b/FAQ @@ -86,6 +86,51 @@ R. Examples: 2) To sync a complete account in a subfolder called FOO: --regextrans2 's/^INBOX(.*)/INBOX.FOO$1/' +======================================================================= +Q. I would like to move emails from InBox to a sub-folder +called , say "2005-InBox" based on the date (Like all emails +received in the Year 2005 should be moved to the folder +called "2005-InBox"). + +R. 2 ways : + +a) Manually: +------------ + +1) You create a folder INBOX.2005-INBOX +2) Mostly every email software allow sorting by date. +In inbox, you select from 1 january to 31 december +messages with the shift key. +3) Cut/paste in INBOX.2005-INBOX + +b) With imapsync: +----------------- + +you have to calculate the day of year (and +add 365). For example, running it today, Sat Mar 11 +13:06:01 CET 2006: + +imapsync ... +--host1 imap.truc.org --host2 imap.trac.org \ +--user1 foo --user2 foo \ +... +--maxage 435 --minage 70 \ +--regextrans2 's/^INBOX$/INBOX.2005-INBOX/' \ +--folder INBOX + + +To know the day of year: + +$ date +Sat Mar 11 13:06:01 CET 2006 + +$ date +%j +070 + +Also, you must take imapsync 1.159 at least since I tested +what I just wrote above and found 2 bugs about --mindate +--maxdate options behavior. + ======================================================================= Q. I'm migrating from WU to Cyrus, and the mail folders are under /home/user/mail but the tool copies everything in diff --git a/README b/README index ff6ae28..aec23cd 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME imapsync - IMAP synchronization, copy or migration tool. Synchronize mailboxes between two imap servers. Good at IMAP migration. - $Revision: 1.158 $ + $Revision: 1.159 $ INSTALL imapsync works fine under any Unix OS. @@ -178,7 +178,8 @@ IMAP SERVERS - MailEnable 1.54 (Proprietary) http://www.mailenable.com/ - DBMail 2.0.7 (GPL). But DBMail 1.2.1 works. Patient and confident testers are welcome. - + - dkimap4 2.39 + Success stories reported with the following imap servers (softwares names are in alphabetic order) : @@ -274,5 +275,5 @@ AUTHOR teaching free open and gratis softwares. Don't hesitate to pay him for that services. - $Id: imapsync,v 1.158 2006/03/02 06:28:30 gilles Exp $ + $Id: imapsync,v 1.159 2006/03/11 13:00:52 gilles Exp $ diff --git a/VERSION b/VERSION index 3c5303c..f0182d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.158 +1.159 diff --git a/freshmeat_submition2 b/freshmeat_submition2 index ac497cb..0099b0b 100644 --- a/freshmeat_submition2 +++ b/freshmeat_submition2 @@ -1,7 +1,8 @@ Project: imapsync -Version: 1.156 -Release-Focus: Major feature enhancements -Hide: N +Version: 1.158 +Release-Focus: Code cleanup +Hide: Y Home-Page-URL: http://www.linux-france.org/prj/imapsync/ Gzipped-Tar-URL: http://www.linux-france.org/prj/imapsync/dist/ +Code cleanup. diff --git a/imapsync b/imapsync index bfc7e03..a41e889 100755 --- a/imapsync +++ b/imapsync @@ -6,7 +6,7 @@ imapsync - IMAP synchronization, copy or migration tool. Synchronize mailboxes between two imap servers. Good at IMAP migration. -$Revision: 1.158 $ +$Revision: 1.159 $ =head1 INSTALL @@ -205,7 +205,8 @@ Failure stories reported with the following imap servers : - MailEnable 1.54 (Proprietary) http://www.mailenable.com/ - DBMail 2.0.7 (GPL). But DBMail 1.2.1 works. Patient and confident testers are welcome. - + - dkimap4 2.39 + Success stories reported with the following imap servers (softwares names are in alphabetic order) : @@ -322,7 +323,7 @@ Gilles LAMIRAL earn his living writing, installing, configuring and teaching free open and gratis softwares. Don't hesitate to pay him for that services. -$Id: imapsync,v 1.158 2006/03/02 06:28:30 gilles Exp $ +$Id: imapsync,v 1.159 2006/03/11 13:00:52 gilles Exp $ =cut @@ -370,7 +371,7 @@ my( use vars qw ($opt_G); # missing code for this will be option. -$rcs = ' $Id: imapsync,v 1.158 2006/03/02 06:28:30 gilles Exp $ '; +$rcs = ' $Id: imapsync,v 1.159 2006/03/11 13:00:52 gilles Exp $ '; $rcs =~ m/,v (\d+\.\d+)/; $VERSION = ($1) ? $1 : "UNKNOWN"; @@ -407,8 +408,8 @@ $error=0; my $banner = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.158 $ ', - '$Date: 2006/03/02 06:28:30 $ ', + '$Revision: 1.159 $ ', + '$Date: 2006/03/11 13:00:52 $ ', "\n", "Mail::IMAPClient version used here is ", $VERSION_IMAPClient,"\n" @@ -1084,16 +1085,18 @@ sub select_msgs { return(@msgs); } if (defined($maxage)) { - @max = $imap->since(time - 86400 * $maxage); + @max = $imap->sentsince(time - 86400 * $maxage); } if (defined($minage)) { - @min = $imap->before(time - 86400 * $minage); + @min = $imap->sentbefore(time - 86400 * $minage); } SWITCH: { unless(defined($minage)) {@msgs = @max; last SWITCH}; unless(defined($maxage)) {@msgs = @min; last SWITCH}; my (%union, %inter); foreach my $m (@min, @max) {$union{$m}++ && $inter{$m}++} + @inter = keys(%inter); + @union = keys(%union); # normal case if ($minage <= $maxage) {@msgs = @inter; last SWITCH}; # just exclude messages between diff --git a/memo b/memo index 41cb5d8..a876ae4 100644 --- a/memo +++ b/memo @@ -44,11 +44,12 @@ else cat > $NEWS_FILE_FM << EOF Project: imapsync Version: $VERSION -Release-Focus: Minor feature enhancements +Release-Focus: Major bugfixe Hide: Y Home-Page-URL: http://www.linux-france.org/prj/imapsync/ Gzipped-Tar-URL: http://www.linux-france.org/prj/imapsync/dist/ +Code cleanup. EOF freshmeat-submit < $NEWS_FILE_FM fi diff --git a/zzz b/zzz new file mode 100644 index 0000000..62cf6b3 --- /dev/null +++ b/zzz @@ -0,0 +1,31 @@ +$RCSfile: imapsync,v $ $Revision: 1.158 $ $Date: 2006/03/02 06:28:30 $ +Mail::IMAPClient version used here is 2.2.9 +From imap server [loul] port [143] user [tata] +To imap server [plume] port [143] user [tata] +Server [loul] has NOT capability CRAM-MD5 +Server [plume] has NOT capability CRAM-MD5 +From software : 2 CAPABILITY +To software : 2 CAPABILITY +From capability : QUOTA X-NETSCAPE NAMESPACE X-NON-HIERARCHICAL-RENAME ACL UNSELECT LITERAL+ NO_ATOMIC_RENAME UIDPLUS IMAP4 IMAP4REV1 +To capability : ACL AUTH=LOGIN NAMESPACE IMAP4REV1 IMAP4 +From separator and prefix : [.][INBOX.] +To separator and prefix : [/][] +++++ Calculating sizes ++++ +From Folder [INBOX] Size: 5703203 Messages: 1432 +Total size: 5703203 +Total messages: 1432 +Time : 0 s +++++ Calculating sizes ++++ +To Folder [INBOX] Size: 17108791 Messages: 4294 +Total size: 17108791 +Total messages: 4294 +Time : 0 s +From folders : [INBOX] +To folders : [INBOX] +From subscribed folders : [INBOX.yop.yap] +From Folder [INBOX] +To Folder [INBOX] +++++ From [INBOX] Parse 1 ++++ +++++ To [INBOX] Parse 1 ++++ +++++ Verifying [INBOX] -> [INBOX] ++++ +Time : 11 s