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