On Fri, Mar 25, 2022 at 02:27:09PM +0200, Henrik K wrote: > On Fri, Mar 25, 2022 at 06:01:43AM -0400, Michael Grant wrote: > > > > Unless there's an existing function in some plugin to do this, I'll > > have to write my own. Little surprising that there isn't, this seems > > like an obvious check! > > There is already very basic HEADER() template support added in trunk/4.0.0, > this would generally work: > > askdns UNSUB_NXDOMAIN _HEADER(List-Unsubscribe:host)_ MX [NXDOMAIN] > > It just tries to find something resembling a hostname (having valid TLD) in > the header, preferring to match @(.*) first. So it doesn't differentiate > between http, mailto etc.
Fantastic, thank you! I'm trying to test this with the debian experimental 4.0.0~0.0svn1896439-1 package. Running an email through this version seems to be working (as in spamassassin < test.eml). However when I test just a narrow set of rules in my own cf file, I get this: $ spamassassin -t -C test.cf < tests/test1.eml config: no rules were found! Do you need to run 'sa-update'? at /usr/bin/spamassassin line 417. this works fine on spamassassin 3.x by the way. I have tried reducing test.cf to something simple, for example: full DKIM_SIGNED eval:check_dkim_signed() describe DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid score DKIM_SIGNED 5.0 To be clear, for this I really don't want to run all the tests. Only specific ones which is why I tried using the -C option which works with 3.x. Is there a correct way to do this with 4.x? Michael Grant
signature.asc
Description: PGP signature