• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Trouble setting up a SMTP Virtual Machine. SMTP Denied from all but local host

I am trying to set up a Demo for something and I need a Linux SMTP server.  I have a server running 64 bit Windows 2003.  On that server I have installed VMWare Server and created a CentOS 5 Appliance.

I have POP3 working but Sendmail will not accept connections from IP's other then the localhost ip>

When I try to connect to sendmail from the localhost IP everthing works great:
[root@smtp mail]# telnet localhost 25
Connected to localhost.localdomain (
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.13.8/8.13.8; Tue, 25 Sep 2007 10:25:12 -0400
mail from:user@host.com
250 2.1.0 user@host.com... Sender ok
rcpt to:clerk
250 2.1.5 clerk... Recipient ok
354 Enter mail, end with "." on a line by itself
Subject:  Test

250 2.0.0 l8PEPCHY002718 Message accepted for delivery

However if I try from another computer via telnet or outlook express it fails:

Connecting To not open a connection to host: Connect fa

I have edited my /etc/mail/access file to include the IP addresses:'
Connect:localhost.localdomain           RELAY
Connect:localhost                       RELAY
Connect:                       RELAY
Connect:                RELAY #ip address of the remote computer

I tried it with out the Connect:  IOW I just put in

I also ran /etc/mail/make after editing the access file everyime and even restarted sendmail.

Made sure the firewall was off:
[root@smtp mail]# /etc/rc.d/init.d/iptables status
Firewall is stopped.

I just don't know what else to try!!!
  • 2
1 Solution
Sendmail in RHEL5/CentOS5 is configured to only listen on port 25 on your loopback adapter, - to prevent accidentally opening up spam.  You can tell by typing "netstat -nlp" and noticing that only has a :25, if it was listening on everything it would be

You just need to edit /etc/mail/sendmail.cf and get rid of the Addr in the following line
O DaemonPortOptions=Port=smtp,Addr=, Name=MTA
Change it to:
O DaemonPortOptions=Port=smtp, Name=MTA
brittonvAuthor Commented:
It is really strage that they duplicate this limitation in the access file and Sendmail.cf  

For the record I edited the sendmail.mc file then ran make to write the new Sendmail.cf, and restarted Sendmail.  I am correct that you need to restart sendmail for it to see changes in sendmail.cf, right?
Correct, you have to restart sendmail to get it to re-read the sendmail.cf file.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now