cvs commit: qpsmtpd/plugins check_badmailfrom check_badrcptto
[email protected] (Devin Carraway)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/06/17 22:47:45
Modified: plugins check_badmailfrom check_badrcptto
Log:
Perform checks on MAIL-FROM and RCPT-TO case insensitively.
Revision Changes Path
1.5 +2 -1 qpsmtpd/plugins/check_badmailfrom
Index: check_badmailfrom
===================================================================
RCS file: /cvs/public/qpsmtpd/plugins/check_badmailfrom,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- check_badmailfrom 31 Aug 2003 08:24:06 -0000 1.4
+++ check_badmailfrom 18 Jun 2004 05:47:45 -0000 1.5
@@ -30,11 +30,12 @@
and $sender->host && $sender->user);
my $host = lc $sender->host;
- my $from = $sender->user . '@' . $host;
+ my $from = lc($sender->user) . '@' . $host;
for my $bad (@badmailfrom) {
$bad =~ s/^\s*(\S+).*/$1/;
next unless $bad;
+ $bad = lc $bad;
warn "Bad badmailfrom config: No \@ sign in $bad\n" and next unless $bad =~ m/\@/;
$transaction->notes('badmailfrom', "Mail from $bad not accepted here")
if ($bad eq $from)
1.4 +2 -1 qpsmtpd/plugins/check_badrcptto
Index: check_badrcptto
===================================================================
RCS file: /cvs/public/qpsmtpd/plugins/check_badrcptto,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- check_badrcptto 21 Apr 2004 12:42:45 -0000 1.3
+++ check_badrcptto 18 Jun 2004 05:47:45 -0000 1.4
@@ -10,8 +10,9 @@
my @badrcptto = $self->qp->config("badrcptto") or return (DECLINED);
return (DECLINED) unless $recipient->host && $recipient->user;
my $host = lc $recipient->host;
- my $from = $recipient->user . '@' . $host;
+ my $from = lc($recipient->user) . '@' . $host;
for my $bad (@badrcptto) {
+ $bad = lc $bad;
$bad =~ s/^\s*(\S+)/$1/;
return (DENY, "mail to $bad not accepted here")
if $bad eq $from;