You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2012/05/14 18:18:48 UTC

[Bug 6780] Existing but empty From: and To:

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6780

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.4.0

--- Comment #5 from Mark Martinec <Ma...@ijs.si> ---
> hmm... MISSING_HEADERS is operating only on To: header

Right, your rules set seems more to the point.


If multiple (although illegal) From/To/Cc header fields are taken
into account, a regexp /m flag should be used:

header __HAS_FROM   exists:From
header __HAS_TO     exists:To
header __HAS_CC     exists:CC
header __EMPTY_FROM From =~ /^\s*$/m
header __EMPTY_TO   To =~ /^\s*$/m
header __EMPTY_CC   Cc =~ /^\s*$/m

meta EMPTY_FROM_OR_TO_OR_CC (__EMPTY_FROM && __HAS_FROM) || (__EMPTY_TO &&
__HAS_TO) || (__EMPTY_CC && __HAS_CC)
describe EMPTY_FROM_OR_TO_OR_CC  Contains a header field that is blank and
shouldn't be.
score EMPTY_FROM_OR_TO_OR_CC 1.0


( If we don't care to for multiple instances, a rule like
    header __EMPTY_FROM From !~ /\S/
  might be faster. )

Btw, a __HAS_FROM rule we already have (along with 
__HAS_RCVD, __HAS_MESSAGE_ID, __HAS_DATE and __HAS_SUBJECT).
Can't hurt to add __HAS_TO and __HAS_CC for completeness,
even if it turns out they won't be used.

-- 
You are receiving this mail because:
You are the assignee for the bug.