/[smeserver]/rpms/qpsmtpd/sme10/0034-plugins-rcpt_map-cleanup.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme10/0034-plugins-rcpt_map-cleanup.patch

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


Revision 1.1 - (hide annotations) (download)
Sun Feb 7 20:49:54 2016 UTC (8 years, 9 months ago) by stephdl
Branch: MAIN
CVS Tags: qpsmtpd-0_96-19_el7_sme, qpsmtpd-0_96-12_el7_sme, qpsmtpd-0_96-11_el7_sme, qpsmtpd-0_96-16_el7_sme, qpsmtpd-0_96-13_el7_sme, qpsmtpd-0_96-6_el7_sme, qpsmtpd-0_96-18_el7_sme, qpsmtpd-0_96-23_el7_sme, qpsmtpd-0_96-20_el7_sme, qpsmtpd-0_84-20_el7_sme, qpsmtpd-0_96-17_el7_sme, qpsmtpd-0_96-8_el7_sme, qpsmtpd-0_96-5_el7_sme, qpsmtpd-0_96-2_el7_sme, qpsmtpd-0_96-21_el7_sme, qpsmtpd-0_96-22_el7_sme, qpsmtpd-0_96-14_el7_sme, qpsmtpd-0_96-15_el7_sme, qpsmtpd-0_96-9_el7_sme, qpsmtpd-0_96-4_el7_sme, qpsmtpd-0_96-1_el7_sme, qpsmtpd-0_96-3_el7_sme, qpsmtpd-0_84-18_el7_sme, qpsmtpd-0_96-10_el7_sme, qpsmtpd-0_84-19_el7_sme, HEAD
* Sun Feb 7 2016 stephane de labrusse <stephdl@de-labrusse.fr> 0.84-18.sme
- Build new rpm for sme10

1 stephdl 1.1 From f9399950f369c9557bbff6fe77fb22ac5a079ff4 Mon Sep 17 00:00:00 2001
2     From: Hanno Hecker <vetinari@ankh-morp.org>
3     Date: Fri, 6 Mar 2009 14:56:12 +0800
4     Subject: plugins/rcpt_map cleanup
5    
6     * enforce having a "domain" parameter
7     * unique default message (missing dot added)
8     ---
9     plugins/rcpt_map | 31 +++++++++++++++++--------------
10     1 files changed, 17 insertions(+), 14 deletions(-)
11    
12     diff --git a/plugins/rcpt_map b/plugins/rcpt_map
13     index 727ae7d..77f3f67 100644
14     --- a/plugins/rcpt_map
15     +++ b/plugins/rcpt_map
16     @@ -12,6 +12,9 @@ matches, the return code from that line and the comment are returned to
17     qpsmtpd. Return code can be any valid plugin return code from
18     L<Qpsmtpd::Constants>. Matching is always done case insenstive.
19    
20     +When the given map file changes on disk, it is re-read in the pre-connection
21     +hook.
22     +
23     =head1 ARGUMENTS
24    
25     The C<file MAP> and C<domain NAME> arguments are required. The default value of
26     @@ -91,18 +94,13 @@ sub register {
27     next unless exists $args{$arg};
28     if ($arg eq "default") {
29     my ($code, $msg) = split /=/, $args{$arg};
30     +
31     $code = Qpsmtpd::Constants::return_code($code);
32     - unless (defined $code) {
33     - $self->log(LOGERROR, "Not a valid constant for 'default' arg");
34     - die "Not a valid constant for 'default' arg";
35     - }
36     -
37     - if ($msg) {
38     - $msg =~ s/_/ /g;
39     - }
40     - else {
41     - $msg = "No such user.";
42     - }
43     + die "Not a valid constant for 'default' arg"
44     + unless defined $code;
45     +
46     + $msg or $msg = "No such user.";
47     + $msg =~ s/_/ /g;
48    
49     $self->{_default} = [$code, $msg];
50     }
51     @@ -112,14 +110,19 @@ sub register {
52     }
53    
54     $self->{_default}
55     - or $self->{_default} = [DENY, "No such user"];
56     + or $self->{_default} = [DENY, "No such user."];
57    
58     $self->{_file}
59     or die "No map file given...";
60    
61     - $self->log(LOGDEBUG, "Using file ".$self->{_file});
62     + $self->{_domain}
63     + or die "No domain name given...";
64     + $self->{_domain} = lc $self->{_domain};
65     +
66     + $self->log(LOGDEBUG,
67     + "Using map ".$self->{_file}." for domain ".$self->{_domain});
68     %map = $self->read_map(1);
69     - die "Empty map file"
70     + die "Empty map file ".$self->{_file}
71     unless keys %map;
72     }
73    
74     --
75     1.7.2.2
76    

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