Can’t connect to smtp (Exim)

eximsmtp

If I type:

telnet localhost 25

into SSH, it says:

Trying 127.0.0.1…

Connected to localhost.

Escape character is '^]'.

Connection closed by foreign host.

However, when I type:

exiwhat

into SSH, it says:

28543 daemon: -q1h, listening for SMTP on port 25 (IPv6 with IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

If it's listening on port 25, why does my connection get closed after connecting?

Best Answer

Sounds like Exim is configured to deny incoming connections from 127.0.0.1 to me. Does tailing your "exim-main" log tell you anything? (This file is likely located in /var/log/exim/exim-main, but it doesn't have to be.)

A connect ACL in the exim.conf could be doing this, as could a TCP wrapper configuration. Have a look at /etc/hosts.allow and see if there are any "exim" lines. Likewise, have a look at your exim.conf and see if there's a acl_smtp_connect entry. If you are comfortable with it, post your exim.conf and we'll look at it.