/[smeserver]/rpms/qpsmtpd/sme8/qpsmtpd-0.40-badrcpttoPlugin.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme8/qpsmtpd-0.40-badrcpttoPlugin.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Fri Oct 16 22:45:25 2009 UTC (15 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Update to 0.83

1 diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.40/plugins/check_badrcptto mezzanine_patched_qpsmtpd-0.40/plugins/check_badrcptto
2 --- qpsmtpd-0.40/plugins/check_badrcptto 2008-01-07 02:55:53.000000000 -0700
3 +++ mezzanine_patched_qpsmtpd-0.40/plugins/check_badrcptto 2008-01-07 02:53:20.000000000 -0700
4 @@ -1,20 +1,22 @@
5 -# this plugin checks the badrcptto config (like badmailfrom for rcpt address)
6 +# this plugin checks the badrcptto config (like badmailfrom for sender)
7 use Qpsmtpd::DSN;
8
9 sub hook_rcpt {
10 my ($self, $transaction, $recipient, %param) = @_;
11 + return Qpsmtpd::DSN->no_such_user("recipient address must include local part")
12 + unless $recipient->user;
13 return (DECLINED) if $self->qp->connection->relay_client;
14 my @badrcptto = $self->qp->config("badrcptto") or return (DECLINED);
15 return (DECLINED) unless $recipient->host && $recipient->user;
16 my $host = lc $recipient->host;
17 - my $from = lc($recipient->user) . '@' . $host;
18 + my $to = lc($recipient->user) . '@' . $host;
19 for my $bad (@badrcptto) {
20 $bad = lc $bad;
21 $bad =~ s/^\s*(\S+)/$1/;
22 return Qpsmtpd::DSN->no_such_user("mail to $bad not accepted here")
23 - if $bad eq $from;
24 + if $bad eq $to;
25 return Qpsmtpd::DSN->no_such_user("mail to $bad not accepted here")
26 - if substr($bad,0,1) eq '@' && $bad eq "\@$host";
27 + if $bad eq "\@$host";
28 }
29 return (DECLINED);
30 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed