Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirecting Bounces

Status
Not open for further replies.

pablo1999

IS-IT--Management
Jan 17, 2005
15
0
0
US
I'm using sendmail to send emails.

Let say user1@mydomain.com sends an email to doesnotexist@external-domain.com. Then the mail server gets bounce with the following information:

<doesnotexist@external-domain.com>
(reason: 550 Requested action not taken: mailbox unavailable)

----- Transcript of session follows -----
... while talking to mx1.external-domain.com.:
>>> DATA
<<< 550 Requested action not taken: mailbox unavailable
550 5.1.1 <doesnotexist@domain.com>... User unknown
<<< 503 Need Rcpt command.


How can I redirect these bounce backs to a different mailbox other than the mailbox user1@mydomain.com ?

thanks in advanced,
 
well, one way would be to use procmail.
Procmail could check the subject for a rejection message and then check the body of the message for certain text.
You could then have it save the message to a mailbox.

this is not quite what you would want but should give you a good idea on how to do it:
# no one reads them properly anyway
:0 H:warns.lck
* ^From: Mail Delivery Subsystem
* ^Subject:.* could not send message for past 3 hours
/var/spool/mail/warnings

-------------

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top