in reply to Re: Re: Re: MIME::Lite + bounce email address
in thread MIME::Lite + bounce email address

I can not modify the 'Return-Path' header because is used for authentication. (The emails have attached some PDFs I want to fax so I use a paid fax web service and the 'Return-Path' header is used as account authentication)

To send the emails I use MIME-Lite (I send html email/with PDF attached) and sendmail:

MIME::Lite->send('sendmail', '/usr/lib/sendmail -t '); $rez = $msg->send();

About (-r) option: it's a good sugesstion. I already tried with (-f) option (in man pages seems the same with -r). The problem was I didn't used right. I tried

$rez = $msg->send_by_sendmail('/usr/lib/sendmail -t -oem -r email. +where.to.bounce@somewhere.com');
but I should used
$rez = $msg->send_by_sendmail('/usr/lib/sendmail -t -oem -r \'emai +l.where.to.bounce@somewhere.com\'');
This is working: The bounced emails are redirected ! but the 'Return-Path' is changed to 'email.where.to.bounce@somewhere.com' and I don't want this !!

Thanks!

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: MIME::Lite + bounce email address
by tachyon (Chancellor) on Apr 16, 2004 at 14:55 UTC

    You don't want to change the Return-Path but when a message gets returned it will go to *suprise* the Return-Path?

    Why not just parse the bounces out using procmailrc just before they hit the return path address? This is primative, see RFFC 1894 for the full details on the 'approved bounce spec'. Don't expect all bounces to follow it though.

    # Redirect bounces to local bounce account :0 * ^Subject.*(Undelivered|Returned).*Mail bounce

    cheers

    tachyon