用postfix转发邮件到新的域名

公司换了新的域名和邮件系统,但临时无法把旧域名绑定到新的邮件系统。两套系统邮箱地址前缀相同,后缀不同,于是想到了用postfix做邮件转发。

  1. 新建/etc/postfix/virtual,内容为/^([^@]*)@olddomain/ $(1)@newdomain
  2. 编辑main.cf,在virtual_alias_maps = 后添加 regexp:/etc/postfix/virtual
  3. sudo systemctl reload postfix

参考文档

https://serverfault.com/questions/313050/use-postfix-to-forward-mail-to-a-domain-to-the-same-address-at-a-different-domai