/[smeserver]/rpms/qpsmtpd/sme10/qpsmtpd-0.96-more_badrcptto.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme10/qpsmtpd-0.96-more_badrcptto.patch

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


Revision 1.1 - (show annotations) (download)
Fri Apr 22 08:37:10 2016 UTC (8 years ago) by vip-ire
Branch: MAIN
CVS Tags: qpsmtpd-0_96-21_el7_sme, qpsmtpd-0_96-19_el7_sme, qpsmtpd-0_96-10_el7_sme, qpsmtpd-0_96-20_el7_sme, qpsmtpd-0_96-12_el7_sme, qpsmtpd-0_96-22_el7_sme, qpsmtpd-0_96-14_el7_sme, qpsmtpd-0_96-11_el7_sme, qpsmtpd-0_96-16_el7_sme, qpsmtpd-0_96-13_el7_sme, qpsmtpd-0_96-15_el7_sme, qpsmtpd-0_96-17_el7_sme, qpsmtpd-0_96-9_el7_sme, qpsmtpd-0_96-8_el7_sme, qpsmtpd-0_96-6_el7_sme, qpsmtpd-0_96-18_el7_sme, HEAD
* Fri Apr 22 2016 Daniel Berteaud <daniel@firewall-services.com> 0.96-6.sme
- badrcptto can now read another file container bad addresses [SME: 9460]
  [SME: 4597]

1 diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.96/plugins/badrcptto mezzanine_patched_qpsmtpd-0.96/plugins/badrcptto
2 --- qpsmtpd-0.96/plugins/badrcptto 2016-02-16 23:52:02.000000000 +0100
3 +++ mezzanine_patched_qpsmtpd-0.96/plugins/badrcptto 2016-04-22 10:27:18.648307689 +0200
4 @@ -12,6 +12,13 @@
5 a complete email address, a host entry that starts with an @ symbol, or a
6 regular expression. For regexp pattern matches, see PATTERNS.
7
8 +=head1 CONFIG FILES
9 +
10 +=head2 more_badrcptto
11 +
12 +Optional additional file to look for badrcptto in I<config>. Same syntax
13 +as the default badrcptto
14 +
15 =head1 PATTERNS
16
17 This allows special patterns to be denied (e.g. percent hack, bangs,
18 @@ -46,6 +53,11 @@
19 use Qpsmtpd::Constants;
20 use Qpsmtpd::DSN;
21
22 +sub register {
23 + my ($self, $qp, %arg) = @_;
24 + $self->{_more_badrcptto} = $arg{more_badrcptto} if $arg{more_badrcptto};
25 +}
26 +
27 sub hook_rcpt {
28 my ($self, $transaction, $recipient, %param) = @_;
29
30 @@ -58,6 +70,10 @@
31 $self->log(LOGINFO, "skip, empty config");
32 return DECLINED;
33 };
34 + if (defined $self->{_more_badrcptto}){
35 + $self->log(LOGDEBUG, 'Loading additional badrcptto from ' . $self->{_more_badrcptto});
36 + push @badrcptto, $self->qp->config($self->{_more_badrcptto});
37 + }
38
39 for my $line (@badrcptto) {
40 $line =~ s/^\s+//g; # trim leading whitespace

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