https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7099
Bug ID: 7099
Summary: Adding tags SENDERDOMAIN and AUTHORDOMAIN
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Libraries
Assignee: [email protected]
Reporter: [email protected]
Created attachment 5249
--> https://issues.apache.org/SpamAssassin/attachment.cgi?id=5249&action=edit
Implements the suggested new tags
Paul Stead <[email protected]> wrote
on the [email protected] ML, 2014-11-03:
|
| I think a tag of SENDERDOMAIN would be handy to have so it can be used
| with askdns and other rules which can make use of tags.
|
| This would help address the following bug, which could be implemented
| with a simple rule:
|
| https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7080
|
| As well as the following mailing list posts:
|
|
http://spamassassin.1065346.n5.nabble.com/DMARC-policy-check-with-AskDNS-posible-td109426.html
| http://spamassassin.1065346.n5.nabble.com/dnssec-dane-td110982.html#a112729
| - My post
|
| I'd suggest the following diff - is this in the best place and method to
| accomplish this?
|
| --- lib/Mail/SpamAssassin/PerMsgStatus.pm (revision 1636308)
| +++ lib/Mail/SpamAssassin/PerMsgStatus.pm (working copy)
| @@ -2864,6 +2864,9 @@
| ok:
| $envf =~ s/^<*//gs; # remove <
| $envf =~ s/>*\s*$//gs; # remove >, whitespace, newlines
| + my $fromdom = $envf;
| + $fromdom =~ s/.*\@//;
| + $self->set_tag('SENDERDOMAIN', $fromdom);
| return $envf;
| }
me wrote:
I agree that would make a trivial yet useful addition to functionality.
It probably does not help with PR #7080, but may be useful with other
mentioned applications. Will add something along these lines, thanks!
So here it comes, adds two tags:
_SENDERDOMAIN_ a domain name of the envelope sender address, lowercased
_AUTHORDOMAIN_ a domain name of the author address (the From header
field), lowercased; note that RFC 5322 allows a mail
message to have multiple authors - currently only the
domain name of the first email address is returned
--
You are receiving this mail because:
You are the assignee for the bug.