This commit is contained in:
Shawn Iverson 2019-12-18 02:43:21 -05:00 committed by GitHub
parent a99c83b4d7
commit afec68b52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 21 deletions

View file

@ -4,7 +4,6 @@
- Add QUICKPEEK variable to msmilter-init
- Add libdb-dev missing debian dependency
- 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
==================================

View file

@ -578,10 +578,8 @@ sub Checks {
# Sendmail appears to add a placeholder Return-Path header which it uses
# for expansion later, unfortunately this placeholder uses high-bit chars.
# So we remove the header and create one from the envelope for SA.
# https://github.com/MailScanner/v5/issues/418
# Rebuild Return-Path header in all cases outside of SA.pm
# @SAheaders = grep !/^Return-Path\:/i, @SAheaders;
# 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, @SAheaders);

View file

@ -460,27 +460,14 @@ my($sed) = "/bin/sed";
@headerswithouth = @{$message->{headers}};
}
my $returnpathfound = 0;
foreach $header (@headerswithouth) {
$h = $header;
# Re-insert the header flags for Return-Path:
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 = $message->{returnpathflags} . $h if $h =~ /^Return-Path:/i;
$h =~ s/^\S/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 {