Fwd: null sender in releasing email from sql quarantine
Tom Johnson
tj at terramar.net
Fri Feb 12 18:19:53 CET 2016
Mark-
Since you're working on 2.11.0, would you take a look at this and see if it is indeed a bug that could be fixed in 2.11.0 or if I've missed something?
Thanks-
Tom
> Begin forwarded message:
>
> From: Tom Johnson <tj at terramar.net>
> Subject: null sender in releasing email from sql quarantine
> Date: January 22, 2016 at 11:29:56 AM PST
> To: Amavis-users <amavis-users at amavis.org>
>
> We're using a sql quarantine.
>
> We'd like to release emails from the quarantine and have the SMTP envelope MAIL FROM reflect the original sender.
>
> So we set mailfrom_to_quarantine to undef.
>
> But, since the email is quarantined without a Return-Path or X-Envelope-From header.
>
> Postfix doesn't add those - because it's handling the email only via a relay to amavisd-new.
>
> Amavisd-new doesn't add them - the check for whether to add the X-Envelope-From header looks like this:
>
> my $mftq = c('mailfrom_to_quarantine');
> if (!defined $mftq || $quar_m_protocol =~ /^(?:bsmtp|sql)\z/) {
> # we keep the original envelope sender address if replacement sender
> # is not provided, or with quarantine methods which store to fixed
> # locations which do not depend on envelope
> $quar_msg->sender($msginfo->sender); # original sender
> $quar_msg->sender_smtp($msginfo->sender_smtp);
> $orig_env_sender_retained = 1;
> }.....
> ...
> ...
> if (!$orig_env_sender_retained) { # unless X-Envelope-* would be redundant
> $hdr_edits->prepend_header('X-Envelope-From', $msginfo->sender_smtp);
> }
>
>
> And when you use amavisd-release to release a message, it's checked only for those two headers for the sender.
>
> So it's always sent from a null sender. The releasing code only checks the headers of the message for an Return-Path or X-Envelope-From header. It doesn't even default to using mailfrom_to_quarantine, so setting that doesn't do any good either.
>
> This looks like a bug to me. Or am I missing something?
>
>
> Tom
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20160212/9c185848/attachment.html>
More information about the amavis-users
mailing list