amavisd-release: missing X-Envelope-From or Return-Path

Masegaloeh masegaloeh at gmail.com
Fri Jan 11 17:52:38 CET 2013


On Friday, January 11, 2013, Bernhard Schmidt <berni at birkenwald.de> wrote:
> Bernhard Schmidt <berni at birkenwald.de> wrote:
>
>> The only thing I am not getting is that I should be hitting the codepath
>> adding X-Envelope-From, because mailfrom_to_quarantine is nowhere in my
>> configuration nor set in amavisd-new, so it should be undef... but it's
>> not in the quarantine file.
>
> Seems I misunderstood. _retained means the quarantine does contain the
> envelope already, so X-Envelope-From is not necessary to be added. Which
> IS true, since the information is in Return-Path.
>
> I think the problem is just that msg_from_quarantine should also be
> using Return-Path, so something like
>
>       } elsif (!$bsmtp && /^Return-Path:[ \t]*(.*)$/si) {
>         if (!defined $sender) {
>           my(@addr_list) = parse_address_list($1);
>           @addr_list >= 1  or die "Address missing in X-Envelope-From";
>           @addr_list <= 1  or die "More than one address in
> X-Envelope-From";
>           $sender = unquote_rfc2821_local($addr_list[0]);
>         }
>       } elsif (!$bsmtp && /^Delivered-To:[ \t]*(.*)$/si) {
>       } elsif (!$bsmtp && /^X-Envelope-From:[ \t]*(.*)$/si) {
>         if (!defined $sender) {
>           my(@addr_list) = parse_address_list($1);
>           @addr_list >= 1  or die "Address missing in X-Envelope-From";
>           @addr_list <= 1  or die "More than one address in
> X-Envelope-From";
>           $sender = unquote_rfc2821_local($addr_list[0]);
>         }
>
> Should be reordered/cleaned up, that code duplication is unnecessary,
> but you get the idea.
>
> Regards,
> Bernhard
>
>

Hi Bernhard
Thanks for the explanation

Well, my problem was slightly different with your problem. As stated in my
old thread several weeks ago, my quarantine mail in MySQL table wasn't
contain a Return-Path header :)

I tried to dig up the code when amavis sending mail to MySQL, but I got
lost. So my safe workaround was added X-Envelope-From in quarantine mail:

-- 
Zagalo Nanda M
Amateur Radio Club
Department of Mathematics
Faculty of Mathematics and Natural Sciences
Institut Teknologi Bandung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20130111/ceec890e/attachment.html>


More information about the amavis-users mailing list