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

Annotation of /rpms/qpsmtpd/sme8/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 Nov 14 20:50:20 2010 UTC (13 years, 11 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_84-3_el5_sme, qpsmtpd-0_84-6_el5_sme, qpsmtpd-0_84-2_el5_sme, qpsmtpd-0_84-5_el5_sme, qpsmtpd-0_84-8_el5_sme, qpsmtpd-0_84-9_el5_sme, qpsmtpd-0_84-4_el5_sme, qpsmtpd-0_84-7_el5_sme, HEAD
* Sun Nov 14 2010 <slords@mail.com> 0.84-2.sme
- Sync with upstream git repo.
- Fix require_resolvable_fromhost doesn't work [SME: 6369]
- Fix TLS security defaults [SME: 6366]
- Fix fatal errors when mail has no headers [SME: 6345]

1 slords 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