.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "IMAPSYNC 1" .TH IMAPSYNC 1 "2007-10-29" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" imapsync \- IMAP synchronisation, sync, copy or migration tool. Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 32 different IMAP server softwares supported with success. .PP $Revision: 1.233 $ .SH "INSTALL" .IX Header "INSTALL" .Vb 2 \& imapsync works fine under any Unix OS with perl. \& imapsync works fine under Windows 2000 (at least) and ActiveState's 5.8 Perl .Ve .PP .Vb 2 \& imapsync is already available directly on the following distributions (at least): \& FreeBSD, Debian, Ubuntu, Gentoo, NetBSD, Darwin, Mandriva. .Ve .PP .Vb 2 \& Get imapsync at \& http://www.linux-france.org/prj/imapsync/dist/ .Ve .PP .Vb 3 \& You'll find a compressed tarball called imapsync-x.xx.tgz \& where x.xx is the version number. Untar the tarball where \& you want (on Unix): .Ve .PP .Vb 1 \& tar xzvf imapsync-x.xx.tgz .Ve .PP .Vb 3 \& Go into the directory imapsync-x.xx and read the INSTALL file. \& The INSTALL file is also at \& http://www.linux-france.org/prj/imapsync/INSTALL (for windows users) .Ve .PP .Vb 1 \& The freshmeat record is at http://freshmeat.net/projects/imapsync/ .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& imapsync [options] .Ve .PP To get a description of each option just run imapsync like this : .PP .Vb 2 \& imapsync --help \& imapsync .Ve .PP The option list : .PP .Vb 34 \& imapsync [--host1 server1] [--port1 ] \& [--user1 ] [--passfile1 ] \& [--host2 server2] [--port2 ] \& [--user2 ] [--passfile2 ] \& [--ssl1] [--ssl2] \& [--authmech1 ] [--authmech2 ] \& [--noauthmd5] \& [--folder --folder ...] \& [--folderrec --folderrec ...] \& [--include ] [--exclude ] \& [--prefix2 ] [--prefix1 ] \& [--regextrans2 --regextrans2 ...] \& [--sep1 ] \& [--sep2 ] \& [--justfolders] [--justfoldersizes] [--justconnect] \& [--syncinternaldates] \& [--buffersize ] \& [--syncacls] \& [--regexmess ] [--regexmess ] \& [--maxsize ] \& [--maxage ] \& [--minage ] \& [--skipheader ] \& [--useheader ] [--useheader ] \& [--skipsize] \& [--delete] [--delete2] \& [--expunge] [--expunge1] [--expunge2] \& [--subscribed] [--subscribe] \& [--nofoldersizes] \& [--dry] \& [--debug] [--debugimap] \& [--timeout ] [--fast] \& [--split1] [--split2] \& [--version] [--help] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The command imapsync is a tool allowing incremental and recursive imap transfer from one mailbox to another. .PP By default all folders are transfered, recursively. .PP We sometimes need to transfer mailboxes from one imap server to another. This is called migration. .PP imapsync is the adequate tool because it reduces the amount of data transferred by not transferring a given message if it is already on both sides. Same headers, same message size and the transfer is done only once. All flags are preserved, unread will stay unread, read will stay read, deleted will stay deleted. You can stop the transfer at any time and restart it later, imapsync is adapted to a bad connection. imapsync is \s-1CPU\s0 hungry so nice and renice commands can be a good help. imapsync can be memory hungry too, especially with large messages. .PP You can decide to delete the messages from the source mailbox after a successful transfer (it is a good feature when migrating). In that case, use the \-\-delete \-\-expunge1 options. .PP You can also just synchronize a mailbox A from another mailbox B in case you just want to keep a \*(L"live\*(R" copy of B in A. .SH "OPTIONS" .IX Header "OPTIONS" To get a description of each option just invoke: .PP imapsync \-\-help .SH "HISTORY" .IX Header "HISTORY" I wrote imapsync because an enterprise (basystemes) paid me to install a new imap server without loosing huge old mailboxes located on a far away remote imap server accessible by a low bandwith link. The tool imapcp (written in python) could not help me because I had to verify every mailbox was well transferred and delete it after a good transfer. imapsync started its life being a copy_folder.pl patch. The tool copy_folder.pl comes from the Mail\-IMAPClient\-2.1.3 perl module tarball source (in the examples/ directory of the tarball). .SH "EXAMPLE" .IX Header "EXAMPLE" While working on imapsync parameters please run imapsync in dry mode (no modification induced) with the \-\-dry option. Nothing bad can be done this way. .PP To synchronize the imap account \*(L"buddy\*(R" on host \&\*(L"imap.src.fr\*(R" to the imap account \*(L"max\*(R" on host \&\*(L"imap.dest.fr\*(R" (the passwords are located in two files \&\*(L"/etc/secret1\*(R" for \*(L"buddy\*(R", \*(L"/etc/secret2\*(R" for \*(L"max\*(R") : .PP .Vb 2 \& imapsync --host1 imap.src.fr --user1 buddy --passfile1 /etc/secret1 \e \& --host2 imap.dest.fr --user2 max --passfile2 /etc/secret2 .Ve .PP Then, you will have max's mailbox updated from buddy's mailbox. .SH "SECURITY" .IX Header "SECURITY" You can use \-\-password1 instead of \-\-passfile1 to give the password but it is dangerous because any user on your host can see the password by using the 'ps auxwwww' command. Using a variable (like \f(CW$PASSWORD1\fR) is also dangerous because of the 'ps auxwwwwe' command. So, saving the password in a well protected file (600 or rw\-\-\-\-\-\-\-) is the best solution. .PP imasync is not totally protected against sniffers on the network since passwords may be transferred in plain text in case \s-1CRAM\-MD5\s0 is not supported by your imap servers. Use \&\-\-ssl1 and \-\-ssl2 to enable encryption on host1 and host2. .PP You may authenticate as one user (typically an admin user), but be authorized as someone else, which means you don't need to know every user's personal password. Specify \&\-\-authuser1 \*(L"adminuser\*(R" to enable this on host1. In this case, \-\-authmech1 \s-1PLAIN\s0 will be used by default since it is the only way to go for now. So don't use \-\-authmech1 \s-1SOMETHING\s0 with \-\-authuser1 \*(L"adminuser\*(R", it will not work. Same behavior with the \-\-authuser2 option. .SH "EXIT STATUS" .IX Header "EXIT STATUS" imapsync will exit with a 0 status (return code) if everything went good. Otherwise, it exits with a non-zero status. .PP So if you have a buggy internet connection, you can use this loop in a Bourne shell: .PP .Vb 3 \& while ! imapsync ...; do \& echo imapsync not complete \& done .Ve .SH "AUTHOR" .IX Header "AUTHOR" Gilles \s-1LAMIRAL\s0 .PP Feedback good or bad is always welcome. .PP The newsgroup comp.mail.imap is a good place to talk about imapsync. I read it when imapsync is concerned. .PP Gilles \s-1LAMIRAL\s0 earn his living writing, installing, configuring and teaching free open and gratis softwares. Do not hesitate to pay him for that services. .SH "LICENSE" .IX Header "LICENSE" imapsync is free, gratis and open source software cover by the \s-1GNU\s0 General Public License. See the \s-1GPL\s0 file included in the distribution or the web site http://www.gnu.org/licenses/licenses.html .SH "BUGS" .IX Header "BUGS" No known serious bug. Report any bug to the author. Before reporting bugs, read the \s-1FAQ\s0, this \s-1README\s0 and the \&\s-1TODO\s0 files. .PP In your report, please include: .PP .Vb 5 \& - imapsync version. \& - IMAPClient.pm version. \& - perl version. \& - operating system running imapsync. \& - imap servers softwares on both side and their version. .Ve .PP .Vb 1 \& Those values can be found with the command line .Ve .PP .Vb 1 \& imapsync --host1 imap.host1.net --host2 imap.host2.org --justconnect .Ve .PP .Vb 1 \& And also, if it can help : .Ve .PP .Vb 6 \& - operating systems on both sides and the third side in case \& you run imapsync on a foreign host from the both. \& - imapsync with all the options you use, the full command line \& you use (except the passwords of course). This can be found \& at the beginning of the output. \& - output given with --debug --debugimap near the failure point. .Ve .SH "IMAP SERVERS" .IX Header "IMAP SERVERS" Failure stories reported with the following 4 imap servers : .PP .Vb 5 \& - MailEnable 1.54 (Proprietary) http://www.mailenable.com/ \& - DBMail 0.9, 2.0.7 (GPL). But DBMail 1.2.1 works. \& Patient and confident testers are welcome. \& - dkimap4 2.39 \& - Imail 7.04 (maybe). .Ve .PP Success stories reported with the following 34 imap servers (softwares names are in alphabetic order) : .PP .Vb 46 \& - BincImap 1.2.3 (GPL) (http://www.bincimap.org/) \& - CommuniGatePro server (Redhat 8.0) \& - Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1, 3.0.8 (GPL) \& (http://www.courier-mta.org/) \& - Critical Path (7.0.020) \& - Cyrus IMAP 1.5, 1.6, 2.1, 2.1.15, 2.1.16, 2.1.18 \& 2.2.1, 2.2.2-BETA, 2.2.10, 2.2.12, \& v2.2.3-Invoca-RPM-2.2.3-8, \& 2.3-alpha (OSI Approved), \& v2.2.12-Invoca-RPM-2.2.12-3.RHEL4.1, \& 2.2.13, \& v2.3.1-Invoca-RPM-2.3.1-2.7.fc5, \& (http://asg.web.cmu.edu/cyrus/) \& - David Tobit V8 (proprietary Message system). \& - DBMail 1.2.1, 2.0.4, 2.0.9, 2.2rc1 (GPL) (http://www.dbmail.org/). \& 2.0.7 seems buggy. \& - Deerfield VisNetic MailServer 5.8.6 [from] \& - Dovecot 0.99.10.4, 0.99.14, 0.99.14-8.fc4, 1.0-0.beta2.7, \& 1.0.0 [dest] (LGPL) (http://www.dovecot.org/) \& - Domino (Notes) 6.5, 5.0.6, 5.0.7, 7.0.2, 6.0.2CF1, 7.0.1 [from] \& - Eudora WorldMail v2 \& - GMX IMAP4 StreamProxy. \& - Groupwise IMAP (Novell) 6.x and 7.0. Buggy so see the FAQ. \& - iPlanet Messaging server 4.15, 5.1, 5.2 \& - IMail 7.15 (Ipswitch/Win2003), 8.12 \& - MDaemon 7.0.1, 8.1, 9.5.4 (Windows server 2003 R2 platform) \& - Mercury 4.1 (Windows server 2000 platform) \& - Microsoft Exchange Server 5.5, 6.5.7638.1 [dest] \& - Netscape Mail Server 3.6 (Wintel !) \& - Netscape Messaging Server 4.15 Patch 7 \& - OpenMail IMAP server B.07.00.k0 (Samsung Contact ?) \& - OpenWave \& - Qualcomm Worldmail (NT) \& - Rockliffe Mailsite 5.3.11 \& - Samsung Contact IMAP server 8.5.0 \& - Scalix v10.1, 10.0.1.3, 11.0.0.431 \& - SmarterMail \& - SunONE Messaging server 5.2, 6.0 (SUN JES - Java Enterprise System) \& - Sun Java System Messaging Server 6.2-2.05 \& - Surgemail 3.6f5-5 \& - UW-imap servers (imap-2000b) rijkkramer IMAP4rev1 2000.287 \& (RedHat uses UW like 2003.338rh), v12.264 Solaris 5.7 (OSI Approved) \& (http://www.washington.edu/imap/) \& - UW - QMail v2.1 \& - Imap part of TCP/IP suite of VMS 7.3.2 \& - Zimbra-IMAP 3.0.1 GA 160, 3.1.0 Build 279, 4.0.5, 4.5.2, 5.5. .Ve .PP Please report to the author any success or bad story with imapsync and don't forget to mention the \s-1IMAP\s0 server software names and version on both sides. This will help future users. To help the author maintaining this section report the two lines at the begining of the output if they are useful to know the softwares. Example: .PP .Vb 2 \& From software :* OK louloutte Cyrus IMAP4 v1.5.19 server ready \& To software :* OK Courier-IMAP ready .Ve .PP You can use option \-\-justconnect to get those lines. Example : .PP .Vb 1 \& imapsync --host1 imap.troc.org --host2 imap.trac.org --justconnect .Ve .PP Please rate imapsync at http://freshmeat.net/projects/imapsync/ or better give the author a book, he likes books: http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/ (or its paypal account gilles.lamiral@laposte.net) .SH "HUGE MIGRATION" .IX Header "HUGE MIGRATION" Have a special attention on options \&\-\-subscribed \&\-\-subscribe \&\-\-delete \&\-\-delete2 \&\-\-expunge \&\-\-expunge1 \&\-\-expunge2 \&\-\-maxage \&\-\-minage \&\-\-maxsize \&\-\-useheader .PP If you have many mailboxes to migrate think about a little shell program. Write a file called file.csv (for example) containing users and passwords. The separator used in this example is ';' .PP The file.csv file content is : .PP user0001;password0001;user0002;password0002 user0011;password0011;user0012;password0012 \&... .PP And the shell program is just : .PP .Vb 3 \& { while IFS=';' read u1 p1 u2 p2; do \& imapsync --user1 "$u1" --password1 "$p1" --user2 "$u2" --password2 "$p2" ... \& done ; } < file.csv .Ve .PP Welcome in shell programming ! .SH "Hacking" .IX Header "Hacking" Feel free to hack imapsync as the \s-1GPL\s0 Licence permits it. .SH "Links" .IX Header "Links" Entries for imapsync: http://www.imap.org/products/showall.php .SH "SIMILAR SOFTWARES" .IX Header "SIMILAR SOFTWARES" .Vb 15 \& imap_tools : http://www.athensfbc.com/imap_tools \& offlineimap : http://software.complete.org/offlineimap \& mailsync : http://mailsync.sourceforge.net/ \& imapxfer : http://www.washington.edu/imap/ \& part of the imap-utils from UW. \& mailutil : replace imapxfer in \& part of the imap-utils from UW. \& http://www.gsp.com/cgi-bin/man.cgi?topic=mailutil \& imaprepl : http://www.bl0rg.net/software/ \& http://freshmeat.net/projects/imap-repl/ \& imap_migrate : http://freshmeat.net/projects/imapmigration/ \& imapcopy : http://home.arcor.de/armin.diehl/imapcopy/imapcopy.html \& migrationtool : http://sourceforge.net/projects/migrationtool/ \& imapmigrate : http://sourceforge.net/projects/cyrus-utils/ \& pop2imap : http://www.linux-france.org/prj/pop2imap/ .Ve .PP Feedback (good or bad) will be always welcome. .PP $Id: imapsync,v 1.233 2007/10/30 03:20:53 gilles Exp gilles $