Plesk9 integration with Postfix and ClamAV

Officially Plesk 9 does not support  ClamAV (Parallels as of the time of writing officially supports two antivirus solutions that needs you to pay for the license )

The integration uses Plesk9- Postfix - ClamSMTP - clamAV to get things working.This was accomplished in a CentOS -5.2 system .But it should work just fine on other operating systems.

1. install clamAV

yum install clamav clamd

2.Install ClamSMTP

Download the latest from http://www.inet.lt/clamsmtp/

Heres what i did:

rpm -ivh http://www.inet.lt/clamsmtp/clamsmtp-1.10-1.src.rpm

cd /usr/src/redhat/SPECS/

rpmbuild -bb clamsmtp.spec

cd /usr/src/redhat/RPMS/`arch`

rpm -ivh clamsmtp-1.10-1.x86_64.rpm clamsmtp-debuginfo-1.10-1.x86_64.rpm

3. We have to configure postfix to pass the mail to clamSMTP and accept mail send by ClamSMTP after scanning .the first part is accomplished as below

postconf -e "content_filter = scan:[127.0.0.1]:5025″

Since postfix does not know what the scan is which we just defined to be listening on port 5025. We have to edit /etc/postfix/master.cf and include the following lines.Make sure there’s no spaces around the equal signs or commas in the text you add

=================
# AV scan filter (used by content_filter)
scan unix - - n - 16 smtp
-o smtp_send_xforward_command=yes
-o smtp_enforce_tls=no
# For injecting mail back into postfix from the filter
127.0.0.1:5026 inet n - n - 16 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8

===========================

4.Next we have to configure ClamSMTP

edit /etc/clamsmtpd.conf and make following changes

OutAddress: 5026

Listen: 0.0.0.0:5025

ClamAddress: /tmp/clamd.socket  ( this should be the same socket  as mentioned in /etc/clamd.conf )

# What to do when we see a virus (use ‘bounce’ or ‘pass’ or ‘drop’
Action: drop

User: clamav

Thats it !. Restart clamd, clamsmtp and postfix and you should be setup fine. Please check the logs if there is a problem .You can see if ClamAV is working by using a standard EICR virus test file

Face problems ? . You can contact the author by emailing anoop[at]gnusys[dot]net

Share and Enjoy:
  • Digg
  • Mixx
  • del.icio.us
  • StumbleUpon
  • Facebook
  • TwitThis
  • Technorati
  • Google

Tags: , ,

9 Responses to “Plesk9 integration with Postfix and ClamAV”

  1. Plesk 9 integración de ClamAV con Postfix, Carrero Says:

    [...] información en gnusys: Plesk 9 integration with Postfix and ClamAV. Etiquetas: antivirus, centos, gratis, inglés, [...]

  2. Albans Says:

    Pretty interesting and works perfectly! THANKS!

    No, I’m trying to get spamassassin to work with Plesk 9 and Postfix (and ClamAV), as I did before with qmail… Of course, I’m speaking of the usual SpamAssassin (not the Plesk one that require licence).
    Any idea?

  3. xvxvx Says:

    What history Deadmines have wow gold , you can enjoy this instance wow gold. You can try your best to low to $2/5000 and other rewards with your members!

  4. xvxvx Says:

    Buy 1000 Replica watches,replica watches all over the 322 countries,replica watches, Rolex,Rolex,Rolex,Rolex Watches ,Rolex Watches,,ROLEX watches, BREITLING watches ,TAG HEUER watches ,CARTIER watches,OMEGA watches for you.

  5. xvxvx Says:

    Our replica handbags and louis vuitton is made with special care to reach the level of an original. Something you ever hesitate going for wholesale handbags

  6. xvxvx Says:

    Our replica handbags and louis vuitton is made with special care to reach the level of an original. Something you ever hesitate going for wholesale handbags

  7. replica watches Says:

    Some rolex watchesof the features rolex watches you find breitling watches easily find are breitling watches replica tag heuer watches equipped with tag heuer watches a sensor cartier watchesthat cartier watches you should omega watches read signals from a omega watches device strapped to the movado watches chest. These movado watches come rolex watcheswith high rolex watches price tag but breitling watches the sensitivity breitling watches allows health conscious people tag heuer watcheswho want to tag heuer watches have all he blessings of cartier watches good health cartier watches to maintain good omega watches health. Most omega watches of them movado watches are digital, movado watches making them replica rolex watcheseasier rolex watches to read and replica breitling watches comprehend at first breitling watches glance. There replica tag heuer watches are more than replica tag heuer watches one reason for replica cartier watches therate monitoring cartier watches. Not only great for replica omega watches monitoring for omega watches good health, they are also replica movado watches ideal for movado watches intensive fitness training. In a word, heart rate monitor watch is an excellent investment for your health and fitness

  8. latest rolex Says:

    More than 1000 different kinds luxury watches luxury watches are waitting for you. they are not only cheap but also have high quality, if you interested in it, you also can contact me directly
    my skype : xuemiaoping1

  9. marry Says:

    Replica watches become the trend fashion in Europe, because it meet most customers’ dimand . people are not willing to spend large money to buy a orginal watch. Because earn money is not easy in today’s society. In my view replica watches suit for most people , because it’s price is low ,and it’s quality is very good . why don’t try to choose it . now I wear a Replica rolex , no one can identify it is a replica rolex so far .

Leave a Reply