SMTP Connection Refused for any Account Except root

Dean_ONP

Member
Aug 29, 2016
10
2
3
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.
 

Dean_ONP

Member
Aug 29, 2016
10
2
3
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 =
---
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
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,