For a Brand New cPanel Server , settings are difference to to ensure maximum security and stability. This ifferrs completely from a raw server with RH or CentOS. issue: cPanel Server failed to Send Emails using External SMTP Server
This issue came to my attention when I migrated a Magento installation in to a freshly installed cPanel Server., where Sending Server was mailjet and things were smooth in the formr server., Immediately all mails stopped from Magento and We tried some other SMTPs like Gmail and Zoho., cases were similar with same error report.
Next we create an Email in the current server and tried to send via that email with SMTP sending, Mail sent hasslefree.
After set of googling my colleque noticed that the culprit was WHM itself. Here is the simple and Much googled solution
- Login to your WHM with super user account ( widely root)
- Goto Tweak Settings
- Open Mail Tab
Enabling this feature will redirect outgoing SMTP connections to the local mail server. root, exim, and mailman are still allowed to make direct connections.
Allow users to relay mail if they use an IP address through which someone has validated an IMAP or POP3 login within the last hour (Pop-before-SMTP) [?]