On 2026-06-01 at 09:08:33 UTC-0400 (Mon, 01 Jun 2026 09:08:33 -0400)
Bill Cole <[email protected]>
is rumored to have said:

> On 2026-06-01 at 07:56:41 UTC-0400 (Mon, 1 Jun 2026 13:56:41 +0200)
> Benoit Panizzon <[email protected]>
> is rumored to have said:
>
>> Hi
>>
>> I figured out the culpit why a rule did not work was tflags publish
>
> That's obviously not good.
>
> The 'publish' tflag exists to force a rule in the full set of rules in our 
> collection into the active list that is distributed.
>
>> Actual finding in trying to get the shipped rule TO_IN_SUBJ to match
>> anything. Just created a new rule with one of the regexp:
>>
>> header          TEST_EMAIL_SUBJ_TO      ALL =~ 
>> /\nSubject:(?=[^\n]{0,200}@)[^\n]{0,200}([a-z][a-z0-9_.]{3,80}@(?:[a-z0-9_]{1,80}\.){1,4}[a-z]{2,30})(?:[^\n]+\n)*To:\s+[^\n]{0,100}\1[^a-z0-9.]/ism
>> describe        TEST_EMAIL_SUBJ_TO      Testing: Email in Subject then To
>> score           TEST_EMAIL_SUBJ_TO      1
>> tflags          TEST_EMAIL_SUBJ_TO      publish
>>
>> When I remove the tflags line, the rule is run and matches as
>> expected when invoking SpamAssassin from MIMEDefang.
>>
>> When I keep the tflags line, then the rule seems to only run when
>> calling SpamAssassin from command line.
>
> This does not make sense. The publish tflag should not have any effect on how 
> messages are checked.
>
> As described, this is definitely a bug.

However, I cannot reproduce it. I constructed a message matching TO_IN_SUBJ and 
ran it through both MIMEDefang and the spamassassin script. It hit in both 
cases.

Please note that TO_IN_SUBJ is not a simple rule. It is a meta-rule and will 
not fire if the message appears to be from a discussion list OR if the envelope 
sender matches the From header address.

>> So I wonder if there might be some setting somewhere to cause
>> spamassassin not running rules with a specific tflags in some
>> situations?

Thankfully, no.

The next step is for you to validate your MIMEDefang configuration to make sure 
that it is loading the same rules as the spamassassin script. Note that by 
default, MD loads /etc/mail/sa-mimedefang.cf, which the spamassassin script 
does not load. w


-- 
 Bill Cole
 [email protected] or [email protected]
 (AKA @[email protected] and many *@billmail.scconsult.com addresses)
 Please keep discussion mailing list replies *on-list*
 Not Currently Available For Hire

Reply via email to