SendMail Not Sending, Messages Stuck In Queue As: Deferred: Connection
Hello, I am running CentOS with the webmin to manage most everything, sendmail is active and running. When I send an email via PHP using the mail() function I can see the message in the webmail queue, but the status of messages are always:
Deferred: Connection timed out with mail.fieldtechnologies.com. Where mail.fieldtechnologies.com is the domain of the recipient. Any idea how to fix this issue? The messages never get sent, and eventually time out. Thanks for the help. |
Ususally when I've seen the Deferred message in the logs it's because the recipient is the one deferring for whatever reason.
Have you tried contacting the recipient and making sure they don't have you blacklisted or anything? |
No, doesnt seem to be the recipient, I tried a few others on different servers, all do the same thing.
Connection timed out with mx.east.cox.net. Could this be my firewall blocking? I opened up SMTP and POP on the router for the servers ip though. |
Possibly, but I'd think that outgoing traffic would be fine. Since you're sending the message via PHP do you need a reverse DNS back to your server?
|
Any way to test SMTP besides php?
|
Try this: echo hello |sendmail -v user@yourbox
That ought to tell you something about local mail, and remember, sendmail will NOT send mail anywhere off the box, by default. Have to change sendmail.cf if you want it to talk to the internet. |
Ok here is the output:
Code:
[ Fri Feb 02 - 9:54am - ~ ] BELVEDERE | root -=-> echo hello | sendmail -v root |
SendMail is extremely powerful, but also very complicated.
Unless you have a reason for using sendmail other than the fact that it is the default RedHat / Fedora / CentOS MTA, I'd suggest moving to another MTA. I find Postfix much simpler to configure for all my servers, except for my Mail Server, which runs qmail. Postfix makes it much easier to change the "localhost.localhost" setup, as well as relaying etc... |
Ok, I think I have sendmail almost all setup though, just a small thing I am sure is not configured correctly. I can send mail successfully inside the network, but outside traffic mail is stuck in the queue.
|
Bump, Anybody?
|
You're over my head now sorry - I'd still suggest moving to Postfix.
Maybe a DNS error? Can you dig MX records for remote sites on your mail server? |
Example: say you have a message in the queue to user "username@doma.in".
What does Code:
echo "/mx doma.in"|/usr/sbin/sendmail -bt And Code:
sendmail -v -qRusername@doma.in If you Code:
mailq| grep "(" |
I was just thinking
Code:
dig mx doma.in |
Code:
echo "/mx doma.in"|/usr/sbin/sendmail -bt [ Wed Feb 07 - 10:19am - /var/www/html ] BELVEDERE | root -=-> echo "/mx fieldtechnologies.com"|/usr/sbin/sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > getmxrr(fieldtechnologies.com) returns 1 value(s): mail.fieldtechnologies.com. > Code:
sendmail -v -qR myEmail@mydomain.com [ Wed Feb 07 - 10:21am - /var/www/html ] BELVEDERE | root -=-> sendmail -v -qR myEmail@myDomain.com Running /var/spool/mqueue/l17IJQXl027794 (sequence 1 of 1) <myEmail@myDomain.com>... Connecting to mail.fieldtechnologies.com. via esmtp... *** WAITED LIKE 1 MINUTE *** <myEmail@myDomain.com>... Deferred: Connection timed out with mail.fieldtechnologies.com. Code:
mailq| grep "(" [ Wed Feb 07 - 10:26am - /var/www/html ] BELVEDERE | root -=-> mailq | grep "(" /var/spool/mqueue (1 request) (Deferred: Connection timed out with mail.fieldtechnologies.c) |
In responce to:
Code:
dig mx fieldtechnologies.com BELVEDERE | root -=-> dig mx fieldtechnologies.com ; <<>> DiG 9.2.4 <<>> mx fieldtechnologies.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54695 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;fieldtechnologies.com. IN A ;; ANSWER SECTION: fieldtechnologies.com. 80 IN A 65.109.199.138 ;; Query time: 14 msec ;; SERVER: 192.168.0.1#53(192.168.0.1) ;; WHEN: Wed Feb 7 10:35:54 2007 ;; MSG SIZE rcvd: 55 This is the most interesting this proves it is not my firewall, but in fact a setting in sendmail. I am able to ping. |
All times are GMT -5. The time now is 11:56 PM. |