1、安装
软件包
mail:~# apt-get install amavisd-new spamassassin clamav clamav-daemon clamav-freshclam arc bzip2 lzop zoo cpio
在/etc/postfix/main.cf 加入
content_filter = smtp-amavis:[127.0.0.1]:10024
在/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 local_recipient_maps= C

,p)d#K
-o relay_recipient_maps= Jt[W:o
-o smtpd_restriction_classes= PoV5dxl
-o smtpd_client_restrictions= pg ol>hx
-o smtpd_helo_restrictions= 6 4RS
-o smtpd_sender_restrictions= GzR9f f"M
-o smtpd_recipient_restrictions=permit_mynetworks,reject M=Q >Vq, x
-o mynetworks=127.0.0.0/8
配置amavisd-new ,编辑/etc/amavis/amavisd.conf,修改下面的内容。
大约在
文件的78行位置。
$mydomain = 'mymail.org';
跟据你自己的需要修改发现病毒垃圾邮件等的处理方法。
D_DISCARD 丢弃,D_BOUNCE 退信,D_REJECT 拒绝,D_PASS 通过.
$final_virus_destiny = D_DISCARD; # (defaults to D_BOUNCE) >_[]'
$final_banned_destiny = D_BOUNCE; # (defaults to D_BOUNCE) eKp(^" qw
$final_spam_destiny = D_REJECT; # (defaults to D_REJECT) - ?0qz[
配置spamassassin,修改/etc/default/spamassassin Fv
ENABLED=1