This question already has an answer here:
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):
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?
netstat -an|grep -w 25 tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN