Skip to content

Commit

Permalink
do not use tags that are not supported in SpamAssassin 3.4
Browse files Browse the repository at this point in the history
fix #11
  • Loading branch information
bigio committed Dec 16, 2022
1 parent 1749ee8 commit 2ceb39c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Dmarc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,16 @@ sub _check_dmarc {
$spf_helo_status = 'neutral' if ((defined $pms->{spf_helo_neutral}) and ($pms->{spf_helo_neutral} eq 1));
$spf_helo_status = 'softfail' if ((defined $pms->{spf_helo_softfail}) and ($pms->{spf_helo_softfail} eq 1));

$mfrom_domain = $pms->get('EnvelopeFrom:host', undef);
my $from_addr = $pms->get('EnvelopeFrom:addr');
if($from_addr =~ /\@(.*)$/) {
$mfrom_domain = $1;
}
if(not defined $mfrom_domain) {
$mfrom_domain = $pms->get('From:domain', undef);
dbg("cannot find EnvelopeFrom domain, using From:domain $mfrom_domain");
$from_addr = $pms->get('From:addr');
if($from_addr =~ /\@(.*)$/) {
dbg("cannot find EnvelopeFrom domain, using From:domain $mfrom_domain");
$mfrom_domain = $1;
}
}
return if not defined $mfrom_domain;
$dmarc->source_ip($lasthop->{ip});
Expand Down

0 comments on commit 2ceb39c

Please sign in to comment.