How To Archiving on Zimbra OSE (Auto BCC by Sender)

Posted by

Archiving is one of important thing on email. Archiving of email, usually used for audit complain or other needed. Actually, feature archiving is there on Zimbra paid version (Network Edition) and only there for Professional edition. If you often use webmail, you can archive inbox item, sent item even draft item as described at Zimbra wiki link : However, just work if using webmail. If using email client such as Thunderbird or Outlook, your email will not archive.

If you want to archive email and using Zimbra OSE, you can use auto bcc with simple modification on Postfix. But in this section, i will just archive email by sender (auto bcc by sender). For example, i have account with name and archive account with name user1@imanudin.archive. Every email sent from will automatically bcc to user1@imanudin.archive. You can do the following tips to do that

# Create domain archive on Zimbra. Example imanudin.archive. To do that, you can do via Zimbra Admin | Configure | Domains or via Command Line with the following command

su - zimbra
zmprov cd imanudin.archive

# Create account for archive. Example account have account archive user1@imanudin.archive. To do that, you can do via Zimbra Admin | Manage or via Command Line with the following command

su - zimbra
zmprov ca user1@imanudin.archive passwordarchiveuser1

# Create rule on Zimbra for archive every sent email from user that will be archived

vi /opt/zimbra/postfix/conf/

Add the following line on the bottom

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

# Create file /opt/zimbra/postfix/conf/sender_bcc and fill with the users who will be archived

vi /opt/zimbra/postfix/conf/sender_bcc

Fill with the following example      user1@imanudin.archive

# Postmap file /opt/zimbra/postfix/conf/sender_bcc

postmap /opt/zimbra/postfix/conf/sender_bcc

# Reload service Postfix Zimbra

postfix reload

Please try to sending email from user who have been configured auto bcc. Every sent email from will be also copied to user1@imanudin.archive

Note :

– This guidance using Zimbra 8.5. If using old Zimbra and above guidance is not working, please change lmdb become hash

– Every add/change/delete users archives on /opt/zimbra/postfix/conf/sender_bcc, don’t forget to doing postmap and reload Postfix Zimbra

If you have budget and want to simple archives users, consider to using Zimbra NE with more features available

Good luck and hopefully useful 😀

Source :


  1. Hi Dear,

    i need alway_bcc seting in zimbra 8.7 , i can recive all user incoming & outgoing mail into one archive accounts

  2. Hi

    After configuring mail archive and while updating postmap getting below error

    postmap: fatal: open database /opt/zimbra/postfix/conf/sender_bcc.lmdb: Permission denied

    pls can you give me solution…

    1. you are getting this error because postmap is not having permissions wo create db file in conf directory.

      You can try:
      chown postfix:postfix /opt/zimbra/postfix/conf/
      chmod 775 /opt/zimbra/postfix/conf/

      Now run postmap. It should work. I have tested it. Post the issue here if you face.

  3. Hi i am getting bellow error.

    Dec 25 14:33:27 mail postfix/cleanup[170532]: warning: database /opt/zimbra/postfix/conf/sender_bcc.lmdb is older than source file /opt/zimbra/postfix/conf/sender_bcc
    Dec 25 14:33:27 mail postfix/cleanup[170532]: warning: database /opt/zimbra/postfix/conf/recipient_bcc.lmdb is older than source file /opt/zimbra/postfix/conf/recipient_bcc

    1. Hi Raj,

      You can perform postmap again

      su - zimbra
      postmap /opt/zimbra/postfix/conf/sender_bcc
      postmap /opt/zimbra/postfix/conf/recipient_bcc
  4. Hello Friend,

    How this can be accomplished on Zimbra 8.8.11 as there is no post fix installed.

    I had updated file as instructed above from the following location.


    And then created the file sender_bcc in /opt/zimbra/common/conf/

    Then when I “post map ” the following error pops up.

    postmap /opt/zimbra/common/conf/sender_bcc
    The program ‘postmap’ is currently not installed. You can install it by typing:
    apt install postfix

    So that means the new version dont have postfix,right?

    Then how I can accomplish the same as in the post.

    Please help.


  5. Dear Imanudin,

    Do you have any kind of automated script in which if a new user is created in Zimbra, the script will create a Archive user and created the entries in sender_bcc and receipinet_bcc.

  6. I have a working archive and AutoBCC is working fine. But Now I need to add another email.
    The email should be sent to two different email addresses, how can I accomplish this?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.