-1

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
MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • 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 ! – MadHatter Oct 23 '13 at 15:38

1 Answers1

0

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

AnFi
  • 6,103
  • 1
  • 14
  • 27