Email redirection

From Zimbra :: Wiki

Jump to: navigation, search

This document gather possibilities of email redirection using postfix and zimbra. Please note these modifications may not survive zimbra upgrades.


Redirection based on sender address

In this example, emails send from will be trapped and sent to We are using check_sender_access to achieve this.

1. Enter following in the file “/opt/zimbra/conf/”. Make sure it is entered at the top of the file.

 vi /opt/zimbra/conf/
 check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders 

2. Create a file "/opt/zimbra/postfix/conf/restricted_senders" and list all the users, whose emails you want to redirect.

 cat /opt/zimbra/postfix/conf/restricted_senders REDIRECT REDIRECT

3. Create the hash and restart postfix.

 postmap /opt/zimbra/postfix/conf/restricted_senders
 zmmtactl stop 
 zmmtactl start


Login as and try sending email to any address. It will be redirected to account and the log entry should look like this in /var/log/zimbra.log

 Apr 12 10:08:34 mta postfix/smtpd[521]: NOQUEUE: redirect: RCPT from[xx.xx.xx.xx]: <>: Sender address triggers REDIRECT; from=<> to=<> proto=ESMTP

Sender BCC Maps

In this example, we need a copy of all emails sent FROM to user. I am using sender_bcc_maps.

1. Enter following line at the end of file /opt/zimbra/postfix/ file.

 sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc

2. Create a file /opt/zimbra/postfix/sender_bcc and add the sender address and forward address in following format. You can enter a list of users.

 cat /opt/zimbra/postfix/sender_bcc

3. Create the hash and reload postfix.

 postmap /opt/zimbra/postfix/sender_bcc
 postfix reload


Send an email from and check the logs in zimbra.log. You should see two send entries, one for and other for

Personal tools