LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-11-2009, 11:25 AM   #1
samengr
Member
 
Registered: Jan 2008
Posts: 59

Rep: Reputation: 15
sendmail: getting stat=Deferred: Connection timed out with server - any help?


Hi All,

I am using RHEL5 on boxes.
client: web04.example.com
server: web05.example.com

I am trying to confiugre sendmail client and server environment. A very simple environment. On server side I configured sendmail and relaying the requests from other linux machines. On a server end emails are going out fine but on client side its not working with Deffered message in log. I tried to find any solution online but couldnt get any exact info to sort out this issue.


On server side there is a entry of client machine in /etc/mail/access and I created access.db as well with make hash command.

makemap hash /etc/mail/access.db < /etc/mail/access


Now on client linux machine I just made two changes in sendmail.mc

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl define(`SMART_HOST', `web05.example.com')dnl

used m4 utility to create sendmail.cf. Also used make -C /etc/mail


Testing by mail client at client machine

# echo "testing 04 delivery" | mail -s "testing" smk@gmail.com


#tail -f /var/log/mail.info

Nov 11 16:07:21 dwweb04 sendmail[10032]: nABG7K7t010032: from=root, size=66, class=0, nrcpts=1, msgid=<200911111607.nABG7K7t010032@web04.example.com>, relay=root@localhost
Nov 11 16:07:21 dwweb04 sendmail[10033]: nABG7LBh010033: from=<root@web04.example.com>, size=368, class=0, nrcpts=1, msgid=<200911111607.nABG7K7t010032@web04.example.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Nov 11 16:07:21 dwweb04 sendmail[10032]: nABG7K7t010032: to=smk@gmail.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30066, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (nABG7LBh010033 Message accepted for delivery)

Nov 11 16:09:09 dwweb04 sendmail[10019]: nABE4r0i009143: to=<smk@gmail.com>, ctladdr=<backup@web04.example.com> (503/503), delay=02:04:16, xdelay=00:02:00, mailer=relay, pri=390353, relay=web05.example.com. [*.*.*.*] (external IP), dsn=4.0.0, stat=Deferred: Connection timed out with web05.example.com.


Note: I have changed mydomain.com to example.com here


There are some other outputs that can help

At client machine (web04)

# telnet web05.example.com 25
Trying 192.168.1.107...
Connected to web05.example.com (192.168.1.107).
Escape character is '^]'.
220 web05.example.com ESMTP Sendmail 8.13.8/8.13.8; Wed, 11 Nov 2009 16:18:03 GMT


Is there something on server end that is not responding? or if I am doing something wrong please point out.

Many thanks.
 
Old 11-11-2009, 11:32 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by samengr View Post
Hi All,

I am using RHEL5 on boxes.
client: web04.example.com
server: web05.example.com

I am trying to confiugre sendmail client and server environment. A very simple environment. On server side I configured sendmail and relaying the requests from other linux machines. On a server end emails are going out fine but on client side its not working with Deffered message in log. I tried to find any solution online but couldnt get any exact info to sort out this issue.


On server side there is a entry of client machine in /etc/mail/access and I created access.db as well with make hash command.

makemap hash /etc/mail/access.db < /etc/mail/access


Now on client linux machine I just made two changes in sendmail.mc

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl define(`SMART_HOST', `web05.example.com')dnl

used m4 utility to create sendmail.cf. Also used make -C /etc/mail


Testing by mail client at client machine

# echo "testing 04 delivery" | mail -s "testing" smk@gmail.com


#tail -f /var/log/mail.info

Nov 11 16:07:21 dwweb04 sendmail[10032]: nABG7K7t010032: from=root, size=66, class=0, nrcpts=1, msgid=<200911111607.nABG7K7t010032@web04.example.com>, relay=root@localhost
Nov 11 16:07:21 dwweb04 sendmail[10033]: nABG7LBh010033: from=<root@web04.example.com>, size=368, class=0, nrcpts=1, msgid=<200911111607.nABG7K7t010032@web04.example.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Nov 11 16:07:21 dwweb04 sendmail[10032]: nABG7K7t010032: to=smk@gmail.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30066, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (nABG7LBh010033 Message accepted for delivery)

Nov 11 16:09:09 dwweb04 sendmail[10019]: nABE4r0i009143: to=<smk@gmail.com>, ctladdr=<backup@web04.example.com> (503/503), delay=02:04:16, xdelay=00:02:00, mailer=relay, pri=390353, relay=web05.example.com. [*.*.*.*] (external IP), dsn=4.0.0, stat=Deferred: Connection timed out with web05.example.com.


Note: I have changed mydomain.com to example.com here


There are some other outputs that can help

At client machine (web04)

# telnet web05.example.com 25
Trying 192.168.1.107...
Connected to web05.example.com (192.168.1.107).
Escape character is '^]'.
220 web05.example.com ESMTP Sendmail 8.13.8/8.13.8; Wed, 11 Nov 2009 16:18:03 GMT


Is there something on server end that is not responding? or if I am doing something wrong please point out.

Many thanks.
web05.example.com must allow relaying from web04.example.com in /etc/mail/access

you will also need to change this line too

Code:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
so the Addr=0.0.0.0 or specific ip or add another line

Code:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=<ipaddress>, Name=MTA')dnl

Last edited by centosboy; 11-11-2009 at 11:44 AM.
 
Old 11-11-2009, 12:07 PM   #3
samengr
Member
 
Registered: Jan 2008
Posts: 59

Original Poster
Rep: Reputation: 15
When I do this on web04 (client side) it works...

$ telnet web05.example.com 25
Trying 192.168.1.107...
Connected to web05.example.com (192.168.1.107).
Escape character is '^]'.
220 web05.example.com ESMTP Sendmail 8.13.8/8.13.8; Wed, 11 Nov 2009 16:49:01 GMT
helo gmail.com
250 web05.example.com Hello web04.example.com [192.168.1.105], pleased to meet you
MAIL FROM: dwadmin@web04.example.com
250 2.1.0 dwadmin@web04.example.com... Sender ok
RCPT TO: skm@gmail.com
250 2.1.5 skm@gmail.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Subject: web04 delivery Test
Hi I am testing web04 delivery at 16:51 11/11/2009.
...
.
250 2.0.0 nABGn1Dd021907 Message accepted for delivery



Can see the delivery at server side in mail log as well

# cat /var/log/mail.info | grep nABGn1Dd021907
Nov 11 16:52:08 web05 sendmail[21907]: nABGn1Dd021907: from=dwadmin@web04.example.com, size=84, class=0, nrcpts=1, msgid=<200911111651.nABGn1Dd021907@web05.example.c om>, proto=SMTP, daemon=MTA, relay=web04.example.com [192.168.1.105]
Nov 11 16:52:09 web05 sendmail[23420]: nABGn1Dd021907: to=smk@gmail.com, delay=00:01:01, xdelay=00:00:01, mailer=esmtp, pri=120084, relay=gmail-smtp-in.l.google.com. [72.14.221.114], dsn=2.0.0, stat=Sent (OK 1257958329 e11si11155778fga.7)


Any idea why it doesnt work in other way? I mean with sending email through mail or mutt client?
 
Old 11-11-2009, 12:09 PM   #4
samengr
Member
 
Registered: Jan 2008
Posts: 59

Original Poster
Rep: Reputation: 15
Hi centosboy

I believe this line in sendmail.mc

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

is just allowing all smtp to listen on all network cards.
 
Old 11-11-2009, 02:00 PM   #5
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by samengr View Post
Hi centosboy

I believe this line in sendmail.mc

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

is just allowing all smtp to listen on all network cards.
nope - not allowing all smtp but smtp on localhsot only. basically what it says

if you want to send mail via a remote server - that server has to allow the client connection AND it has to be listening on a valid IP address and the client IP must be allowed to RELAY

Last edited by centosboy; 11-11-2009 at 02:03 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 gives Deferred Connection timed out only to some domains tdunk Linux - Server 4 08-19-2008 07:53 AM
Sendmail : relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refuse macadam Linux - Software 0 09-23-2007 03:44 PM
sendmail - Connection timed out [dsn=4.0.0 stat=Deferred: Connection timed out] ananthak Linux - Software 0 04-24-2007 08:28 AM
sendmail: stat=Deferred: Connection timed out with email.mydomain.com intranet_man Linux - Software 1 07-19-2005 12:04 PM
sendmail stat=Deferred error gsimpson Linux - Networking 4 07-16-2003 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:31 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration