LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-01-2007, 11:40 AM   #1
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Rep: Reputation: 15
Red face 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.
 
Old 02-01-2007, 12:08 PM   #2
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
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?
 
Old 02-01-2007, 12:43 PM   #3
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
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.
 
Old 02-01-2007, 12:45 PM   #4
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
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?
 
Old 02-01-2007, 12:48 PM   #5
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
Any way to test SMTP besides php?
 
Old 02-02-2007, 07:23 AM   #6
Posterboy
Member
 
Registered: Oct 2001
Location: Lilburn, Ga.
Distribution: RH
Posts: 77

Rep: Reputation: 15
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.
 
Old 02-02-2007, 11:56 AM   #7
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
Ok here is the output:

Code:
     [ Fri Feb 02 - 9:54am - ~ ]                                                                                              BELVEDERE | root -=-> echo hello | sendmail -v root
root... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Fri, 2 Feb 2007 09:54:49 -0800
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.localdomain> SIZE=6 AUTH=root@localhost.localdomain
250 2.1.0 <root@localhost.localdomain>... Sender ok
>>> RCPT To:<root@localhost.localdomain>
>>> DATA
250 2.1.5 <root@localhost.localdomain>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l12Hsnic004575 Message accepted for delivery
root... Sent (l12Hsnic004575 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 localhost.localdomain closing connection
What do I need to modify in the sendmail.cf to be able to send mail out of the internal network. Also, how I change it from saying localhost.localdomain. Thanks!
 
Old 02-02-2007, 08:04 PM   #8
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
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...
 
Old 02-05-2007, 12:04 PM   #9
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
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.
 
Old 02-06-2007, 07:25 PM   #10
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
Bump, Anybody?
 
Old 02-06-2007, 07:34 PM   #11
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
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?
 
Old 02-06-2007, 07:47 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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
say?
And
Code:
sendmail -v -qRusername@doma.in
?
If you
Code:
mailq| grep "("
, do all queued messages show the same error code?
 
Old 02-06-2007, 07:49 PM   #13
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
I was just thinking
Code:
dig mx doma.in
But that's good too :P
 
Old 02-07-2007, 12:23 PM   #14
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
Exclamation

Code:
echo "/mx doma.in"|/usr/sbin/sendmail -bt
RESULT

[ 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
RESULT

[ 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 "("
RESULT

[ 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)

Last edited by JustinK101; 12-10-2007 at 06:53 PM.
 
Old 02-07-2007, 12:37 PM   #15
JustinK101
Member
 
Registered: Jan 2007
Posts: 55

Original Poster
Rep: Reputation: 15
In responce to:

Code:
dig mx fieldtechnologies.com
RESULT

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.
 
  


Reply

Tags
email, sendmail, sendmailmc, smarthost, smtp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail stopped sending....sitting in queue caykroyd Linux - Server 6 09-01-2006 12:56 PM
problem with sendmail over ppp - message queue stuck julot Slackware 1 07-17-2006 04:44 AM
Sendmail sending dubious messages rotsky Linux - Security 1 05-16-2006 05:52 PM
sendmail: stat=Deferred: Connection timed out with email.mydomain.com intranet_man Linux - Software 1 07-19-2005 11:04 AM
sendmail Deferred: Connection refused by localhost.localdomain. 360 Linux - Software 6 03-31-2003 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration