Email redirection

From Zimbra :: Wiki

Jump to: navigation, search
   Article-alert.png  - This article is a community contribution and may include unsupported customizations for network edition customers.

   Article-alert.png  - This article is a Work in Progress, and may be unfinished or missing sections.

Admin Article

Article Information

This article applies to the following ZCS versions.
  ZCS 8.6 Article  ZCS 8.6
  ZCS 8.5 Article  ZCS 8.5
  ZCS 8.0 Article  ZCS 8.0


Email redirection


User or admin, likes to forward all incoming emails thats going to one account to multiple recipient.


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.

  • Enter following in the file /opt/zimbra/conf/ Make sure it is entered at the top of the file.
 vi /opt/zimbra/conf/

Zimbra 8.5 or above:

check_sender_access lmdb:/opt/zimbra/postfix/conf/restricted_senders

Zimbra 8.0.9 or earlier:

 check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders
  • 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
  • Create the hash and restart postfix.
 postmap /opt/zimbra/postfix/conf/restricted_senders
 zmmtactl restart 


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.

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

Zimbra 8.5 or above:

sender_bcc_maps = lmdb:/opt/zimbra/postfix/conf/sender_bcc
recipient_bcc_maps = lmdb:/opt/zimbra/postfix/conf/recipient_bcc

Zimbra 8.0.9 or earlier:

sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc
recipient_bcc_maps = hash:/opt/zimbra/postfix/conf/recipient_bcc
  • 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
  • Create the hash and reload the MTA.
 postmap /opt/zimbra/postfix/conf/sender_bcc
 postmap /opt/zimbra/postfix/conf/recipient_bcc
 zmmtactl restart


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

Additional Content

  • Not related content.
Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 04/12/2012
Article ID: Date Modified: 04/22/2015

Wiki/KB reviewed by SME1 SME2 Copyeditor Last edit by Jorge de la Cruz Mingo
Personal tools