Hi,

I'm using Perl (with Taint check) + sendmail for sending email in a CGI script. Part of the script looks like below:
open (SENDMAIL, '|/usr/sbin/sendmail -oi -t') or die "Cannot fork to s +endmail: $!"; print SENDMAIL <<"EOF"; From:<$email> To:<$email2> Errors-To:<$email> Subject: $subject $body EOF close (SENDMAIL);
That works fine for sending emails to valid/working email address.

However when sending to bogus email addresses, I cannot receive any indication (i.e. no email bounced back to $email telling me that the email was undeliverable).

If I use this instead:
open (SENDMAIL, '|/usr/sbin/sendmail -oi -t -OUseErrorsTo=true')
Perl complaints with this error message (without sending emails to both valid/invalid email address):
Can't create transcript file ./xff5DLdxv22364: Permission denied
Any idea about how to use Perl + sendmail to handle bogus email address?? Having the original email bounced back to the $email is my goal

P.S. I'm writing that Perl CGI script for an Apache server on Red Hat Linux 7.0 with Sendmail 8.11. (I DON'T have root access on this server)

Any help is appreciated! Thanks ahead!

In reply to sendmail in Perl to handle false/bogus/undeliverable email address by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.