Hi Simone,

> i am experiencing a problem with all my boxes. When a php script calls
> the mail() function, it actually takes more than 30 seconds to send out
> the email (and the page loading waits that time).
> 
> i have measured it with this script
> <?php
> 
> echo ini_get('sendmail_path').'<br />'.PHP_EOL;
> echo date('H:i:s').'<br />'.PHP_EOL;
> mail('ca...@erweb.it','Hi','How are you?');
> echo date('H:i:s').'<br />'.PHP_EOL;

Could you please try out this command?

time /usr/sbin/sendmail ca...@erweb.it </root/.bashrc

That will send the file /root/.bashrc to your own email address and
shows you how long it took to complete that command. The response would
be something like this:

real    0m0.731s
user    0m0.023s
sys     0m0.016s

See if that's considerably slower, faster or similar to what you see
when you email from PHP.

If it's equally slow, then the slowdown affects all email related
transactions. Which would point to a general problem. Such as your
/etc/resolv.conf containing DNS name servers that no longer work. Email
depends heavily on DNS and that could cause this problem.

-- 
With best regards

Michael Stauber
_______________________________________________
Blueonyx mailing list
Blueonyx@mail.blueonyx.it
http://mail.blueonyx.it/mailman/listinfo/blueonyx

Reply via email to