On Wed, 21 Oct 2015 18:34:27 -0700 Kevin A. McGrail wrote:
> On October 20, 2015 11:39:36 AM PDT, Amir Caspi <ceph...@3phase.com> > wrote: > >On Oct 19, 2015, at 1:16 PM, RW <rwmailli...@googlemail.com> wrote: > > > >> body URI_HOST_IN_BLACKLIST eval:check_uri_host_in_blacklist() > >> header HEADER_HOST_IN_BLACKLIST eval:check_uri_host_listed('BLACK') > >> > >> These appear to be the same thing. The first call is just a > >> shorthand form for the second. I don't see where headers come into > >> it. I think > >the > >> second rule is probably just a mistake. > > > >So, following up on this... do any of the main devs see the second > >rule as a problem? It seems to be that a header rule shouldn't be > >checking URI hosts, but even if so, it absolutely shouldn't be > >hitting when those hosts aren't even in the headers (per the two > >spamples I posted). > I want to run the samples you provided and see if I can duplicate the > issue but it definitely sounds odd. Regards, > KAM See https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7256 If you look at the code it's fairly obvious that they are the same rule. check_uri_host_in_blacklist() just passes BLACK to check_uri_host_listed(). All the work is done in the first invocation of check_uri_host_listed(); and the cached matches are only indexed by the list name (BLACK) without any header/body distinction. From a cursory look at _check_uri_host_listed() it appears to be doing what the name implies - it checks URIs.