1

I am trying to set up postfix with dovecot. I can telnet to localhost 25 and send a message to accounts on the server.

However, when I try to telnet to port 25 on this server from another server I get "421 Cannot connect to SMTP server" ... "connect error 10060".

The firewall is open right now:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Is there some setting in main.cf which tells it whether or not it should listen on port 25 or 587 or whatever?

1
  • 1
    Doesn't make sense. How do you get an SMTP status code from a telnet session that fails to connect?
    – Mel
    May 20 '11 at 13:35
3

It sounds like you are listening on 127.0.0.1 but not 0.0.0.0 or whatever your specific interface address is. This means the port is open to the local host but not the external interface. Check the postfix config file for what interface is being listened on.

Check this setting in particular:

inet_interfaces = all
7
  • you can also determine what interfaces are being listened on via netstat or lsof, e.g. lsof -ni:25
    – jmtd
    May 20 '11 at 12:45
  • inet_interfaces is already set to all. Any other ideas? I ran the lsof -ni:25 command and I got the following "master 7361 root 11u IPv4 1856221 TCP *:smtp (LISTEN)". May 23 '11 at 5:03
  • 1
    That result sounds like it's listening! Check what interface it's listening on with netstat -lntp.
    – Caleb
    May 23 '11 at 10:28
  • Here is the line for port 25 "tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 7361/master". Is "master" the name used by postfix? If so, what else could be blocking my server? If it helps it's a godaddy server. That shouldn't be a problem for inbound connections though. May 23 '11 at 23:36
  • Um, according tothat you are listening. now we have to ask you what test you are using to say it isn't.Are there firewall rules in play?
    – Caleb
    May 24 '11 at 14:45
2

The problem was that my MX records were not set up properly on my domain. The port 25 thing was a red herring. Godaddy just forbids servers from directly connecting to port 25 on other Godaddy servers.

1
  • Thanks for updating on this - had basically the exact same problem
    – Nilzor
    Nov 15 '12 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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