PDA

View Full Version : [SOLVED] Redirecting email delivery failures



bencouve
June 12th, 2012, 01:01 PM
Hello Experts!

Is it possible to redirect delivery failures using postfix sendmail. If the command was something like this ..

sendmail -f sender@example.com (-?) email_failures@example.com receiver@the_client.com


where the (-?) is a flag to redirect failed emails?

Thanks in advance for your input.

SeijiSensei
June 12th, 2012, 04:39 PM
Usually non-delivery notices are sent to the "postmaster" account on the server. Look in /etc/aliases and see where that points; typically it's an alias for "root". Replace that entry with:


postmaster: email_failures@example.com

then run the command "sudo newaliases".

bencouve
June 12th, 2012, 05:22 PM
Ok. I see what you mean. However, I have set up thunderbird with POP3 for receiving and SMTP for sending...

When sending I want the recipient to receive from
Alex@thecompany.com
Alex being my business compatriot
and delivery failures, if any, going to me
ben@thecomany.com
Ben being me.
So that Alex won't get p... off that he gets delivery failures. So, I was hoping to be able to flag this some how.

sendmail -f alex@thecompay.com (-?) ben@thecompany.com joe_blogs@theclient.com

where the delivery failures are sent to me. I have read somewhere that this was possible with previous versions of postfix but not with the current version so just checking with the experts.

bencouve
June 12th, 2012, 08:13 PM
Forget this one. I sorted it...