LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-12-2004, 06:22 AM   #1
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Rep: Reputation: 15
RH9 Sendmail: connection refused


Can't even send mail between root and another user on my system.
'tail /var/log/maillog' just showsa bunch of connection refused errors
like this

Mar 12 07:09:43 scott sm-msp-queue[556]: i282Hifx024871: to=root, ctladdr=root (0/0), delay=4+09:51:58, xdelay=00:00:00, mailer=relay, pri=9750081, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Mar 12 07:09:58 scott sendmail[560]: i2CC9wEF000560: from=root, size=39, class=0, nrcpts=1, msgid=<200403121209.i2CC9wEF000560@amnesia.fearandlearning.us>, relay=root@localhost
Mar 12 07:09:58 scott sendmail[560]: i2CC9wEF000560: to=scott, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30033, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Why isn't my server listening?

Scott
 
Old 03-12-2004, 06:30 AM   #2
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
I just replicated your errors! Start sendmail up!!!
#service sendmail start
or
#/etc/rc.d/init.d/sendmail start
 
Old 03-12-2004, 06:40 AM   #3
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
I did that. No difference. ...

[scott@amnesia scott]$ ps -ax|grep sendmail
546 ? S 0:00 [sendmail]
555 ? S 0:00 [sendmail]
623 pts/1 S 0:00 grep sendmail
[scott@amnesia scott]$ /sbin/service sendmail status
sendmail (pid 555 546) is running...
[scott@amnesia scott]$

I guess it's just not listening. Why?
 
Old 03-12-2004, 06:49 AM   #4
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
have you been messing around with iptables? Also, I'd check your /etc/hosts to see if the loopback address is in there.

$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
 
Old 03-12-2004, 10:40 AM   #5
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
I'm scared of iptables.
...Oh yeah. localhost is there. When I telnet to it, howver, I get '
Connection refused'.

... but here's something interesting:
When I telnet from another host, to port 25 I get:
'220 amnesia.fearandlearning.us ESMTP Sendmail 8.12.8/8.12.8; Fri, 12 Mar 2004 11:37:55 -0500'
 
Old 03-13-2004, 01:55 PM   #6
DaddyBad
Member
 
Registered: Jan 2004
Location: New Haven
Distribution: rh9, fc2
Posts: 35

Original Poster
Rep: Reputation: 15
The saga continues....

I can now send mail between users. The problem was the DAEMON_OPTIONS
setting in /etc/mail/sendmail.mc:
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl


Note how the entry with 127.0.0.1 address is commented out. I, misunderstanding the docmentation had replaced 127.0.0.1 with my local ip addr. I dudn't understand that the address must be removed entirely form the entry.

Ok. So on to the problem(s)....
 
Old 07-01-2010, 07:19 PM   #7
skidadon
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Rep: Reputation: 1
Quote:
Originally Posted by DaddyBad View Post
The saga continues....

I can now send mail between users. The problem was the DAEMON_OPTIONS
setting in /etc/mail/sendmail.mc:
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl


Note how the entry with 127.0.0.1 address is commented out. I, misunderstanding the docmentation had replaced 127.0.0.1 with my local ip addr. I dudn't understand that the address must be removed entirely form the entry.

Ok. So on to the problem(s)....
I personally was able to fix this by referencing both the 127.0.0.1 and the eth0 ip (e.g. 192.168.100.134) in the sendmail.cf file, as so:

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

run ifconfig to see what the eth0 port is

Don't forget to restart sendmail after you make the change.

good luck!!

Last edited by skidadon; 07-01-2010 at 07:20 PM.
 
1 members found this post helpful.
Old 07-01-2010, 11:50 PM   #8
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
For anybody else who wants to reply: please realise that this thread is over six years old !
 
Old 08-30-2010, 05:26 AM   #9
manurobs
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
RHEL 5.3 is not detecting the network card of my acer inspire laptop. y??
 
Old 08-30-2010, 08:35 PM   #10
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
@manurobs: do hijack a thread, especially an old one. Please start a new one.
 
  


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
Connection refused in sendmail pjon Suse/Novell 3 05-26-2005 06:42 AM
rsh : connection refused problem on RH9 haoscar Linux - Software 3 07-19-2004 11:12 PM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - Networking 5 10-22-2003 11:02 AM
sendmail Deferred: Connection refused by localhost.localdomain. 360 Linux - Software 6 03-31-2003 01:07 PM
Sendmail - POP connection refused 360 Linux - Networking 5 04-02-2002 04:53 PM


All times are GMT -5. The time now is 03:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration