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

Contents of /rpms/qpsmtpd/sme9/0034-plugins-rcpt_map-cleanup.patch

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


Revision 1.1 - (show annotations) (download)
Sat Feb 2 00:59:45 2013 UTC (11 years, 9 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_84-14_el6_sme, qpsmtpd-0_84-16_el6_sme, qpsmtpd-0_84-12_el6_sme, qpsmtpd-0_96-7_el6_sme, qpsmtpd-0_96-2_el6_sme, qpsmtpd-0_84-13_el6_sme, qpsmtpd-0_84-6_el6_sme, qpsmtpd-0_84-18_el6_sme, qpsmtpd-0_84-9_el6_sme, qpsmtpd-0_84-4_el6_sme, qpsmtpd-0_96-11_el6_sme, qpsmtpd-0_84-15_el6_sme, qpsmtpd-0_96-4_el6_sme, qpsmtpd-0_96-3_el6_sme, qpsmtpd-0_96-10_el6_sme, qpsmtpd-0_84-17_el6_sme, qpsmtpd-0_84-7_el6_sme, qpsmtpd-0_96-5_el6_sme, qpsmtpd-0_84-10_el6_sme, qpsmtpd-0_84-8_el6_sme, qpsmtpd-0_96-1_el6_sme, qpsmtpd-0_84-5_el6_sme, qpsmtpd-0_96-6_el6_sme, qpsmtpd-0_96-8_el6_sme, qpsmtpd-0_84-11_el6_sme, qpsmtpd-0_96-9_el6_sme, HEAD
Error occurred while calculating annotation data.
* Fri Feb 1 2013 Shad L. Lords <slords@mail.com> 0.84-4.sme
- Update spec so building on rhel6 works [SME: 7263]

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