Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

sendmail and bounced mail

by eweaverp (Scribe)
on Jun 14, 2003 at 20:08 UTC ( [id://265950]=perlquestion: print w/replies, xml ) Need Help??

eweaverp has asked for the wisdom of the Perl Monks concerning the following question:

How do I call sendmail so that bounced mail is ignored? As is my script (code follows) returns bounced messages to the username the script is run under, i.e., me. I'd prefer to stick them somewhere in a flat file or ignore them instead of cluttering my personal inbox. I've looked into some sendmail flags, but things like -oeq don't seem to work. Thanks

~evan

Replies are listed 'Best First'.
Re: sendmail and bounced mail
by fokat (Deacon) on Jun 15, 2003 at 00:10 UTC

    The standard way to achieve this, is to add a header such as...

    Errors-To: nobody@some.where.far.far.far.away
    

    Where the email address you supply, should be a blackhole. Many sites maintain a nobody@site address for that purpose. Ask your friendly postmaster about this.

    By looking at your sample code, you might also want to add a header such as...

    Reply-To: nobody@site
    

    Best regards

    -lem, but some call me fokat

Re: sendmail and bounced mail
by sgifford (Prior) on Jun 15, 2003 at 20:30 UTC

    You want to use sendmail's -f flag. That will specify the email address where bounced mail should be returned to. If you want bounces to go into a flat file, set up an alias for that address to go to a flat file.

    If you want to discard bounces, set up an alias for that address to go to /dev/null. You can also use -f '' to ask the mail system not to generate bounces at all.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://265950]
Approved by phydeauxarff
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-23 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found