Ano-Tech Computers
Enter keyword:

Sendmail from .cgi scripts is extremely slow
Problem:
When sending email messages from a perl script, something like the following code is used: open MAIL, '|/usr/sbin/sendmail -oi -t -odq'; print MAIL @message_with_headers; close MAIL; The email is queued properly but sendmail doesn't send it until MUCH later.
 
Solution:
Increase (or completely remove) the interval at which sendmail checks the message queue. On RH Linux systems, this is done by manually editing "/etc/rc.d/init.d/sendmail" and changing the default QUEUE= setting from "1h" to e.g. "5m".

For this change to take effect, stop and start the sendmail service:
1. "/etc/rc.d/init.d/sendmail stop"
2. Wait a few seconds
3. "/etc/rc.d/init.d/sendmail start"


 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles