mirror of
https://github.com/MailScanner/v5.git
synced 2024-11-10 17:35:06 +08:00
parent
a99c83b4d7
commit
afec68b52a
3 changed files with 5 additions and 21 deletions
|
@ -4,7 +4,6 @@
|
||||||
- Add QUICKPEEK variable to msmilter-init
|
- Add QUICKPEEK variable to msmilter-init
|
||||||
- Add libdb-dev missing debian dependency
|
- Add libdb-dev missing debian dependency
|
||||||
- clamavmodule (Mail::ClamAV) deprecated with warning
|
- clamavmodule (Mail::ClamAV) deprecated with warning
|
||||||
- Fix ancient Return-Path bug (Affects Sendmail with SA disabled)
|
|
||||||
|
|
||||||
11/03/2019 Changes in v5.2.1-1
|
11/03/2019 Changes in v5.2.1-1
|
||||||
==================================
|
==================================
|
||||||
|
|
|
@ -578,10 +578,8 @@ sub Checks {
|
||||||
# Sendmail appears to add a placeholder Return-Path header which it uses
|
# Sendmail appears to add a placeholder Return-Path header which it uses
|
||||||
# for expansion later, unfortunately this placeholder uses high-bit chars.
|
# for expansion later, unfortunately this placeholder uses high-bit chars.
|
||||||
# So we remove the header and create one from the envelope for SA.
|
# So we remove the header and create one from the envelope for SA.
|
||||||
# https://github.com/MailScanner/v5/issues/418
|
@SAheaders = grep !/^Return-Path\:/i, @SAheaders;
|
||||||
# Rebuild Return-Path header in all cases outside of SA.pm
|
unshift(@SAheaders, 'Return-Path: <' . $message->{from} . ">\n");
|
||||||
# @SAheaders = grep !/^Return-Path\:/i, @SAheaders;
|
|
||||||
# unshift(@SAheaders, 'Return-Path: <' . $message->{from} . ">\n");
|
|
||||||
|
|
||||||
#push(@WholeMessage, $global::MS->{mta}->OriginalMsgHeaders($message, "\n"));
|
#push(@WholeMessage, $global::MS->{mta}->OriginalMsgHeaders($message, "\n"));
|
||||||
push(@WholeMessage, @SAheaders);
|
push(@WholeMessage, @SAheaders);
|
||||||
|
|
|
@ -460,27 +460,14 @@ my($sed) = "/bin/sed";
|
||||||
@headerswithouth = @{$message->{headers}};
|
@headerswithouth = @{$message->{headers}};
|
||||||
}
|
}
|
||||||
|
|
||||||
my $returnpathfound = 0;
|
|
||||||
foreach $header (@headerswithouth) {
|
foreach $header (@headerswithouth) {
|
||||||
$h = $header;
|
$h = $header;
|
||||||
# Re-insert the header flags for Return-Path:
|
# Re-insert the header flags for Return-Path:
|
||||||
if ($h =~ /^Return-Path:/i) {
|
$h = $message->{returnpathflags} . $h if $h =~ /^Return-Path:/i;
|
||||||
# https://github.com/MailScanner/v5/issues/418
|
|
||||||
# Rebuild Return-Path header in all cases
|
|
||||||
$returnpathfound = 1;
|
|
||||||
$h = $message->{returnpathflags} . 'Return-Path: <' . $message->{from} . ">\n";
|
|
||||||
$h =~ s/^\S/H$&/;
|
$h =~ s/^\S/H$&/;
|
||||||
}
|
|
||||||
push @{$message->{metadata}}, $h;
|
push @{$message->{metadata}}, $h;
|
||||||
}
|
}
|
||||||
# https://github.com/MailScanner/v5/issues/418
|
|
||||||
# Add Return-Path header if missing
|
|
||||||
if (!$returnpathfound) {
|
|
||||||
$h = $message->{returnpathflags} . 'Return-Path: <' . $message->{from} . ">\n";
|
|
||||||
$h =~ s/^\S/H$&/;
|
|
||||||
unshift @{$message->{metadata}}, $h;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub AddHeader {
|
sub AddHeader {
|
||||||
|
|
Loading…
Reference in a new issue