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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with sendmail in cgi script

Status
Not open for further replies.

rlingen

Technical User
Dec 6, 2000
41
CA
I don't know anything about the guts of sendmail, I only use it in Perl scripts.

I have a cgi script that generates an email, sent via sendmail to one of the POP3 boxes on our shared server. It also sends a cc: of the message to an outside email address.

The problem is that sometimes (not often) the email to the POP3 box does not arrive, but the outside cc: does. These are emails ordering product, so it's a real problem when one goes astray.

Can you point me toward any possible sources of the problem?

I am having difficulty troubleshooting this since:

1) the script works fine -- the cc: arrives!
2) it's intermittent -- I have not been able to replicate a "disappearing order" in any tests.
3) the only evidence I have of a problem is the arrival of the cc: and the non-arrival of the message to the primary addressee. (I added the cc: because of the occasional missing order.)

Could there be something wrong with the POP3 box?
Could sendmail lose an "internal" message while simultaneously transmitting it "outside"?
Is there some condition which would make sendmail do the above?

Roy
 
It sounds like something wrong with either the mailbox or the address. The mailbox may be at or near its quota. Or perhaps in your CGI, some characters in the address cause a conflict which causes it not to be sent. For instance, you need to escape the @ in your addresses or they may be interpreted as arrays. If you run some sort of security heuristic on the address, perhaps one case isn't handled correctly.

If the problem is with the mailbox, the administrator of your domain (admin@your_domain.com) should receive an email specifying why it was undeliverable. If you get no such message, then it was probably not sent in the first place. In that case, you should examine your script. I highly doubt there is a bug in sendmail, but that could be possible too.

Why don't you post your perl sendmail routine here for us to examine? Also, take a look at faq219-364.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
BTW, it may be better for you to post your question and code in the Perl forum as it would be more relevant there and you'd be more likely to get a response. If you do so, please post a link to that thread here in this thread. And you could also reference this thread in your new one.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top