The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change Exim outgoing port

Discussion in 'E-mail Discussions' started by tartan, Apr 13, 2012.

  1. tartan

    tartan Member

    Joined:
    Dec 8, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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 == xxxxxxx@yahoo.com 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.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    This comment by cPanelNick may be helpful:

    Re: WHM .32.2 upgrade issues
     
  3. tartan

    tartan Member

    Joined:
    Dec 8, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm no expert with Mail things like this so limited here. Is port 587 open in your servers firewall?
     
  5. tartan

    tartan Member

    Joined:
    Dec 8, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I'm not expert too, but I checked the port is open. Although I turned the firewall off to make sure of it.
     
  6. tartan

    tartan Member

    Joined:
    Dec 8, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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)"
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    cPanel Support is second to none. Best there is. :)


    Glad you got this worked out.
     
Loading...

Share This Page