- upgrade to last version [SME: 11802] - reapply our specific patches, rewrite them if necessary added qpsmtpd-0.96-bz12450-auth_imap-perport.patch from SME10 - apply last fixes in git since v 1.0.0 postfix: avoid logging full headers;Load plugins in qpsmtpd-forkserver; Fix received_line hook behaviour; Add missing use statement for NetAddr::IP
54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
diff --git a/lib/Qpsmtpd/Postfix.pm b/lib/Qpsmtpd/Postfix.pm
|
|
index 2946bba..6a98816 100644
|
|
--- a/lib/Qpsmtpd/Postfix.pm
|
|
+++ b/lib/Qpsmtpd/Postfix.pm
|
|
@@ -206,7 +206,7 @@ sub inject_mail {
|
|
|
|
my $hdr = $transaction->header->as_string;
|
|
for (split(/\r?\n/, $hdr)) {
|
|
- print STDERR "hdr: $_\n";
|
|
+ # print STDERR "hdr: $_\n";
|
|
$strm->print_msg_line($_);
|
|
}
|
|
$transaction->body_resetpos;
|
|
diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm
|
|
index 70e25c5..913879d 100644
|
|
--- a/lib/Qpsmtpd/SMTP.pm
|
|
+++ b/lib/Qpsmtpd/SMTP.pm
|
|
@@ -860,8 +860,8 @@ sub received_line {
|
|
my $header_str;
|
|
my ($rc, @received) =
|
|
$self->run_hooks("received_line", $smtp, $authheader, $sslheader);
|
|
- if ($rc == OK) {
|
|
- return join("\n", @received);
|
|
+ if ($rc == OK) {
|
|
+ $header_str = join("\n", @received);
|
|
}
|
|
else { # assume $rc == DECLINED
|
|
$header_str =
|
|
diff --git a/plugins/whitelist b/plugins/whitelist
|
|
index 3f9c10e..e79da8e 100644
|
|
--- a/plugins/whitelist
|
|
+++ b/plugins/whitelist
|
|
@@ -99,6 +99,7 @@ use strict;
|
|
use warnings;
|
|
|
|
use Qpsmtpd::Constants;
|
|
+use NetAddr::IP;
|
|
|
|
my $VERSION = 0.02;
|
|
|
|
diff --git a/qpsmtpd-forkserver b/qpsmtpd-forkserver
|
|
index f0f9e58..ef151a6 100755
|
|
--- a/qpsmtpd-forkserver
|
|
+++ b/qpsmtpd-forkserver
|
|
@@ -193,7 +193,7 @@ POSIX::setgid($qgid) or die "unable to change gid: $!\n";
|
|
POSIX::setuid($quid) or die "unable to change uid: $!\n";
|
|
$> = $quid;
|
|
|
|
-#$qpsmtpd->load_plugins;
|
|
+$qpsmtpd->load_plugins;
|
|
|
|
foreach my $addr (@LISTENADDR) {
|
|
::log(LOGINFO, "Listening on $addr->{addr}:$addr->{port}");
|