SA Bugzilla – Bug 5460
whitelist_from_rcvd doesn't work on MTAs with PTR lookups disabled
Last modified: 2007-07-30 05:58:05 UTC
It looks to me like there was a fundamental change in how SA 3.2.0 operates WRT whitelist_from_rcvd compared with 3.1.*? I had working whitelist_from_rcvd entries that broke when I went 3.2.0. We use Qmail which defaults to not doing PTR lookups - which means it's Received headers contains IPs instead of PTR records. Under 3.1.8 I *think* (don't have the system anymore) SA did it's own PTR (RDNS) lookups whereas under 3.2.0 it now assumes the MTA did it? That seems a tad broken. I mean besides requiring a MTA to actually do this, there will also be the case where the MTA's PTR lookup fails due to a time out, and SA would be able to successfully do the same lookup 0.5sec later, etc. Am I totally wrong about this, or has this occurred? If this is expected behaviour, could the man page Mail::SpamAssassin::Conf be changed to reflect this, as there is no mention in there. (e.g. "NOTE: for whitelist_from_rcvd to work, you need to ensure your MTA is configured to do PTR lookups so that the Received: headers reflect hostnames instead of raw IP addresses") PS: I enabled PTR lookups on Qmail to get around this - but it was a bit of a shocker when we suddenly started tagging as Spam all email from trademe.co.nz - the "eBay" of New Zealand - who we had a whitelist for. Thanks!
This may be a side effect of the code change to no longer using DNS (ever) to automatically determine trust. I have no idea if 3.1 would do a lookup for you in the described case. Debug output (along with the sample message used) from both 3.1 and 3.2 demonstrating this would be welcomed. Failing a debug comparison, at least a sample message might provoke someone to look at it since I don't think any of the devs would touch qmail with a 10' pole in order to generate their own sample. At least I won't.
Created attachment 3942 [details] sample that shows the lack of PTR lookups just changing the string "unknown" in the Received: header to mta1.wlg.trademe.co.nz suddenly allows whitelist_from_rcvd to work
Moving items off the 3.2.1 queue to 3.2.2 to facilitate a quick release. If you can get this in Review status right away feel free to move it back
(In reply to comment #1) > This may be a side effect of the code change to no longer using DNS (ever) to > automatically determine trust. Yep, it is. it already is documented: '=item whitelist_from_rcvd addr@lists.sourceforge.net sourceforge.net ... This string is matched against the reverse DNS lookup used during the handover from the internet to your internal network's mail exchangers.' this should be clearer, though. checked into trunk: : jm 114...; svn commit -m "clarify documentation to note clearly that MXes must perform DNS name resolution, for whitelist_from_rcvd to work" lib/Mail/SpamAssassin/Conf.pm Sending lib/Mail/SpamAssassin/Conf.pm Transmitting file data . Committed revision 560957. and b320 as a trivial doc fix: : jm 85...; svn commit -m "clarify documentation to note clearly that MXes must perform DNS name resolution, for whitelist_from_rcvd to work" lib/Mail/SpamAssassin/Conf.pm Sending lib/Mail/SpamAssassin/Conf.pm Transmitting file data . Committed revision 560956. > I have no idea if 3.1 would do a lookup for you in the described case. Debug > output (along with the sample message used) from both 3.1 and 3.2 demonstrating > this would be welcomed. Failing a debug comparison, at least a sample message > might provoke someone to look at it since I don't think any of the devs would > touch qmail with a 10' pole in order to generate their own sample. At least I > won't. hm. that reaction might be a little OTT ;)