[Mimedefang] SA can't find header inserted by MD
Cahya Wirawan
cwirawan at email.archlab.tuwien.ac.at
Thu Sep 4 05:38:00 EDT 2003
Hi,
Actually I want to have SpamAssassin's whitelisting based on envelope sender
and envelope recipient, and because my sendmail don't write envelope sender
and envelope recipient I inserted 2 headers with mimedefang, I do it in
filter_sender and filter_recipient:
sub filter_sender {
my ($sender, $ip, $hostname, $helo) = @_;
$XEnvelopeFrom = $sender;
return ('CONTINUE', "ok");
}
sub filter_recipient {
my ($recipient, $sender, $ip, $hostname, $first, $helo,
$rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
$XEnvelopeTo = $recipient;
return ('CONTINUE', "ok");
}
and in filter_end I insert this to variable as X-Envelope-From and
X-Envelope-To header:
sub filter_end ($) {
my($entity) = @_;
...
action_add_header("X-Envelope-From","$XEnvelopeFrom");
action_add_header("X-Envelope-To","$XEnvelopeTo");
if ($Features{"SpamAssassin"} && !isLocalSender($RelayAddr)) {
...
}
...
}
And if I test it I can see that this two new header is correctly
inserted in to email header, but SpamAssassin can't find this 2 new header,
it seems that SA only read the original header, and not any header inserted by
MD, is this normal behaviour or did I do something wrong?
thanks for any help,
Cahya.
More information about the MIMEDefang
mailing list