Re: Mail problems RESOLVED

From: Date: Sun, 16 Jul 2000 05:35:19 +0000
Subject: Re: Mail problems RESOLVED
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-6798@lists.php.net to get a copy of this message
Thanks for this suggestion. It helped me locate the problem. sendmail apparently does a reverse DNS lookup on each IP address the server is bound to, perhaps to help it figure out who the sender is. Several IP's on my server had no reverse DNS records set up. sendmail seems to retry 4 times and then gives up. On each retry it waits for the DNS server query to time out. This is where it gets bogged down and takes a long time. You can debug sendmail using the -d switch with some options to control the amount of output. If anyone has trouble with this, I suggest you do sendmail -d0-99.99 you@yourdomain.com < /dev/null This will produce a copious amount of output. Where it stalls, is where you have a problem. Hope this helps anyone with similar problems in the future. Jeff Nicolae Mihalache wrote: > > Jeff Wolkove wrote: > > > > > When I check the sendmail queue, it's empty. WHen I run a top > > during this long waiting period, sendmail doesn't even appear in > > the list of active processes. However I have checkpointed the > > script extensively and know with 100% certainty that it's hung > > up at the mail function. > > > > Have you tried to run sendmail from shell? > If it works ok you can use popen to send mail avoiding mail function. > $fd=popen("sendmail -t user@domain.com"); > and then write into $fd all the headers and body of message. > But this is how mail function work and I don't see why it should work > better... > > Mache

« previous php.general (#6798) next »