- apt-get everything (amavis, clamav, razor, pyzor, dcc)
- add
content_filter=lmpt-amavis:[100.100.1.23]:10024
to postfix/main.cf. change the IP to 127.0.0.1 if you installed postfix and amavisd-new on the same machine - then add to postfix/master.cf two entries:
- definition of lmpt-amavis:
lmtp-amavis unix - - n - 2 lmtp
-o lmtp_data_done_timeout=1200
-o lmtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20 - ...and additional listening postfix's subprocess for mail messages coming back from amavis:
if you listen on this IP for scanned messages from external Amavisd. If you process all of it on one machine, enter 127.0.0.1.
10.100.1.22:10025 inet n - n - - smtpd
-o content_filter=
-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,192.168.0.10/24
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtp_send_xforward_command=yes - add clamav to amavis group as in
/usr/share/doc/amavisd-new/README.Debian
- download initial SpamAssasin Bayes db (check Fortress Systems Ltd.) and
chown amavis.amavis /var/lib/amavis/.spamassassin
- to amavis/conf.d/20-debian-defaults add permission for external postfix server (the gateway of incoming mail messages):
@mynetworks = qw( 127.0.0.0/8 100.100.1.0/24 )
- in the same file tune $sa_tag2_level_deflt:
- make
$sa_kill_level_deflt
equal$sa_tag2_level_deflt
- lower
$sa_tag2_level_deflt
as much as possible. The limit is when you don't receive spam, but legitimate emails also ends in quratantine. I think you can lower it to 3.5 after training Bayes database - set quotas, subject modification string and other maquillage
- make
- clamav-daemon restart; clamavd-freshclam restart; amavid-new debug[-sa]
TODO:
- clarify the text above
- add maintenance of quarantine and learning Spamassassin (Bayes tokens)
No comments:
Post a Comment