本帖记录利用 imapsync 工具,从CentOS服务器上将Postfix邮箱转移到新的CentOS主机上的方法。
imapsync 用于同步两个imap邮箱 (仅适合迁移邮箱或者备份,不适合同步两个有用户同时访问的 imap 帐号)
首先在新的服务器上安装好邮件系统,建好相同的邮箱。
接着安装 imapsync (可以装在要同步的任意一台服务器上,也可以装在第三方的服务器上)
yum install imapsync
以下面的数据为例:
旧的邮件服务器为 mail1.mazentop.com
新的邮件服务器为 mail2.mazentop.com
旧的邮箱地址 support@mazentop.com
新的邮箱地址 support@mazentop.com
旧的邮箱密码保存在文件 /etc/mailpass1
新的邮箱密码保存在文件 /etc/mailpass2
那么以下命令可以将邮箱 support@mazentop.com 中的所有内容,从服务器 mail1 复制到服务器 mail2 上的 support@mazentop.com 邮箱中:
imapsync --host1 mail1.mazentop.com --user1 support@mazentop.com --passfile1 /etc/mailpass1 --host2 mail2.mazentop.com --user2 support@mazentop.com --passfile2 /etc/mailpass2
Hi,
Postfix is a SMTP server, there is no “Postfix mailbox”. You have to detect the IMAP server holding mailboxes. Postfix delivers messages to an IMAP server via a deliver agent. Postfix doesn’t know it deliver to IMAP or POP or file or command. The title is wrong, the body is good.
Hi Gilles,
Thanks for pointing out my mistake! I was trying to add more keywords to the title. 🙂
I came across your website and found the Imapsync utility really helpful. so excited to see you here.