[Mimedefang] Patch against MD 2.68 Beta 5 - Allow action_insert_header() during filter_sender().
-
kd6lvw at yahoo.com
Wed Feb 24 03:12:20 EST 2010
I made this suggestion sometime last year, but it never made it into the 2.68 Betas.
Allowing action_insert_header() [or action_add_header()] during filter_sender() is technically necessary for the proper addition of SPF test results into a message. The current stock source does not permit this operation. The patch to allow this is trivial:
--- mimedefang.pl.in 2010-02-24 08:05:47.000000000 +0000
+++ mimedefang.pl.in 2010-02-24 08:06:50.000000000 +0000
@@ -1019,7 +1019,6 @@
sub action_insert_header ($$;$) {
my($header, $value, $pos) = @_;
$pos = 0 unless defined($pos);
- return if (!in_message_context('action_insert_header'));
write_result_line('N', $header, $pos, $value);
}
@@ -5736,8 +5735,10 @@
@ESMTPArgs = map { percent_decode($_) } split(' ', $_);
chdir($CWD);
+ open(RESULTS, ">>RESULTS");
sender_ok($sender, $ip, $name, $helo);
chdir($Features{'Path:SPOOLDIR'});
+ close(RESULTS);
next;
}
if ($_ =~ /^recipok (\S*)\s+(\S*)\s+(\S*)\s+(\S*)\s+(\S*)\s+(\S*)\s+(\S*)\s+(\S*)\s+(\S+)\s+(\S+)\s+(\S+)/) {
@@ -5939,7 +5940,7 @@
}
# Prepare the RESULTS file descriptor
- if (!open(RESULTS, ">RESULTS")) {
+ if (!open(RESULTS, ">>RESULTS")) {
fatal("$MsgID: Could not open RESULTS file: $!");
return -1;
}
Please make the patch into the stock MimeDefang. Thanks.
More information about the MIMEDefang
mailing list