Esa a écrit :
Jean-Christophe Boggio wrote:
Return-Path comes from the envelope sender of the message. This is
normally the "From" address you've set up in your MUA (mail program).
How exactly are you doing the sending? If you use couriermlm this kind
of housekeeping is done automatically.
The mail comes from a simple perl script called from a crontab. I use
MIME::Lite to do the encoding and sending :
#!/usr/bin/perl -w
use MIME::Lite;
my $body = MIME::Lite -> new (
Type => "multipart/related",
From => 'testname <test...@toto.com>',
to => 'Me <cat@my.local.domain>',
Subject => "Test subject"
);
$body -> attach(Type => 'text/html', Data => '<html><head></head><body><img
src="cid:1.jpg" /></body></html>');
$body -> attach(Path => 'test.jpg', Type => 'image/jpg', Id => '1.jpg');
$body -> add("Return-Path" => 'blabla@defaultdomain');
$body -> send;
Old-Return-Path is "blabla@defaultdomain"
Return-Path is "cat@defaultdomain"
I tried a "Errors-To" header but it does not seem to be too standard (since it
fails on the first server I tried it on). What is the normal way of doing that ?
Just setup the "From:" header and errors will (are supposed to) bounce there ?
.....
Made a few more tests. If I try to send to a known-to-fail address, I don't
have the Return-Path header (but I have the Old-Return-Path) and the mail
is sent to <user_executing_script>@<defaultdomain>
Who is the culprit then ?