?
Solved

Set [Return-path] for Sendmail?

Posted on 2007-10-19
2
Medium Priority
?
657 Views
Last Modified: 2008-01-09
Hello all,

My Perl script uses Sendmail to dynamically send out emails to users in our db.  I can set the "To:", "From:", "Reply-to:", "Subject:", and "Content:" fields of the email programmatically and it all works wonderously.

EXCEPT - for when the "To:" address is incorrect and the email gets bounced back.  The problem is that mails bounced back because they are undeliverable get bounced back to the [Return-path], which my ISP's email server keeps setting to itself.  So I never get the bounced back email to warn me that it was not received.

Is there some way, in the context of such a script, either to set [Return-path], or some other way to emulate the behaviour - other than Cc'ing myself ('cause that would look dumb, the sender copying himself)

Thanks.
0
Comment
Question by:xfvgdrthbdtyvhgscv
2 Comments
 
LVL 85

Expert Comment

by:ozo
ID: 20113039
There's the non standard Errors-To: header, but officially error reports should go to the From:
0
 
LVL 17

Accepted Solution

by:
mjcoyne earned 1500 total points
ID: 20114509
Can we see your Perl line that calls Sendmail?  If there is no Return-Path provided, a default one will be inserted.  Have you tried including the -f flag on the line calling Sendmail::

my $Sendmail = '/usr/sbin/sendmail -t -fname\@example.com';

Note that there's no space between the flag and the address.  Also, depending on how you're doing this, you might have to escape the @ sign, as above.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question