/[smeserver]/rpms/qpsmtpd/sme10/0031-Adds-the-ability-to-have-multiple-instances-each-wit.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme10/0031-Adds-the-ability-to-have-multiple-instances-each-wit.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, 8 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 2979c52b475533ce1fdff235800fb7d550806a29 Mon Sep 17 00:00:00 2001
2     From: Peter A Eisch <peterbokunet@hotmail.com>
3     Date: Wed, 9 Dec 2009 06:52:33 +0800
4     Subject: Adds the ability to have multiple instances (each with different
5     configs) running under Apache.
6    
7     ---
8     lib/Apache/Qpsmtpd.pm | 35 ++++++++++++++++++++++++++++++++++-
9     1 files changed, 34 insertions(+), 1 deletions(-)
10    
11     diff --git a/lib/Apache/Qpsmtpd.pm b/lib/Apache/Qpsmtpd.pm
12     index f03e430..4281670 100644
13     --- a/lib/Apache/Qpsmtpd.pm
14     +++ b/lib/Apache/Qpsmtpd.pm
15     @@ -43,6 +43,25 @@ package Qpsmtpd::Apache;
16     use Qpsmtpd::Constants;
17     use base qw(Qpsmtpd::SMTP);
18    
19     +my %cdir_memo;
20     +
21     +sub config_dir {
22     + my ($self, $config) = @_;
23     + if (exists $cdir_memo{$config}) {
24     + return $cdir_memo{$config};
25     + }
26     +
27     + if (uc($ENV{QPSMTPD_CONFIG}) eq 'USE-VIRTUAL-DOMAINS') {
28     + my $cdir = $self->{conn}->base_server->dir_config("qpsmtpd.config_dir");
29     + $cdir =~ /^(.*)$/; # detaint
30     + my $configdir = $1 if -e "$1/$config";
31     + $cdir_memo{$config} = $configdir;
32     + } else {
33     + $cdir_memo{$config} = SUPER::config_dir(@_);
34     + }
35     + return $cdir_memo{$config};
36     +}
37     +
38     sub start_connection {
39     my $self = shift;
40     my %opts = @_;
41     @@ -183,6 +202,19 @@ Apache::Qpsmtpd - a mod_perl-2 connection handler for qpsmtpd
42     PerlSetVar qpsmtpd.loglevel 4
43     </VirtualHost>
44    
45     +Using multiple instances of Qpsmtpd on the same server is also
46     +possible by setting:
47     +
48     + $ENV{QPSMTPD_CONFIG} = "USE-VIRTUAL-DOMAINS";
49     +
50     +Then in the VirtualHost of each config define the configuration
51     +directory:
52     +
53     + PerlSetVar qpsmtpd.config_dir /path/to/qpsmtpd/config
54     +
55     +Several different configurations can be running on the same
56     +server.
57     +
58     =head1 DESCRIPTION
59    
60     This module implements a mod_perl/apache 2.0 connection handler
61     @@ -208,6 +240,7 @@ connections, but could do with some enhancements specific to SMTP.
62     Matt Sergeant, <matt@sergeant.org>
63    
64     Some credit goes to <mock@obscurity.org> for Apache::SMTP which gave
65     -me the inspiration to do this.
66     +me the inspiration to do this. <peter@boku.net> added the virtual
67     +host support.
68    
69     =cut
70     --
71     1.7.2.2
72    

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