Help with mail please

Ubuntu Linux 20.04.4
Virtualmin version 7.3-1

I have been using Webmin/Virtualmin for years, but I’ve never used the email feature. I now need to enable this feature.
I am using Postfix and Dovecot. I can email internally to my other virtual servers, but I get a “connection time out” error message when using Outlook, Gmail or Thunderbird. After researching, I’m thinking maybe it’s because Comcast may be blocking port 25.

Dec 4 18:05:07 ubuntu postfix/smtp[370273]: connect to[2607:f8b0:4002:c03::1a]:25: Connection timed out
Dec 4 18:04:37 ubuntu postfix/smtp[370273]: connect to[]:25: Connection timed out
Dec 4 18:04:07 ubuntu postfix/smtp[370273]: connect to[2607:f8b0:4023:401::1a]:25: Connection timed out
Dec 4 18:03:37 ubuntu postfix/smtp[370273]: connect to[]:25: Connection timed out
Dec 4 18:03:07 ubuntu postfix/smtp[370273]: connect to[2607:f8b0:4001:c18::1b]:25: Connection timed out
Dec 4 18:02:35 ubuntu postfix/qmgr[1886]: 78890380002:, size=648, nrcpt=1 (queue active)
Dec 4 17:45:06 ubuntu postfix/smtp[368110]: 1671538002D:, relay=none, delay=74175, delays=74023/0.1/151/0, dsn=4.4.1, status=deferred (connect to[2607:f8b0:4002:c03::1b]:25: Connection timed out)

I allowed port 25 from ufw and also port forwarded it on my Arris router.
I checked open ports online and everything is good but port 25
Change port 25 to 587?
Can anyone give me a simple step by step to get my email going?


Ask your ISP to unblock port 25

If you do not have port 25, you cannot run a mail server. That’s the short answer.

If you must run a mail server for sending from local apps, you’ll need to configure a relay. There are many mail relay services out there, some of which have a free tier that allows sending a few hundred/thousand emails a month, as long as you don’t cross them on spam or other nonsense. We use Mailgun and…some other one I can’t remember the name of. Both work fine, and are cheap. This forum costs about $10/month for mail relaying, and we send quite a lot of mail from it (notifications…thousands of users getting email from here every day). It’d be pennies if you don’t send a lot of mail.

Receiving mail, on the other hand, does not have a simple/good solution. Your clients can, of course send via another port (587 is the usual one). But you cannot tell all the other mail servers in the world to use a different port. They will try to connect on port 25 (the SMTP port, intended for mail servers). If they can’t, then they won’t send you mail. So, you need another server that does have port 25 to forward that mail. Some of the same companies that offer mail relaying also offer forwarding…so that’s a possible solution.

But, don’t bang your head on making email somehow work directly on a server that does not have port 25. You cannot. Something has to be able send and receive mail on port 25, or you don’t have a mail server that can communicate with the world.

Thank you very much! You saved me a lot of time


Thanks! I will do that.


Thanks everyone for all your help! Saved me a lot of time.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.