2008年6月4日 星期三

如何利用 postfix access 阻擋垃圾信 (How to ban trash mail by using postfix? )

method(1)
1. vi /etc/postfix/main.cf
#add the following script
smtpd_client_restrictions =
check_client_access hash:/etc/postfix/access
postfix reload
2. vi /etc/postfix/access
#add the following script
bandomain.com REJECT we can't allow this domain
3. postmap access
method(2)
ban selected header or body
# add the following script into the /etc/postfix/header_checks file
/From:.*ban_ip_domain/ DISCARD drop header deny
/Subject:.*ban_subject_content/ DISCARD drop header deny
syntax check: postmap -q - regexp://etc/postfix/header_checks < /etc/postfix/header_checks
postfix reload

沒有留言:

熱門文章