Checklist For Hosting With Outbound SMTP 25 Port Blocked / Restricted
Is anyone hosting a Cpanel server at a hosting provider that will not open port 25 on the firewall? I don't do any email broadcasts and it's pretty easy to have forms on websites that email contents to use a 3rd party email delivery service API like Brevo. I also what few accounts on the server that are hosting email, the account is either forwarded or is just an inbox for an app. But then you have WHM status emails and other possible hiccups if port 25 is blocked.
So anyone running on a host where port 25 is blocked on the network? I really like the performance/price ratio at Vultr but you pretty much have to be with them for a long time, pass a polygraph test, and do a criminal background check for them to even consider opening up port 25. A checklist on things to change on a WHM server would be really helpful. Seems essentially aside from having all website use a 3rd party email delivery api, you'd need to do sort of the same at the EXIM and Postfix level (the latter is what bash scripts that need to send email would use, no?)
Seems like it would be a pain in the ass to get EVERYTHING that sends mail working on a host where port 25 is blocked on the network.
-
Hey there! All you need to do is setup a smarthost as outlined here:
Let me know if you have questions on that!
0 -
Will this also reroute mail sent from the Almalinux command line and PHP scripts both using the system level mail command. Not Exim.
0 -
On all servers, email is 99.99% always handled by the mail transport agent (MTA) - which in the case of cPanel servers is the Exim mail server system. So command line and PHP scripts will send email to the Exim server which will then arrange for it to be transmitted appropriately. Changing the smart host setting in Exim will therefore arrange for PHP scripts* to be sent correctly through that smarthost.
* 99.99% - it is possible for scripts/programs to connect directly to external mail servers using a external port number: but in the vast majority of cases, they will use the servers internal MTA. For an example of using an external setting in PHP scripts, see https://www.php.net/manual/en/function.mail.php#129090.
0 -
What rbairwell said - and if you have cPanel's SMTP Tweak enabled to restrict who has access to Exim, which you should, there is even less opportunity for spam to be sent. https://docs.cpanel.net/whm/server-configuration/tweak-settings/#mail
0
Please sign in to leave a comment.
Comments
4 comments