Apache/PHP sendmail configuration

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have a standalone machine running Mandrake 10 with apache server and
PHP installed.

The PHP mail() function is working but very slowly. It takes about
10-20 seconds to send a single email. Can anyone advise me on what
could be causing this? I have tried using mail() on other apache
setups and the response time has been much faster.

Below is the relevant section from my php.ini:



[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.com

; For Unix only.  You may supply arguments as well (default: "sendmail
-t -i").
;sendmail_path =

Re: Apache/PHP sendmail configuration

Andrew Benjamin wrote:

Quoted text here. Click to load it


It sounds like a DNS problem to me. It seems like sendmail is trying to
resolve your client computer's ip.
You could solve this by adding it to /etc/hosts on the server or hacking
the sendmail configuration.


Re: Apache/PHP sendmail configuration


On 07/12/2004 07:12 AM, Andrew Benjamin wrote:
Quoted text here. Click to load it

How slowly? Does it wait like 1 minute before delivering?

Or it waits some time but less than 1 minute?

If it waits one minute, that is likely a missing reverse DNS register
for your IP.

If it is not that much, it may be because sendmail by default attempts
to deliver messages immediately and depending on your destination it may
take a while to have your message accepted.

In this case the solution is to use the appropriate message delivery
mode, which is certainly not the immediate/interactive mode. Take a look
at this class that comes with a sub-class specialized in deliverying via
sendmail. It lets you configure  the sendmail delivery mode before
sending. Take a look at the documentation of the class for mode details.



Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org /

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews /

Metastorage - Data object relational mapping layer generator

Re: Apache/PHP sendmail configuration


It waits about 1 minute. I think it is a DNS problem.

I've added the following line to my /etc/hosts:
    "    localhost.co.uk"
But this hasn't made a difference.

Is there a HOW-TO setup apache and sendmail for a standalone machine?



Quoted text here. Click to load it

Site Timeline