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

Sendmail seems unrealiable, any idea why?

Status
Not open for further replies.

NeilFawcett

Programmer
Mar 19, 2004
30
GB
For example, I had an apparent 8 hour window this morning when none of my email notification that went out to the 20+ people who registered on my forum got to them!

Prior to this, and afterwards, the emails seem to arrive.

I seem to have a lot of emails that seem to fail to arrive via sendmail.

Mostly they do though...


Any tips? Someone mentioned putting sendmail in your own cgi-bin rather than using the machine (unix) shared one? Would this improve matters?
 
The problem you are describing has nothing to do with Sendmail itself. I'm willing to bet more people use Sendmail than any other mailing module in Perl. Infact I have never used anything but this to do my emailing and I've created a number of mailing lists for clients.

If it is taking a while to receieve the emails, it could be your mail server. Either on your server the script is running or on your physical mail server (ie. hotmail, earthlink, etc).

Sendmail might not be as powerful (though in my personal opinion, it's just as powerful if you know how to tweak it) as the others, but there's absolutely nothing wrong with it in my opinion.

Hope this helps.
 
It could also be the recipeient's email server. If your email didn't bounce back to you, then "your" sendmail worked perfectly - unless your administrator suspended your account?

There's always a better way. The fun is trying to find it!
 
could you not try sending yourself a few emails? if they come through quick then you can be pretty certain that sendmail is behaving. I have set up a CRON job that runs at noon everyday for the last 3 years - the emails come through at exactly 12 o'clock... as cgimonk and tviman state it is more likely that you have troubles elsewhere


Kind Regards
Duncan
 
Well the problem seems quite random (not very often)... Ignoring the why's...

Does anyone think that me putting a SENDMAIL.pm in my own CGI directory could improve reliablity over the standard one in "/usr/sbin/
 
I would think that it would have the opposite effect. If you're using a commercial ISP, you should bring the issue up with their SysAdmin. Maybe they have a problem their not aware of. If you own the server (or it belongs to the company you work for), go sit on your SysAdmin's desk until you get a definitive answer.

There's always a better way. The fun is trying to find it!
 
Neil,

Can you account for the uptime of the server in the 8 hour window you refer to?

--Paul
 
The server was DEFINATELY up during that window cos 20+ people used the forum software to register. They didn't get their emails to authenticate their accounts though.

Likewise another script I have for competition entries uses SendMail to email me the entries. I've had cases where people have entered, but the emails didn't get to me.


DOES ANYONE THINK PUTTING THE SENDMAIL IN MY OWN CGI-BIN WOULD in any way make things more reliable?
 
Hi
I would have thought that using your own cgi-bin would make the server work harder as it is running another app. Not that I know for sure that is. I have used SENDMAIL with no problems. I would suspect your ISP
Regards

Keith
 
The web server may have been up, but what about the email server?

There's always a better way. The fun is trying to find it!
 
DOES ANYONE THINK PUTTING THE SENDMAIL IN MY OWN CGI-BIN WOULD in any way make things more reliable?"

No - No one does.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Personally, Sendmail has been unreliable in my experience with it. That is why I now use the Net::SMTP method of sending email from Perl.

Sometimes Sendmail would send emails and other times it wouldn't. So I finally got tired of using this method under Perl.
 
Cheers, I'll give Net::SMTP a go... Never heard of it before... Looks easy though (hopefully)...
 
Net::SMTP is supported on UNIX boxes.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Net::SMTP is the best way to send email. Using sendmail results in unmaintainable code by anyone other then yourself.

I know, everyone will flame me, but sendmail breaks, all the time, when its in an environment that the developer does not 100% control.

Net::SMTP does not, it uses the real protocol that does not flux. You also get REAL programmatic control of the SMTP send process and it performs better since your not forking sendmail to do stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top