Zimbra
Method 1 (SMTP)
MailArchiva Configuration
- Click Configuration->Listeners.
- Select SMTP Listener in the drop down and then click the New Listener button.
- Check "Listen for incoming SMTP/Exchange traffic"
- Set the SMTP port to 25
- Click Save
Zimbra Configuration
- 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 - 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
- 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)
MailArchiva Configuration
- Click Configuration->Listeners.
- Select SMTP Listener in the drop down and then click the New Listener button.
- Check "Listen for incoming SMTP/Exchange traffic"
- Set the SMTP port to 25
- Click Save
Zimbra Configuration
Zimbra 8.x
- Configure Zimbra to send a copy of all traffic to MailArchiva
$ export PATH=/opt/zimbra/bin:$PATH
$ zmlocalconfig -e always_bcc=archiva@archiva.local
$ postconf -e always_bcc=archiva@archiva.local
- Modify Zimbra config to use custom transport mapping.
Add the below line to the bottom of the file:
Above config will send to MailArchiva Cloud at archiva.com. Adapt to the FQDN of your MailArchiva server (as necessary). Save file.
$ 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.
- Reload the config
Zimbra 8.7.x
- Configure Zimbra to send a copy of all traffic to MailArchiva
$ export PATH=/opt/zimbra/bin:$PATH
$ zmlocalconfig -e always_bcc=archiva@archiva.local
$ postconf -e always_bcc=archiva@archiva.local
- Modify Zimbra config to use custom transport mapping.
Add the below line to the bottom of the file:
Above config will send to MailArchiva Cloud at archiva.com. Adapt to the FQDN of your MailArchiva server (as necessary). Save file.
$ 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.
- Reload the config
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 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.
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:
- edit the main.cf file:
vim /opt/zimbra/postfix/conf/main.cf ... ... sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc
- After that edit the /opt/zimbra/postfix/conf/sender_bcc file.
#vim /opt/zimbra/postfix/conf/sender_bcc @company.com archive@mailarchiva.company.com
- 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.
- 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.
- Restart Zimbra
#cd /opt/zimbra/postfix-2.2.9
#postmap sender_bcc
#service zimbra restart - 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!). - How To Setup Zimbra LDAP Authentication
- Please refer to LDAPConnectionToZimbra for information to configure LDAP authentication to Zimbra.
Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.