|Installing a SpamAssassin, ClamAV and Amavisd-new on EnGarde Secure Linux HOWTO|
|Prev||Chapter 3. Setup||Next|
OK, we have the virus scanner, spam scanner and amavisd set up and running. Now we have to tell postfix to send incoming mail to amavisd and where to get the results back from amavisd. To do this we will have to edit two files in /etc/postfix, master.cf and main.cf.
You will need to add the following lines to the end of /etc/postfix/master.cf.
t is very IMPORTANT that the lines with "-o" have at least one space at the begging of the line. Also lines other than those with "-o" must have NO SPACE at the begging of the line.
smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20
127.0.0.1:10025 inet n - y - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks_style=host -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
You will need to add the following two lines to /etc/postfix/main.cf. These lines should not start with any white space.
content_filter = smtp-amavis:localhost:10024 receive_override_options = no_address_mappings
Now restart postfix by running the command "/etc/init.d/postfix restart". Your server should now discard any viruses detected by ClamAV and tag the subject of mail that has accumulated 5.0 or more spam points as determined by SpamAssassin.