How to force Usermin to use port 587?

I can receive emails with no problem, but I can’t send them because my host blocks port 25, but it does allow port 587. How can I force it on port 587?

I have already done this modifications:

smtp_sasl_auth_enable = yes
submission inet n - n - - smtpd
smtpd_tls_security_level=encrypt

iptables -L -n
ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:587 ctstate NEW

netstat -an | grep :587
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN

But when I attempt to send a mail through Virtualmin mailbox I get in the log:
(connect to outlook-com.olc.protection.outlook.com[104.47.66.33]:25: Connection timed out)

Already made many modifications to master and main files, but none works.

Also, port 587 might be ok but Usermin keeps using the port 25, as the error message indicates.

Also, https://www.yougetsignal.com/tools/open-ports/ says that port 587 is opened on my server, I just need to make Usermin use port 587.

I’ve tried going to Webmin Configuration > Sending Email, checking “Enable SSL” and setting “Use port number” to 587, but when I click save, it automatically unchecks “Enable SSL” and automatically set “Use port number” to default port. It cant be changed!

Your VPS host (which one it is, please let @adamjedgar know :slight_smile: ) is blocking port 25 for devices external to their network. BTW, many other VPS hosts do this too, see MX records, Thunderbird, Postfix, Dovecot.

Before you poke the beast and change too many things on your box, please look around to see how others have addressed this issue. Also see Free smarthost / mail relay to work around port 25 block by VPS host

1 Like

You’re misunderstanding what that log entry means. It doesn’t matter what port Usermin uses. It runs locally…it can reach the local postfix on any available port. This is a problem for outgoing mail, and one you can’t overcome for every receiving mail server on the internet. You’ll need to use a mail relay as @calport suggested.

Calport, I am not sure why it is that one would want to let me know…i stopped using Google Cloud a long time ago because i spent 2 years with a mail server running through a relay host due to this exact problem with them!
I think i may have actually been one of the first ones on this forum to experience that, and Google cloud i think were one of the first service providers to restrict ALL mail on standard ports (not just 25…they have blocked them all including SSL ports for mail). The only way around this with Google Cloud it to either use a relay, or use GSuite where some ports are allowed via the internal network.

One of the relay hosts that i have looked at and used an0nimo are Sendgrid. There are others.

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