On Apr 18, 2012, at 14:38, Amira Othman wrote: >>> I am building system that will send mails to list of users but I need to >>> stop receiving error emails or redirect them to another account or >>> /dev/null. I know it is bad idea but the application I am using will handle >>> bounce mails so I don't need error email to be sent to the end user . >> >> I don't know how to redirect them to because it's not in the format >> user@domain it's null sender. > >> where can I add this if it's possible? > > But the original sender will not be user on my mail server .it will be any > client that sends mail through application. I don't want client to receive > bounces. How can I do that?
Read up on the difference between the envelope sender (MAIL FROM) and the sender specified in the 'From:' header. The former is what is used to handle bounces and errors, the latter is what the recipient sees in their mail application. The bounces should return to your server where you can process them, based on the envelope sender. Use a domain here that you control, or have your clients delegate a subdomain. See Ralf's message for suggestions on how you can retrieve the original recipient from the bounce address. And if you set the 'From:' and 'Reply-To:' headers right, the recipient will be able to reply to the messages your clients are sending. It will appear as if sent by them, without coming back to you. Most importantly though, be sure that you know what you are getting yourself into. Research your options. Read the Postfix documentation. Read the relevant RFCs. Understand all of the above. Use existing functionality, in proven software. Avoid reinventing the wheel, basically :-) And don't discard errors lightly. HTH, Jona