How to change Exim outgoing port

tartan

Member
Dec 8, 2004
5
0
151
Hello everyone,

It seems that exim on one of my servers can't deliver the emails because any delivery attempt returns and error similar to this:

Delivery attempt for Message ID 1SIOwc-00038u-0G
Message 1SIOwc-00038u-0G is not frozen delivering 1SIOwc-00038u-0G Connecting to mta7.am0.yahoodns.net [98.139.175.224]:587 ... failed: Connection refused LOG: MAIN mta7.am0.yahoodns.net [98.139.175.224] Connection refused Connecting to mta7.am0.yahoodns.net [209.191.88.254]:587 ... failed: Connection refused LOG: MAIN mta7.am0.yahoodns.net [209.191.88.254] Connection refused Connecting to mta7.am0.yahoodns.net [67.195.103.233]:587 ... failed: Connection refused LOG: MAIN mta7.am0.yahoodns.net [67.195.103.233] Connection refused Connecting to mta7.am0.yahoodns.net [67.195.103.232]:587 ... failed: Connection refused LOG: MAIN mta7.am0.yahoodns.net [67.195.103.232] Connection refused Connecting to mta7.am0.yahoodns.net [98.139.175.225]:587 ... failed: Connection refused LOG: MAIN mta7.am0.yahoodns.net [98.139.175.225] Connection refused LOG: MAIN == [email protected] R=lookuphost T=remote_smtp defer (111): Connection refused

It seems the smtp connection port between my sever and receipients has been changed to 587 ("[98.139.175.224]:587") and therefore connections are refused because those servers are not listening on port 25.

>telnet 67.195.103.232 25

Trying 67.195.103.232...
Connected to 67.195.103.232.
Escape character is '^]'.
220 mta1067.mail.gq1.yahoo.com ESMTP YSmtp service ready

>telnet 67.195.103.232 587

Trying 67.195.103.232...
telnet: connect to address 67.195.103.232: Connection refused

I have checked on my other servers and they are all sending on default port, all on same IP range.

All search results are about how to make exim to listen on an alternative ports but I can't find where to set the port that exim sends email to other servers.

Any help or direction would be highly appreciated.
 

tartan

Member
Dec 8, 2004
5
0
151
Thanks for your reply

but I don't think any other exim instance is running. Also when I restart exim from whm everything looks fine:

Waiting for exim to restart...............finished.

exim (/usr/sbin/exim -q) running as mailnull with PID 15431

exim started ok

The errors that I receive are not similar to the other post, however I tried the recommendation on that post and changes the port in Service Manager but still no luck.

How does exim know to use what port when connection with other mail servers to deliver emails. For example where is it defined that exim should connect with yahoo mail server on port 25 as default?
 

tartan

Member
Dec 8, 2004
5
0
151
I'm not expert too, but I checked the port is open. Although I turned the firewall off to make sure of it.
 

tartan

Member
Dec 8, 2004
5
0
151
It is working now, and emails are being delivered.

The problem was originally caused by Platinum Server Management, they had changed the wrong port value in a wrong file, but they couldn't figure out how to revert it during past 4-5 days, but cpanel support came to rescue.

Here is the solution according to cpanel support:

"I had to alter /etc/services and remove the port 587 entry defined for smtp, then I ran exim -qff -v to force a queue run and this seems to have fixed it. (The queue is still running but mail is being delivered)"