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 2011/06/01 22:13:33 UTC

[Bug 6607] Unmatched '<>' in Mail/Address.pm

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

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #3 from Kevin A. McGrail <km...@pccc.com> 2011-06-01 20:13:33 UTC ---
This is going to be a very rare condition because sendmail will fix the From:
header but if you use a milter such as MIMEDefang or similar technology to fire
spamassassin, you might see these errors with DKIM.

The problem is caused by an invalid From: header which is then parsed in
Mail::Address by DKIM.

For example, this mail snippet will replicate the issue:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; q=dns/txt; l=26235;
 d=list.sbmedianews.com;s=06182009;
 h=from : list-unsubscribe;
 bh=sthsd3nrldeb+/sELj4ARd6z7wrzdk07yoTNFoZAEVM=;
 b=U9VFHpaJKoyAon6H0zrW0egy/xnAT6oFZzefO6iNjLz78Uvw5IBzpyxfT3BvY3oL0SO/LrM2
 HYgHAk78iTCF0Q==;
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=06182009;
d=list.sbmedianews.com;
 h=from:list-unsubscribe;
 b=A1j9BLjTPziETs4w6nhPGREmokc0Z3+aqPR6NaiG6H4odpfjgsbdWLjklRUk5GANl1KHwfKa
yWq9R2UPEnEKlQ==
From: "Benefits Broker Pro" <admin@list.sbmedianews.com
To: kmcgrail@pccc.com
Subject: No mandate left behind
Date: Wed, 01 Jun 2011 09:16:33 -0400
List-Unsubscribe:
<ma...@list.sbmedianews.com>
Message-ID:
<LY...@list.sbmedianews.com>

Test



Technically, this isn't a bug in SA and the warning is on purpose in
Mail::Address.

I'm adding a rule to match this poor header to my rules and consider the issue
resolved, invalid.

#INVALID FROM HEADER
header          __KAM_INVFROM1  From =~ /<[^>]*$/
header          __KAM_INVFROM2  From =~ /^[^<]*>/

meta            KAM_INVFROM     (__KAM_INVFROM1 + __KAM_INVFROM2 >= 1)
score           KAM_INVFROM     2.0
describe        KAM_INVFROM     Invalid From Header containing mismatched <>'s

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.