King0770-Notes-Relocated-Maps
Scenario
You want to inform external senders the accounts have been relocated.
Use relocated_maps for the Zimbra MTA
touch /opt/zimbra/conf/relocated
postmap /opt/zimbra/conf/relocated
postconf -e relocated_maps=lmdb:/opt/zimbra/conf/relocated
zmmtactl restart
postconf | grep ^relocated_maps
relocated_maps = lmdb:/opt/zimbra/conf/relocated <<== you should see this
Example
Edit /opt/zimbra/conf/relocated
The format to use is simple, the old company address first, followed by the new address on the same line.
e.g.
john@example.com smithj@yahoo.com
Anytime /opt/zimbra/conf/relocated is updated, be sure to run the postmap utility against it.
postmap /opt/zimbra/conf/relocated
Now, anytime someone sends john@example.com a new message, they will get a bounce message back.
Subject: Undelivered Mail Returned to Sender
This is the mail system at host zimbra.example.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<john@example.com>: User has moved to smithj@yahoo.com
More articles written by me, https://wiki.zimbra.com/wiki/King0770-Notes