I host my business site through a VPS account. The instance runs Ubuntu and I'm using POSTFIX+Dovecot as my mail server.

For the most part, the mail server works fine. I have noticed, however, that I can not send mail from specific local networks. I noticed this at a client's office serval months ago. I can receive email, but any time I tried to send mail when connected to their network the connection would time out.

Since I could send my mail after leaving, I chalked it up to improper network configuration and didn't worry about it. Unfortunately I've recently moved, switched service providers, and am forced to use the service providers router due to the special set-up they put in place to give me DSL in the sticks--well beyond the typical range for a DSL run. Now I'm unable to send email from home, which is a problem.

I have tried sending email through my phone (using cellular service rather than my DSL) just to confirm the server is currently working. I'm not even sure where start debugging. Any ideas on how I might track down the issue would be greatly appreciated.

  • 4
    Not all networks allow SMTP outbound. – SpacemanSpiff Mar 23 '12 at 4:15
  • Ask ISP-Support?! – Lazy Badger Mar 23 '12 at 6:02
  • +1 Port 25 blocking was the issue. Thanks! – Jason George Mar 26 '12 at 21:24

The accepted alternative to port 25 is port 587 as has been recorded in RFC2476 since 1998. You can read all about it if you are into RFCs at http://www.ietf.org/rfc/rfc2476.txt. This is what we have been using for many years to circumvent the ISPs blocks on port 25.

  • There's also port 465 for SMTP over SSL. – cjc Mar 23 '12 at 10:57
  • That was fast. Port 587 did it. Thanks so much. – Jason George Mar 26 '12 at 21:22

As SpacemanSpiff pointed out, many firewalls specifically block port 25. Because of this, my mail server also listens on port 2525, which is easy to remember. Although some networks whitelist ports 80 and 443 while blocking all others (in which case evading the firewall is nontrivial), many other networks only blacklist specific ports like 25. In most cases I've seen, sending outgoing mail on 2525 succeeds even if port 25 fails.

  • +1 I went with 587 since I have a soft spot for RFCs, but port blocking on 25 was the problem. Thanks! – Jason George Mar 26 '12 at 21:23

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.