2

I am running sendmail + dovecot in my Debian server. I have enabled the firewall rules to allow everything:

  iptables -P INPUT ACCEPT
  iptables -P OUTPUT ACCEPT
  iptables -P FORWARD ACCEPT
  iptables -F
  iptables -X

However after a quick check at yougetsignal.com, my port 25 is still being blocked. But 143, 80 are okay.

2
  • Short answer: Your ISP blocks the port. But this is a question for SuperUser, not ServerFault.
    – pehrs
    Dec 1, 2010 at 9:19
  • @pehrs you sure about that? The answer seems to have got it working (see OP's comment on the answer). Mar 25, 2021 at 22:46

1 Answer 1

3

Firstly, with thanks to symcbean, check it's running. On the system itself, type

telnet localhost 25

and if you don't see something like

220 risby.home.domainname.net ESMTP Sendmail 8.14.4/8.14.2; Wed, 1 Dec 2010 10:20:38 GMT

your sendmail isn't running in daemon mode, and you won't be able to get to it from anywhere. Fix that.

If you do see a banner, then it's likely sendmail's not binding to your external IP address. Do a

netstat -an|grep -w 25|grep LISTEN

If you see the line

tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN    

I'm wrong, and we must dig further. If you see

tcp        0      0 127.0.0.1:25                  0.0.0.0:*                   LISTEN    

then sendmail has been configured only to listen on the loopback interface, which is why you can't get to it from off the box. Look for a line that says

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

in your sendmail.mc, delete it (if you ignore me, and comment it out instead, use a dnl at the beginning of the line, not a #), regenerate your sendmail.cf and restart sendmail.

2
  • 1
    ...or maybe just not running?
    – symcbean
    Dec 1, 2010 at 10:05
  • Thanks! True enough, it's only configured to listen to localhost. I have disabled all the lines. It works!
    – henry
    Dec 2, 2010 at 1:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .