Forums.ATC.no

Teknisk => Generelt teknisk => Emne startet av: ATC på 27. ſeptember 2008, 18:24 pm

Tittel: Sendmail from .cgi scripts is extremely slow
Skrevet av: ATC27. ſeptember 2008, 18:24 pm
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.
Tittel: [Solved] Sendmail from .cgi scripts is extremely slow
Skrevet av: ATC27. ſeptember 2008, 18:24 pm
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"