SpamAssassin and Amavisd: Go Ninja On Your UBE Woes - Page 2

 By Carla Schroder | Posted Aug 25, 2004
Page 2 of 2   |  Back to Page 1
Print Article

Continued From Page 1

Configuring Postfix To Use Amavisd-new

Now it's time to set up Postfix to use Amavisd-new. This is a fairly generic configuration, ace Postfix admins may futz and tweak to suit themselves. If you're not real experienced with this part of Postfix, the book "Postfix," by Richard Blum, is a first-rate reference.

Add this to the end of /etc/postfix/master.cf:

smtp-amavis unix -   -     n   -    2  smtp
    -o smtp_data_done_timeout=1200
    -o disable_dns_lookups=yes inet n - n - - smtpd
   -o content_filter=
   -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
   -o local_recipient_maps=
   -o relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks=
   -o smtpd_authorized_xforward_hosts=
   -o strict_rfc821_envelopes=yes

Then add this line to /etc/postfix/main.cf:

content_filter = smtp-amavis:[]:10024

Then do a complete stop-start cycle for Postfix:

# /etc/init.d/postfix stop
# /etc/init.d/postfix start

And you now have a nice spam filter on your mail server. Start sending yourself the saved spams for testing.

You can run SpamAssassin on Postfix without using Amavisd-new. See the SpamAssassin Wiki for howtos on different ways of installing and using SpamAssassin. ClamAV needs Amavisd-new, so it's easy to let it manage SpamAssassin as well.

Come back next week for the exciting installment on installing and using Clam Anti-Virus.


Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter

By submitting your information, you agree that enterprisenetworkingplanet.com may send you ENTERPRISENetworkingPLANET offers via email, phone and text message, as well as email offers about other products and services that ENTERPRISENetworkingPLANET believes may be of interest to you. ENTERPRISENetworkingPLANET will process your information in accordance with the Quinstreet Privacy Policy.