August 27, 2014
 
 
RSSRSS feed

SpamAssassin and Amavisd: Go Ninja On Your UBE Woes - page 3

Building a Better Gateway

  • September 9, 2004
  • By Carla Schroder

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
127.0.0.1:10025 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=127.0.0.0/8
   -o smtpd_authorized_xforward_hosts=127.0.0.0/8
   -o strict_rfc821_envelopes=yes

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

content_filter = smtp-amavis:[127.0.0.1]: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.

Resources

[Editor's Note: This story orginally appeared in the JupiterWeb site CrossNodes. -BKP]

Sitemap | Contact Us