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

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

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


Revision 1.1 - (show annotations) (download)
Mon Jan 7 18:49:37 2008 UTC (16 years, 9 months ago) by bytegw
Branch: MAIN
CVS Tags: qpsmtpd-0_40-1_9_el4_sme, qpsmtpd-0_40-1_12_el4_sme, qpsmtpd-0_40-1_10_el4_sme, qpsmtpd-0_40-1_11_el4_sme
Branch point for: qpsmtpd-0_40
Updates

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