Edit /etc/postfix/master.cf
and locate this line:
smtp inet n - n - - smtpd
Add these lines after it:
smtp-amavis unix y - 5 smtp -o smtp_data_done_timeout=1200 -o disable_dns_lookups=yes 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_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes
In the smtp-amavis
line, the number 5
specifies the number of instances that can be used at once. This should correspond to the $max_servers
entry specified in the amavisd.conf
file.
Edit /etc/postfix/main.cf
and add the following line near the end of the file:
content_filter = smtp-amavis:[localhost]:10024
Restart Postfix with the postfix reload
command:
# postfix reload