King0770-Notes-Relocated-Maps
Scenario
You have around 500 users, which their emails are forwarded to external accounts.
Each user has an OOO message informing the senders for their new email account.
Now you want to close these accounts.
zmprov ma john@example.com zimbraAccountStatus closed
By closing the accounts, this should stop forwarding message to external accounts, but this also prevents OOO messages from being sent.
However, you still want to inform senders the account has 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