Testing an IMAP connection

4/12/2006

Use imtest.

For example:

imtest -m login -p imap localhost

If all is well, output should look something like:

S: * OK servername.com Cyrus IMAP4 v2.2.12-Invoca-RPM-2.2.12-6.fc4 server ready
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE STARTTLS LISTEXT LIST-SUBSCRIBED X-NETSCAPE
S: C01 OK Completed
Please enter your password:

No Comments

IMAP migration with imapsync

10/02/2006

Discovered an awesome tool called imapsync which does recursive IMAP transfers from one mailbox to another.

I created a file called mailboxes.csv with a list of usernames and passwords, semicolon delimited:

chris;password
russell;password

And wrote a really quick shell script to execute imapsync for each user:

#!/bin/sh
{ while IFS=';' read  u p ; do
imapsync --host1 gonzo --host2 animal --user1 "$u" --password1 "$p" --user2 "$u" --password2 "$p" --subscribe ...
done ; } > mailboxes.csv
No Comments