SA Bugzilla – Bug 7653
Applying eval:check_uridnsbl to header does not work
Last modified: 2019-03-26 04:52:13 UTC
When using eval:check_uridnsbl in a rule for "header" this does not work, e.g. urirhsbl NAME_OF_RULE foo.bar.tld. A header NAME_OF_RULE eval:check_uridnsbl('NAME_OF_RULE') describe NAME_OF_RULE Some text here tflags NAME_OF_RULE net score NAME_OF_RULE 2.5 Using the same for a body rule e.g. urirhsbl NAME_OF_RULE foo.bar.tld. A body NAME_OF_RULE eval:check_uridnsbl('NAME_OF_RULE') describe NAME_OF_RULE Some text here tflags NAME_OF_RULE net score NAME_OF_RULE 2.5 it works perfectly. The idea behind applying a blacklist to header is to block e.g. From: headers by means of a dns blacklist. (And yes, the Mail::SpamAssassin::Plugin::URIDNSBL was loaded ;-) ) As to http://svn.apache.org/repos/asf/spamassassin/tags/spamassassin_release_3_0_0rc3/rules/25_uribl.cf it should be possible to apply the eval:check_uridnsbl on headers.
- the rule file you show as a sample is obsolete - release 3.0.rc3 see up to date rules on http://svn.apache.org/repos/asf/spamassassin/trunk/rules/25_uribl.cf - From: is not a header whcih is why it get eval'd by a body rule
As it seems, it the rule does even not get applied to From: in any way. We tested it with a true spam mail and the rule URIBL_DBL_SPAM from spamassassins default ruleset. Even URIBL_DBL_SPAM does not get applied to From: header.
Reopend due to last comment.
Additional info: But URIBL_DBL_SPAM does get applied to "misc" headers like DomainKey stuff.
https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.html Can you find any mention of "header" from docs ? No. Is there always mentioned "Note that you must also define a BODY-eval rule calling check_uridnsbl() to use this." ? Yes. Is it reasonable to assume trying some random thing against documentations wishes would work ? No. Is this extremely legacy configuration format with many urinsrhsdnscookiemunchbl keys and a "body eval"-clause (that actually doesn't itself do anything) confusing ? Yes, sorry. But atleast it's quite detailedly documented.
This was also lately discussed: http://spamassassin.1065346.n5.nabble.com/using-URIBL-on-other-headers-td153007.html
THIS IS NOT A BUG. It is a request for a new feature. I have adjusted metadata fields appropriately. URIDNSBL rules apply only to body URIs and *optionally* to domains parsed from DKIM headers if parse_dkim_uris is set. This is well-documented intentional behavior. As Henrik has noted, the existing URIDNSBL design is not intuitive and as the opening of this as a "major" bug demonstrates, it leads to confusion. To simply add on the mis-guessed rule syntax in this report to the core broken design would be short-sighted and would cement the confusing design in place. I think we need a broader discussion of what this enhancement should be precisely, involving users and list operators, rather than just an enhancement request in Bugzilla.
Added mention of parse_dkim_uris in URIDNSBL docs too so it's easier to find. Sending spamassassin-3.4/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm Sending trunk/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm Transmitting file data ..done Committing transaction... Committed revision 1845932.
Sorry - mea culpa.
Was resolved already, closing.