Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to configure sendmail and ufw on an ubuntu server (ServerA) so that another server (ServerB) can send mail through it. In my /etc/mail/access file I have the following line (a.b.c.d is the IP of ServerB):

Connect:a.b.c.d    RELAY

My ufw status shows the following rule I added:

25/tcp                     ALLOW       a.b.c.d

When I telnet from ServerA I get through:

telnet localhost 25

When I telnet from ServerB I don't (w.x.y.z is the IP of ServerA):

telnet w.x.y.z 25
telnet: Unable to connect to remote host: Connection refused

I did restart the sendmail daemon after editing the access file.

What could I be missing? Something in sendmail.mc?

Edit:

netstat -an|grep -w 25
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
share|improve this question

marked as duplicate by MadHatter, kce, Dave M, mdpc, cole Oct 23 '13 at 22:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Could you paste the output of netstat -an|grep -w 25 (on server A) into your question? –  MadHatter Oct 23 '13 at 15:12
    
I will read it. –  Warren Schubert Oct 23 '13 at 15:21
    
Removing some lines from sendmail.mc to get it to listen to the outside world fixed the problem. Thank You. –  Warren Schubert Oct 23 '13 at 15:36
    
No worries. The best thing to do under these circumstances is to delete your own question, so it doesn't hang around with no formal answer forever; there should be a "delete" link at the bottom. And do a bit more research before asking another question <grin>! –  MadHatter Oct 23 '13 at 15:38

1 Answer 1

Sendmail listening only on the localhost interface

Sendmail FAQ 4.22: Why can't I receive external mail?

Several vendors have changed the way that sendmail is run. They decided that most people need a client-only version of sendmail. So it is listening only on the localhost interface [...]

The problem has been located by test suggested by MadHatter: netstat -an|grep -w 25

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.