Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SMTP Connection Refused for any Account Except root

Discussion in 'E-mail Discussion' started by Dean_ONP, Apr 25, 2018.

  1. Dean_ONP

    Dean_ONP Member

    Joined:
    Aug 29, 2016
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Gold Coast
    cPanel Access Level:
    Root Administrator
    I can run the following command and connect successfully under root account:
    telnet smtp.office365.com 587

    When run under any other account this will not connect, receive:
    Trying 40.100.29.34...
    telnet: connect to address 40.100.29.34: Connection refused

    I have tried setting in WHM:
    Server Settings >> Tweak Settings:
    Prevent “nobody” from sending mail [?] = off
    Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) [?] = off
    And set:
    Security Centre >> SMTP Restrictions: Disabled.

    Same issue.

    What am I missing?
    Started looking in to this due to an account on the server wanting to use PHPMailer to send mail using O365 server and they get the connection refused error.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,756
    Likes Received:
    187
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Dean_ONP

    Do you have CSF with SMTP_BLOCK enabled by chance?

    Thank you,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dean_ONP

    Dean_ONP Member

    Joined:
    Aug 29, 2016
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Gold Coast
    cPanel Access Level:
    Root Administrator
    cPanelLauren, you genius, that's it! Thank you.
    The old SMTP_BLOCK-enabled-in-CSF trick.
     
  4. Dean_ONP

    Dean_ONP Member

    Joined:
    Aug 29, 2016
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Gold Coast
    cPanel Access Level:
    Root Administrator
    Follow up question;

    With remote SMTP connections no longer restricted, is there a way to whitelist/blacklist remote SMTP connections by IP or URI?
     
  5. Dean_ONP

    Dean_ONP Member

    Joined:
    Aug 29, 2016
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Gold Coast
    cPanel Access Level:
    Root Administrator
    I see you can allow specific accounts to bypass the SMTP_BLOCK with it enabled:
    ---
    Always allow the following comma separated users and groups to bypass
    SMTP_BLOCK

    Note: root (UID:0) is always allowed
    SMTP_ALLOWUSER =
    SMTP_ALLOWGROUP =
    ---
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,756
    Likes Received:
    187
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Dean_ONP

    I'm so happy that resolved the issue! I'm glad you also found that you can allow specific accounts! Please let us know if you have any further issues with this.

    Thank you,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice