1、main.cf 修改以下内容:

shell

# cd /etc/postfix
# vi /main.cf

在 permit_mynetworks,后插入check_client_access pcre:/etc/postfix/dspam_filter_access

smtpd_client_restrictions =
    permit_sasl_authenticated,
    permit_mynetworks,
    check_client_access pcre:/etc/postfix/dspam_filter_access,

main.cf修改以下内容:

header_checks = regexp:/etc/postfix/header_checks
# Content-Filter
#content_filter = smtp:[127.0.0.1]:10024
receive_override_options = no_address_mappings

2、过滤进来的邮件

shell

# vi dspam_filter_access

加入以下内容

/./     FILTER lmtp:[127.0.0.1]:10028

3、设置邮件标题过滤管理

shell

# vi header_checks

加入以下内容

/^(X-DSPAM-.*)/ IGNORE
/^(X-Spam-.*)/  IGNORE

4、修改 master.cf

shell

# vi master.cf

内容如下:

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 strict_rfc821_envelopes=yes
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000

5、重启postfix:

shell

# /etc/init.d/postfix restart
 
三、postfix的配置.txt · 最后更改: 2009/08/10 15:03 由 shaobo
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki