Integrating Zimbra with Bitdefender Security for Mail Servers
Bitdefender Security for Mail Servers protects Windows or UNIX-based mail servers for known and unknown security threats with award winning proactive antivirus, antispyware, antispam, antiphishing, content and attachment filtering technologies. The solution secures organizations email services and provides increased productivity by blocking spam and providing common centralized management tools.
Before proceeding, please make sure that Zimbra is installed without any antivirus or antispam options and Bitdefender Security for Mail Servers (UNICES) is installed and that you selected to integrate it with Postfix MTA during installation. In case you didn't select Postfix integration during the product installation you should run the following commands:
# cd /opt/BitDefender/bin
# ./bdsafe agent integrate postfix
NOTE: it will output some errors stating that it didn't find Postfix configuration files, it is completely normal, because even if Zimbra uses Postfix as MTA, the difference is that stores Postfix configuration files in /opt/zimbra/postfix/conf instead of /etc/postfix.
Zimbra's Postfix configuration files are restored every time Zimbra services are restarted, so in order to integrate Bitdefender with Zimbra, two configuration files must be edited:
/opt/zimbra/postfix/conf/master.cf.in
/opt/zimbra/conf/zmmta.cf
NOTE: before editing these files, make sure you backup them in order to be able to revert to the previous configuration if needed.
MASTER.CF.IN
In order to modify /opt/zimbra/postfix/conf/master.cf.in, run the following commands:
# cd /opt/zimbra/postfix/conf
# cp master.cf.in master.cf.in.orig
Edit master.cf.in and remove the last section regarding AMAVIS. Once deleted, add the following lines:
#Added by BitDefender, do not remove!
127.0.0.1:10026 inet n - n - 10 smtpd -o content_filter= -o smtp_send_xforward_command=yes
#End of added lines
NOTE: the second line (starting with 127.0.0.1 ...) must be ONE line.
Save the file and close your text editor.
ZMMTA.CF
In order to modify /opt/zimbra/conf/zmmta.cf, run the following commands:
# cd /opt/zimbra/conf
# cp zmmta.cf zmmta.cf.orig
Edit zmmta.cf and look for "POSTCONF content_filter". Once you locate the file, modify it so that it shows the following:
POSTCONF content_filter smtp:127.0.0.1:10025
Save the file and close your text editor.
CONFIGURE BITDEFENDER
Once you modified Zimbra configuration, you have to configure Bitdefender so it can start to filter and scan. Please execute the following commands:
# cd /opt/BitDefender/bin
# ./bdsafe agent configure smtp realserver 127.0.0.1:10026
# ./bdsafe agent configure smtp port 10025
Once the commands have been executed, check the configuration:
# ./bdsafe agent configure smtp
/BDUX/Agents/SmtpProxy/SMTPServer = 127.0.0.2:10026
interface = 127.0.0.1
network = 127.0.0.1/255.255.255.255
domain = localhost
/BDUX/Agents/SmtpProxy/Port = 10025
/BDUX/Agents/SmtpProxy/Timeout = 60
/BDUX/Agents/SmtpProxy/Threads = 0
/BDUX/Agents/SmtpProxy/MaxMailSize = 0
Once you have checked thateverything is correct, please restart Bitdefender and Zimbra services in order to apply new configuration on both:
# su -c "/opt/zimbra/bin/zmmtactl restart" zimbra
# /etc/init.d/bd restart
If everything was set up correctly, you can check if the e-mail traffic is going through Bitdefender with the following command:
# /opt/BitDefender/bin/bdsafe stats
Australia: (+61) 2801 48283, (+61) 2801 44572, (+61) 1300 954 574 (English - 24 hour service)
Brasil: (+55) 11 395 88 765
Canada: (+1) 647 955 1197 , (+1) 647 847 3405
Deutschland: (+49) 2319 8928 017, (+49) 2318 868 043
Espańa: (+34) 902 190 765
France: (+33) 8 92 561 161 (0,34€ TTC / min)
Italiano: (+39) 0699 268 342
New Zealand: (+64) 998 535 51
Osterreich: (+49) 2319 8928 017, (+49) 2318 868 043
Romania: (+40) 21 300 1226, (+40) 21 300 1227
Schweiz: (+49) 2319 8928 017, (+49) 2318 868 043
United States: (+1) 954 928 2780
United Kingdom: (+44) 208 819 2649
WorldWide: (+40) 21 264 1794 