From Wikipedia, the free encyclopedia
Jump to: navigation, search

policyd-weight is a mail filter for the Postfix mail transfer agent (MTA) written in Perl, by Robert Felber. It allows postfix to evaluate mail envelope information and to score mail against several DNS-based Blackhole Lists (DNSBL) before the mail is queued. The final score will determine whether a mail is rejected or accepted, in which case it is usually then subject to more resource intensive checks by a virus scanner and spam filter.


policyd-weight works as a policy daemon in Postfix. It uses DNSBL, RHSBL, MX and A DNS queries of the envelope sender and HELO SMTP arguments to evaluate the possibility of either forgery or spam. Rejection happens based on an overall score, so a single blacklist entry may not cause the mail to be rejected. The score is determined by various checks and is not linear. The administrator is able to adjust scores for each check to meet her requirements. policyd-weight caches the most frequent queries to minimize bandwidth and CPU usage.

The benefit of this approach is that it is able to reject a delivery attempt before the body (DATA) of the mail has been received (unlike most installations of SpamAssassin or Amavis), thus saving network bandwidth. Also it does not add delays like Greylisting and keeps out clients which fake HELO or sender information with a better accuracy and fewer false positives than Sender Policy Framework (SPF) checks (example: blocked forwarders due to inconsistent SPF-records or passed Spam/Phishing due to Spam/Phishing-Domains with consistent SPF-records set).

Message flow[edit]

Please refer to this drawing.


policyd-weight is Free software, licensed and released under the GNU General Public License by Selling-IT Robert Felber.

See also[edit]

External links[edit]