Skip to content

Commit

Permalink
Allow white space rather than just a single tab character in the badm…
Browse files Browse the repository at this point in the history
…ailfromto configuration file.
  • Loading branch information
salvis committed Sep 30, 2016
1 parent 115173b commit 99f62cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/badmailfromto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ badmailfromto - checks the badmailfromto config
Much like the similar badmailfrom, this plugin references both the
FROM: and TO: lines, and if they both are present in the badmailfromto
config file (a tab delimited list of FROM/TO pairs), then the message is
config file (a whitespace-delimited list of FROM/TO pairs), then the message is
blocked as if the recipient (TO) didn't exist. This is specifically designed
to not give the impression that the sender is blocked (good for cases of
harassment).
Expand Down Expand Up @@ -54,7 +54,7 @@ sub hook_rcpt {
};

foreach ($self->qp->config("badmailfromto")) {
my ($from, $to) = m/^\s*(\S+)\t(\S+).*/;
my ($from, $to) = m/^\s*(\S+)\s+(\S+).*/;
if ( lc($from) eq $sender && lc($to) eq $recipient ) {
return DENY, "mail to $recipient not accepted here";
}
Expand Down

0 comments on commit 99f62cc

Please sign in to comment.