起因 想要把一些廣告信的來源進行阻擋由不想誤檔正常的信件。 原理 Postgrey 的運作原理是讓 SMTP Server 在收到郵件後先回應 450 給來源 SMTP Server,若來源伺服器是正常的 SMTP Server 會在一段時間後自動重試,如果對方是使用發送垃圾郵件的工具不會將信件重送,如此可以達到有效阻擋垃圾郵件的目的。 安裝套件 postgrey-1.33-1.el4.rf.noarch.rpm perl-BerkeleyDB-0.43-1.el4.rf.i386.rpm perl-IO-Multiplex-1.10-1.el4.rf.noarch.rpm perl-Net-Server-0.99-1.el4.rf.noarch.rpm 參考下載位置 http://pkgs.org/ 設定 /etc/postfix/main.cf smtpd_restriction_classes = greylisting greylisting = check_policy_service unix:postgrey/socket smtpd_recipient_restrictions = ... check_client_access pcre:/etc/postfix/greylist ... /etc/postfix/greylist /(\-.+){4}$/ greylisting /(\..+){4}$/ greylisting # everything with 4 or more dots/hyphens in the hostname /(^|[0-9.x_-])(abo|br(e|oa)dband|cabel|(hk)?cablep?|catv|cbl|cidr|d?client2?|cust(omer)?s?|dhcp|dial?(in|up)?|d[iu]p|[asx]?dsld?|dyn(a(dsl|mic)?)?|home|in-addr|modem(cable)?|(di)?pool|ppp|ptr|rev|static|user|YahooBB[0-9]{12}|c[[:alnum:]]{6,}(\.[a-z]{3})?\.virtua|[1-9]Cust[0-9]+|AC[A-Z][0-9A-F...
留言
張貼留言