Descobri um programinha muito interessante para sincronizar contas imap de diferenter servidores: o imapsync. Ele suporta SSL e GMail.
Exemplo de comando (os arquivos secret1 e secret2 contém as senhas):
/usr/bin/imapsync \ --host1 host1.com.br --user1 teste@jonas.net.br --passfile1 /home/jonas/secret1 --host2 imap.gmail.com --user2 teste@gmail.com --passfile2 /home/jonas/secret2 --ssl2 --port2 993 --authmech1 PLAIN --authmech2 LOGIN --syncinternaldates
Não funciona 100% mas já ajuda bastante. Leia mais no Freshmeat.
Mais informações: http://blog.jgrossi.com/2013/migrating-emails-using-imap-imapsync-tofrom-gmail-yahoo-etc/





