Author Topic: Redirecting all email via a port other than 25  (Read 141 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Redirecting all email via a port other than 25
« on: August 14, 2017, 10:13:59 PM »
This topic has been discussed all around the internet and no matter how much I try, I can't get a working answer/solution.

A particular ISP that I use blocks port 25.
Centos 6.9
I've set root email forwarding to an external email address (doesn't matter whether hotmail or a personal email server elsewhere).
Postfix master.cf has been changed to reflect a different port:
Code: [Select]
# smtp      inet  n       -       n       -       -       smtpd
587      inet  n       -       n       -       -       smtpd
# 26      inet  n       -       n       -       -       smtpd
I've tried different combinations of the above.
I've messed about with Google-found iptables redirects such as:
Code: [Select]
iptables -t nat -A OUTPUT -p tcp --dport 25 -j REDIRECT --to-port 587
I still get the dreaded:
Quote
postfix/smtp[26787]: connect to mx1.hotmail.com[65.55.92.184]:25: Connection refused
Someone must have a definitive step-by-step, surely?
It's very irritating not to just get system messages from the likes of csf, let alone any client created ones, which I haven't got to yet.
At this stage, I am only interested in outbound email from this server.

In WHM, it's very simple to just add port 26 as an additional port and it just works. I'll give the convoluted and overly complicated/untidy Webmin/Virtualmin another try, at this rate.
 ???

(I've already donated to this cause, plus purchased a Pro licence, as I thought this panel looked so promising)
« Last Edit: August 14, 2017, 10:15:38 PM by ejsolutions »

Offline
***
Re: Redirecting all email via a port other than 25
« Reply #1 on: August 15, 2017, 04:58:13 AM »
If outgoing port 25 blocked, all you can do is use smarthost/relay server.
Most/all email server use port 25 for server to server submission, port 465/587 will require user/password authentication.