# Postfix + milters (milters question)



## SomeoneHere (Apr 14, 2009)

I am trying to understand how to get milters working.  I have installed postfix and amavisd-new.  I want to get clamav and spamassassin working with it.  I know that by default spamassassin is installed with amavisd-new when using the ports collection.  I got these milters working before but I don't think I did it the correct way.  The way that I got both clamav-milter and spamassassin to scan mail was by uncommenting InputMailFilters in the /etc/mail/sendmail.cf file and adding clamav and spamassassin there.  Is this the correct way of getting milters working with postfix?  Because with amavisd-new the mail was being scanned by amavisd but not by spamassassin or clamav until I modified that sendmail.cf file.  Any information so that I can get a better understanding would be greatly appreciated.


----------



## hydra (Apr 14, 2009)

You don't need any milters at all, check out http://www.ijs.si/software/amavisd/README.postfix and http://www.postfix.org/FILTER_README.html. I recommend setting up Amavisd-new as after-queue filter.

Amavisd-new will listen on a port where Postfix will transfer mail, Amavisd-new will check it and reinject to Postfix.


----------



## phoenix (Apr 16, 2009)

With Postfix, you can either use Amavisd-new or milters, but not both.

Using Amavisd-new, you configure Postfix to pass messages to amavisd, which passes the message through SpamAssassin, DCC, Razor2, Pyzor, ClamAV, other AV, and whatever other plugins you want to use.  Then the message is either passed back to Postfix for final delivery, or rejected.  All configuration is done via Postfix' master.cf and main.cf, and then amavisd.conf.

The other method is to use milters to send messages from Postfix to SpamAssassin and ClamAV.  In that setup, you don't use Amavisd-new at all.  I've never used this setup, so can't really comment on it.


----------

