On 7/3/2015 10:04 PM, Jim Garrison wrote: > I use > > reject_rbl_client zen.spamhaus.org, > reject_rbl_client b.barracudacentral.org, > reject_rbl_client cbl.abuseat.org, > > which I find catches about 98% of SPAM. > > I also receive mail at an address that is a forwarding mailbox and > sends mail to my Postfix server. The provider of that mailbox uses a > SPAM filtering service that is significantly less effective than my RBL > recipe above. Since, from my server's viewpoint, the client is the > forwarding service provider (which is trusted), all that SPAM makes it > into my mailbox. > > What I'd like to do is apply the same RBL client filtering to hosts > further back in the delivery chain than the immediate client. I.e. > given a chain of Received headers like this: > >> Received: from acmsmtp01.acm.org (ACMSMTP01.acm.org [64.238.147.78]) >> Received: from in-002.ord.mailroute.net >> Received: from localhost (localhost.localdomain [127.0.0.1]) >> Received: from in-002.ord.mailroute.net ([199.89.2.5]) >> Received: from theshoemart.wc09.net (theshoemart.wc09.net > [74.203.48.129]) >> Received: from arbt04.whatcounts.com (172.16.3.34) by theshoemart.wc09.net > > run all the hosts through the RBL lookup and reject if any of the > hosts get a positive result. Is this possible? > > -- Jim Garrison >
Not possible in postfix. And generally unwise to reject relayed mail as it turns the upstream relay into a backscatter source. Your only real choice is to use some filtering solution such as SpamAssassin to tag-and-deliver ALL mail, possibly sorting unwanted mail into a junk folder. -- Noel Jones