/[smeserver]/rpms/smeserver-qpsmtpd/sme7/smeserver-qpsmtpd-1.2.1-FixDisclaimerEmptyLines.patch
ViewVC logotype

Annotation of /rpms/smeserver-qpsmtpd/sme7/smeserver-qpsmtpd-1.2.1-FixDisclaimerEmptyLines.patch

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


Revision 1.3 - (hide annotations) (download)
Tue Oct 7 15:06:53 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
New streams

1 bytegw 1.2 diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer
2     --- smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer 2008-07-23 20:44:44.000000000 +0100
3     +++ mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer 2008-07-23 20:44:08.000000000 +0100
4 bytegw 1.1 @@ -10,6 +10,16 @@
5     %{$self->{_args}} = @args;
6     }
7    
8     +sub read_disclaimer {
9     + my ($self, $disclaimer_file) = @_;
10     + my $disclaimer_dir = $self->{_args}->{disclaimer_dir} || "/service/qpsmtpd/config/";
11 bytegw 1.2 + return () unless open DISCLAIMER, "<$disclaimer_dir/$disclaimer_file";
12 bytegw 1.1 + my @lines = <DISCLAIMER>;
13     + chomp @lines;
14     + close DISCLAIMER;
15 bytegw 1.2 + return @lines;
16 bytegw 1.1 +}
17     +
18     sub hook_data_post {
19     my ($self, $transaction) = @_;
20    
21     @@ -45,10 +55,10 @@
22    
23     my $specific = 0;
24     my @lines;
25     - if ( @lines = $self->qp->config("disclaimer_$fromhost") ) {
26     + if ( @lines = $self->read_disclaimer("disclaimer_$fromhost") ) {
27     $self->log(LOGDEBUG, "Found disclaimer for domain: $fromhost");
28     $specific = 1;
29     - } elsif ( @lines = $self->qp->config("disclaimer") ) {
30     + } elsif ( @lines = $self->read_disclaimer("disclaimer") ) {
31     $self->log(LOGDEBUG, "Found general disclaimer");
32     } else {
33     $self->log(LOGERROR, "No disclaimer found for domain: $fromhost");

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