SMTP Connection Refused for any Account Except root
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.
-
Hi @Dean_ONP Do you have CSF with SMTP_BLOCK enabled by chance? Thank you, 0 -
cPanelLauren, you genius, that's it! Thank you. The old SMTP_BLOCK-enabled-in-CSF trick. 0 -
Follow up question; With remote SMTP connections no longer restricted, is there a way to whitelist/blacklist remote SMTP connections by IP or URI? 0 -
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 = --- 0 -
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, 0
Please sign in to leave a comment.
Comments
5 comments