I have an Ubuntu server with php and sendmail.
When I use PHP to send an email via sendmail the mail just sits in the sendmail queue forever and never gets sent. Even if I force flush it it still sits in the queue.
What could the cause of this be and how can I fix it?
Thanks.
EDIT: The output of "cat /var/spool/mqueue/qfn82FuSu3009905" is:
V8
T1251906988
K1251927546
N6
P570369
I8/1/121795
MDeferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
Fwbs
$_localhost [127.0.0.1]
$rESMTP
$sworld0.com
${daemon_flags}
${if_addr}127.0.0.1
S<www-data@world0.com>
A<>
MDeferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
rRFC822; user@gmail.com
RPFD:<user@gmail.com>
H?P?Return-Path: <g>
H??Received: from world0.com (localhost [127.0.0.1])
by world0.com (8.14.3/8.14.3/Debian-6) with ESMTP id n82FuSu3009905
for <user@gmail.com>; Wed, 2 Sep 2009 08:56:28 -0700
H?x?Full-Name: www-data
H??Received: (from www-data@localhost)
by world0.com (8.14.3/8.14.3/Submit) id n82FuR5T009904;
Wed, 2 Sep 2009 08:56:27 -0700
H??Date: Wed, 2 Sep 2009 08:56:27 -0700
H??Message-Id: <200909021556.n82FuR5T009904@world0.com>
H??To: user@gmail.com
H??Subject: Website feedback form
H??MIME=Version: 1.0
H??Content-type: text/html; charset=iso-8859-1
H??From: dude@domain.com
.
I do not see where anything is going wrong.
EDIT 2:
Well, I can ping the server but not talk to it over telnet, how could that be? I have no firewall running.
root@world0:~# telnet alt4.gmail-smtp-in.l.google.com 25
Trying 72.14.221.114...
telnet: Unable to connect to remote host: Connection timed out
root@world0:~# ping 72.14.221.114
PING 72.14.221.114 (72.14.221.114) 56(84) bytes of data.
64 bytes from 72.14.221.114: icmp_seq=1 ttl=241 time=167 ms
64 bytes from 72.14.221.114: icmp_seq=2 ttl=241 time=171 ms
64 bytes from 72.14.221.114: icmp_seq=3 ttl=241 time=169 ms
64 bytes from 72.14.221.114: icmp_seq=4 ttl=241 time=222 ms
^C
--- 72.14.221.114 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3015ms
rtt min/avg/max/mdev = 167.840/182.722/222.589/23.055 ms