Zimbra

 

Method 1 (SMTP)

 

Note: This method requires the commercial version of Zimbra

MailArchiva Configuration
 
  1. Click Configuration->Listeners.
  2. Select SMTP Listener in the drop down and then click the New Listener button.
  3. Check "Listen for incoming SMTP/Exchange traffic"
  4. Set the SMTP port to 25
  5. Click Save

Zimbra Configuration
 
  1. Edit the /etc/hosts file on the machine running Zimbra
    127.0.0.1 mailarchiva.company.com
    Note: Replace 127.0.0.1 with the IP address of the MailArchiva server
  2. On the Zimbra server telnet to mailarchiva.company.com on port 25 to ensure that a clear line of connectivity between the two machines is available
  3. On the Zimbra server, type zmarchiveconfig enable <journal@company.com> archive-address archive@mailarchiva.company.com archive-create false
    (where company.com is the domain name of your company)

Method 2 (SMTP)

 

Note: This method works on Zimbra Open Source

MailArchiva Configuration
 
  1. Click Configuration->Listeners.
  2. Select SMTP Listener in the drop down and then click the New Listener button.
  3. Check "Listen for incoming SMTP/Exchange traffic"
  4. Set the SMTP port to 25
  5. Click Save

Zimbra Configuration
 

Zimbra 8.x

 

  1. Configure Zimbra to send a copy of all traffic to MailArchiva
# su - zimbra
$ export PATH=/opt/zimbra/bin:$PATH
$ zmlocalconfig -e always_bcc=archiva@archiva.local
$ postconf -e always_bcc=archiva@archiva.local

 

  1. Modify Zimbra config to use custom transport mapping.
$ vi /opt/zimbra/postfix/conf/transport

 

Add the below line to the bottom of the file:

 

archiva@archiva.local               smtp:archiva.com

 

Above config will send to MailArchiva Cloud at archiva.com. Adapt to the FQDN of your MailArchiva server (as necessary). Save file.

 

$ postmap lmdb:/opt/zimbra/postfix/conf/transport
$ zmprov ms mail.example.com zimbraMtaTransportMaps "lmdb:/opt/zimbra/postfix/conf/transport,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf"

 

*Replace mail.example.com above with the primary fully qualified domain name (FQDN) of your mail server.

 

  1. Reload the config
$ postfix reload

 

Zimbra 8.7.x

 

  1. Configure Zimbra to send a copy of all traffic to MailArchiva
# su - zimbra
$ export PATH=/opt/zimbra/bin:$PATH
$ zmlocalconfig -e always_bcc=archiva@archiva.local
$ postconf -e always_bcc=archiva@archiva.local

 

  1. Modify Zimbra config to use custom transport mapping.
$ vi /opt/zimbra/common/conf/transport

 

Add the below line to the bottom of the file:

 

archiva@archiva.local               smtp:archiva.com

 

Above config will send to MailArchiva Cloud at archiva.com. Adapt to the FQDN of your MailArchiva server (as necessary). Save file.

 

$ postmap lmdb:/opt/zimbra/common/conf/transport
$ zmprov ms mail.example.com zimbraMtaTransportMaps "lmdb:/opt/zimbra/common/conf/transport,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf"

 

*Replace mail.example.com above with the primary fully qualified domain name (FQDN) of your mail server.

 

  1. Reload the config
$ postfix reload
 

 

Method 3


Since Zimbra v5 RC2 embeds a new version of postfix, the Postfix setup applies.

 

Verify and change the port that Zimbra is bound to for milters by executing the following commands as the zimbra user:

 

zimbra@server:~$ zmprov gs server.example.com zimbraMilterBindPort                      #### (Shows the current port)
zimbra@server:~zmprov ms server.example.com zimbraMilterBindAddress 192.168.0.22      #### (replace 192.168.0.22 with ip address of MailArchiva server)
zimbra@server:~$ zmprov ms server.example.com zimbraMilterBindPort 8092                 #### (Set the port to 8092)
zimbra@server:~$ zmmtactl restart                                                       #### (Reread the configuration)

 

Then log in to the Zimbra web admin console and under “Server Settings” > “MTA” check the box labeled “enable milter server” and then type the IP address of the mail server in the space directly below and select save.

 

Note: There have been reports that Zimbra will overwrite the main.cf configuration on service restart. To avoid this, mark /opt/zimbra/postfix/conf/main.cf as read-only. 

 

Method 4

 

If the above does not work, chances are your version of Zimbra does not embed a version of postfix that includes support for sendmail milters. MailArchiva is friends with newer versions of Postfix such as version 2.4.6.

Do the following:

  1. edit the main.cf file:
    vim /opt/zimbra/postfix/conf/main.cf ... ... sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc
  2. After that edit the /opt/zimbra/postfix/conf/sender_bcc file.
    #vim /opt/zimbra/postfix/conf/sender_bcc @company.com archive@mailarchiva.company.com
  3. In this senario the mails sent by all the users of the company.com domain will be copied to the archive@mailarchiva.company.com mail account.
  4. Change the MailArchiva SMTP agent port to 25 (Listen for incoming Exchange/SMTP requests change this one to port 25). You may also need to specifically bind the listener to the correct interface. Restart mailarchiva. From the Zimbra MTA run telnet mailarchiva.host.com 25 if you dont see 220 EHLO something is wrong.
  5. Restart Zimbra
    #cd /opt/zimbra/postfix-2.2.9
    #postmap sender_bcc
    #service zimbra restart
  6. You will probably need to update your hosts file to point mailarchiva.company.com to the IP address of the mailarchiva server.
    See http://www.lankalinux.com/?q=node/98 for more info.
    ONE CAVEAT: I am not sure if the above method will capture BCC fields (using MailArchiva's in built milter will!).
  7. How To Setup Zimbra LDAP Authentication
  8. Please refer to LDAPConnectionToZimbra for information to configure LDAP authentication to Zimbra.

 

© 2005 - 2024 ProProfs

Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.

-