• 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
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
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
data
354 Enter mail, end with "." on a line by itself
Subject:  Test

Test
.
250 2.0.0 l8PEPCHY002718 Message accepted for delivery

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

C:\>telnet 192.168.2.171:25
Connecting To 192.168.2.171:25...Could not open a connection to host: Connect fa
iled

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

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

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!!!
0
brittonv
Asked:
brittonv
  • 2
1 Solution
 
arrkerr1024Commented:
Sendmail in RHEL5/CentOS5 is configured to only listen on port 25 on your loopback adapter, 127.0.0.1 - to prevent accidentally opening up spam.  You can tell by typing "netstat -nlp" and noticing that only 127.0.0.1 has a :25, if it was listening on everything it would be 0.0.0.0:25.

You just need to edit /etc/mail/sendmail.cf and get rid of the Addr in the following line
Original:
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
Change it to:
O DaemonPortOptions=Port=smtp, Name=MTA
0
 
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?
0
 
arrkerr1024Commented:
Correct, you have to restart sendmail to get it to re-read the sendmail.cf file.
0

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