spamassassin-dev November 2011 archive
Main Archive Page > Month Archives  > spamassassin-dev archives
spamassassin-dev: [Bug 6487] checking for From and EnvelopeFrom

[Bug 6487] checking for From and EnvelopeFrom headers

From: <bugzilla-daemon_at_nospam>
Date: Wed Nov 02 2011 - 15:43:59 GMT
To: dev@spamassassin.apache.org

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

--- Comment #3 from Mark Martinec <Mark.Martinec@ijs.si> 2011-11-02 15:43:59 UTC ---
> Committed revision 1196259.

Just a nitpick:

This is not the best way to fetch a domain name from an e-mail address:
  $fromdomain = $1 if ($from =~ /^[^@]+@(.+)$/);

The local part is allowed to contain '@' characters.
And the @ needs to be quoted. I also prefer to use \z if
'end of string' in intended, instead of a $ with its
newline magic.

Something like:

  $fromdomain = $1 if $from =~ /\@([^@]*)\z/;

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