You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Christer Boräng <mo...@chalmers.se> on 2010/04/13 13:16:17 UTC

__TO_EQ_FROM and related rules

Hi.

__TO_EQ_FROM_1 and _2 in 72_matching.cf triggers on emails where To:
isn't the same as From: in certain conditions.

If the first of these headers only has an addr-spec and not 
[display-address] angle-addr (according to RFC 2822), the regexp
matches the last character of the addr-spec. If that character exists
in the last of the two headers, the rule will match.

Example headers of a matching email (munged to protect the innocent):

Subject: Vacancy application: Someone is looking for a Centre Manager
To: example@chalmers.se
From: Simple Example <cn...@example.se>
MIME-Version: 1.0

A non-matching example:

Subject: Vacancy application: Someone is looking for a Centre Manager
To: Bad example <ex...@chalmers.se>
From: Simple Example <cn...@example.se>
MIME-Version: 1.0

I'm smart enough to detect why this happens, but not how to design a
better regexp. :-)

//Christer

-- 
| Hagåkersgatan 18C | Phone: Home +46 31 43 52 03   CTH: +46 31 772 5431  |
| S-431 41 Mölndal  |        Cell: +46 707 53 57 57                       |
| Sweden            | Mail:  mort@chalmers.se                             |
"An NT server can be run by an idiot, and usually is." -- Tom Holub, a.h.b-o-i



Re: __TO_EQ_FROM and related rules

Posted by John Hardin <jh...@impsec.org>.
On Tue, 13 Apr 2010, Christer Boräng wrote:

> __TO_EQ_FROM_1 and _2 in 72_matching.cf triggers on emails where To:
> isn't the same as From: in certain conditions.

Thanks, I'll take a look at those.

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Gun Control enables genocide while doing little to reduce crime.
-----------------------------------------------------------------------
  Today: Thomas Jefferson's 267th Birthday

Re: __TO_EQ_FROM and related rules

Posted by John Hardin <jh...@impsec.org>.
On Tue, 13 Apr 2010, Christer Boräng wrote:

> __TO_EQ_FROM_1 and _2 in 72_matching.cf triggers on emails where To:
> isn't the same as From: in certain conditions.
>
> If the first of these headers only has an addr-spec and not
> [display-address] angle-addr (according to RFC 2822), the regexp
> matches the last character of the addr-spec. If that character exists
> in the last of the two headers, the rule will match.

Fix committed.

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   False is the idea of utility that sacrifices a thousand real
   advantages for one imaginary or trifling inconvenience; that would
   take fire from men because it burns, and water because one may drown
   in it; that has no remedy for evils except destruction. The laws
   that forbid the carrying of arms are laws of such a nature. They
   disarm only those who are neither inclined nor determined to commit
   crime.               -- Cesare Beccaria, quoted by Thomas Jefferson
-----------------------------------------------------------------------
  Today: Thomas Jefferson's 267th Birthday