Philip Prindeville wrote: > Matt Kettler wrote: > > >> Philip Prindeville wrote: >> >> >> >>> Matt Kettler wrote: >>> >>> >>> >>>>> Not given the simple file-glob format of the whitelist commands. You'd >>>>> need a regular expression and negation. >>>>> >>>>> You could do it with a rule... >>>>> >>>>> header __NULL_RETURN From !~ /./i >>>>> header __RCVD_MYHOST Received =~ /<insert Received header regex >>>>> matching your servers exchanging..>/ >>>>> meta MY_NULL_RETURN (__NULL_RETURN && __RCVD_MYHOST) >>>>> >>>>> >>>>> >>>>> >>> It's not the From, but rather the EnvelopeFrom. >>> >>> >>> >> A rule matching "header From" should match any "from like" header, >> including Return-Path. >> >> >> > > Not sure I follow. > > The From: header will be <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]> > or something similar (depending on the agent). > > The Sender (EnvelopeFrom will be empty, however). I believe that MdF > sticks that into the ReturnPath: header. > Yes, I understand. And what I'm telling you is a header rule checking the "from" header, will match EITHER the contents of From: or Return-Path:
It won't just look at the From: header. SA considers both to be "From" headers of a sort, so it runs the rules against both of them. This saves a lot of duplication of rules that would need to be written to check all the possible "from" type headers in a message. It's more-or-less the same as why a body rule can match the Subject: header text. As long as SA is being called after your MDA adds the Return-Path: header, the rule should work. If it's not working, try this one: header MY_NULL_RETURN2 From =~/\<\>/ score MY_NULL_RETURN2 0.5