Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

telnet localhost 25 works, telnet servername 25 connection refused

2,477 views
Skip to first unread message

swangdb

unread,
Jul 28, 2010, 9:47:19 AM7/28/10
to
Using Solaris 10 (x86) with Sendmail 8.14.4, I am logged into the
machine as root.

Basically, I can telnet to port 25 of localhost but not of the machine
name or the IP address.

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 <servername> ESMTP Sendmail 8.14.4/8.14.4; Thu, 22 Jul 2010
14:43:06 -0500 (CDT)

# telnet <servername> 25
Trying <ip address>...
telnet: Unable to connect to remote host: Connection refused

-----

/etc/hosts contains

127.0.0.1 localhost
<ip address> servername servername.duc.auburn.edu loghost mailhost

-----

/etc/hosts.allow contains:

sendmail: ALL

-----

# svcprop sendmail |grep local_only
config/local_only boolean false

-----

I tried "netservices open" and still had the same problem. Sendmail
and inetd are running.

Any help would be appreciated, thanks!

Robert Bonomi

unread,
Jul 28, 2010, 5:36:34 PM7/28/10
to
In article <b60bacf1-64a1-4334...@i31g2000yqm.googlegroups.com>,

swangdb <swa...@gmail.com> wrote:
>Using Solaris 10 (x86) with Sendmail 8.14.4, I am logged into the
>machine as root.
>
>Basically, I can telnet to port 25 of localhost but not of the machine
>name or the IP address.
>
># telnet localhost 25
>Trying 127.0.0.1...
>Connected to localhost.
>Escape character is '^]'.
>220 <servername> ESMTP Sendmail 8.14.4/8.14.4; Thu, 22 Jul 2010
>14:43:06 -0500 (CDT)
>
># telnet <servername> 25
>Trying <ip address>...
>telnet: Unable to connect to remote host: Connection refused
>

The problem is obvious. sendmail is only listening on 127.0.0.1.

Check the DAEMON_OPTIONS in your .mc file

swangdb

unread,
Jul 29, 2010, 8:16:03 AM7/29/10
to
On Jul 28, 4:36 pm, bon...@host122.r-bonomi.com (Robert Bonomi) wrote:

> The problem is obvious.  sendmail is only listening on 127.0.0.1.
>
> Check the DAEMON_OPTIONS in your .mc file

Thanks. I've listed the .mc file I've been using. I tried a
DAEMON_OPTIONS (seen below) but it didn't work so I have it commented
out.

-----
divert(0)dnl
VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro
Exp $')
OSTYPE(solaris2)dnl
DOMAIN(auburn.edu)dnl
##DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
MAILER(local)dnl
MAILER(smtp)dnl
-----

When I use this DAEMON_OPTIONS, rebuild/install sendmail.cf and
restart sendmail, ps shows the following, that it's still listening to
127.0.0.1. How can I fix this?

# ps | grep sendmail
root 7496 2029 0 07:13:19 pts/4 0:00 grep sendmail
root 7487 1 0 07:11:31 ? 0:00 /usr/lib/sendmail -
bd -ODaemonPortOptions=Addr=127.0.0.1 -q15m
root 7461 1 0 07:10:03 ? 0:00 /usr/lib/sendmail -
bd -ODaemonPortOptions=Addr=127.0.0.1 -q15m
smmsp 7491 1 0 07:11:31 ? 0:00 /usr/lib/sendmail -
Ac -q15m

mikea

unread,
Jul 29, 2010, 10:07:32 AM7/29/10
to
swangdb <swa...@gmail.com> wrote in <f16f4d30-87f3-4a37...@f33g2000yqe.googlegroups.com>:
> On Jul 28, 4:36?pm, bon...@host122.r-bonomi.com (Robert Bonomi) wrote:
>
>> The problem is obvious. ?sendmail is only listening on 127.0.0.1.

>>
>> Check the DAEMON_OPTIONS in your .mc file
>
> Thanks. I've listed the .mc file I've been using. I tried a
> DAEMON_OPTIONS (seen below) but it didn't work so I have it commented
> out.
>
> -----
> divert(0)dnl
> VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro
> Exp $')
> OSTYPE(solaris2)dnl
> DOMAIN(auburn.edu)dnl
> ##DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

In a .mc file, a comment line begins with "dnl", not "##".

If you leave out the "Addr=a.b.c.d" pair and its comma, then (according
to the Bat book 3d Edition) the default address becomes INADDR_ANY,
which allows connections to any address on the local machine. That's in
section 24.9.24.1, if you care to look it up.

> MAILER(local)dnl
> MAILER(smtp)dnl
> -----
>
> When I use this DAEMON_OPTIONS, rebuild/install sendmail.cf and
> restart sendmail, ps shows the following, that it's still listening to
> 127.0.0.1. How can I fix this?
>
> # ps | grep sendmail
> root 7496 2029 0 07:13:19 pts/4 0:00 grep sendmail
> root 7487 1 0 07:11:31 ? 0:00 /usr/lib/sendmail -
> bd -ODaemonPortOptions=Addr=127.0.0.1 -q15m
> root 7461 1 0 07:10:03 ? 0:00 /usr/lib/sendmail -
> bd -ODaemonPortOptions=Addr=127.0.0.1 -q15m
> smmsp 7491 1 0 07:11:31 ? 0:00 /usr/lib/sendmail -
> Ac -q15m

Are you _starting_ sendmail with "-ODaemonPortOptions=Addr=127.0.0.1"?
It sure looks like it, but your `ps` may do things differently from
mine.

--
Mike Andrews, W5EGO
mi...@mikea.ath.cx
Tired old sysadmin

swangdb

unread,
Jul 29, 2010, 11:16:16 AM7/29/10
to
On Jul 29, 9:07 am, mikea <mi...@mikea.ath.cx> wrote:

> > Thanks.  I've listed the .mc file I've been using.  I tried a
> > DAEMON_OPTIONS (seen below) but it didn't work so I have it commented
> > out.
>
> > -----
> > divert(0)dnl
> > VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro
> > Exp $')
> > OSTYPE(solaris2)dnl
> > DOMAIN(auburn.edu)dnl
> > ##DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl


> In a .mc file, a comment line begins with "dnl", not "##".

Thanks, I'm definitely a sendmail rookie. I saw the comments above
that began with "#" and I thought this would work within the statement
section. I used two "#" just so I'd remember it was my comment.

> If you leave out the "Addr=a.b.c.d" pair and its comma, then (according
> to the Bat book 3d Edition) the default address becomes INADDR_ANY,
> which allows connections to any address on the local machine. That's in
> section 24.9.24.1, if you care to look it up.

I do not have this book, thanks for the tip, I'll look for one.

> Are you _starting_ sendmail with "-ODaemonPortOptions=Addr=127.0.0.1"?
> It sure looks like it, but your `ps` may do things differently from
> mine.

The following line is in submit.cf:

O DaemonPortOptions=Name=NoMTA, Addr=127.0.0.1, M=E

The submit.mc file contains:
----
divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from
complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl
----

Is this causing the problem? If so, how would I fix this?

Thanks!

swangdb

unread,
Jul 30, 2010, 4:57:02 PM7/30/10
to
On Jul 29, 10:16 am, swangdb <swan...@gmail.com> wrote:
> On Jul 29, 9:07 am, mikea <mi...@mikea.ath.cx> wrote:
>

> > If you leave out the "Addr=a.b.c.d" pair and its comma, then (according
> > to the Bat book 3d Edition) the default address becomes INADDR_ANY,
> > which allows connections to any address on the local machine. That's in
> > section 24.9.24.1, if you care to look it up.
>
> I do not have this book, thanks for the tip, I'll look for one.

I found the 2nd edition of the bat book. Some stuff was missing. I
broke down and ordered a copy of the 4th edition (newest). Thanks
for the help!

swangdb

unread,
Aug 25, 2010, 4:27:22 PM8/25/10
to
On Jul 29, 9:07 am, mikea <mi...@mikea.ath.cx> wrote:

> Are you _starting_ sendmail with "-ODaemonPortOptions=Addr=127.0.0.1"?
> It sure looks like it, but your `ps` may do things differently from
> mine.

Yes, I was doing this.

/etc/default/sendmail contained the following line:

MODE="-bd -ODaemonPortOptions=Addr=127.0.0.1"

I changed "127.0.0.1" to "0.0.0.0" and restarted sendmail. The
problem vanished!

Thanks for help.

I have the 4th edition of the Bat book now. It's overwhelming but I'm
digging through it.

0 new messages