If you are trying to send mail via webmail and it is not working out, you may have the answer right under your nose. If you have CSF installed, it is likely blocking port 25.
You may be getting the following error message:
|
There was an error sending your message: Failed to set sender: you@domain.com [SMTP: Failed to write to socket: not connected (code: -1, response: )] |
From /etc/csf/csf.conf approx line number 279:
|
# If SMTP_BLOCK is enabled but you want to allow local connections to port 25 # on the server (e.g. for webmail or web scripts) then enable this option to # allow outgoing SMTP connections to the loopback device SMTP_ALLOWLOCAL = "0" |
Simply change that 0 to a 1 and restart csf:
Related posts from Linux Brigade!
Migrate WHM/cPanel from one server to a new one (script)! We’ve started a site to house a script that will migrate your full WHM/cPanel server to new hosting. This takes the new WHM/cPanel backup files and will restore them including system […]
Keep your WordPress site secure! I work for a hosting company. On average, I’ll clean up at least 3-4 WordPress sites each month for our clients. Most of the time, they’re running on old versions of WordPress and have […]
Install XenServer via usb flash drive USB Flash drives are getting cheaper and cheaper lately. I just picked up few at staples – 16GB flash drives for just under $8. I like to use them to install Linux – I always seem to […]
Install CSF/LFD Firewall on your Linux Server The first thing on your mind when setting up a new Linux server (dedicated or VPS) is how you can increase security. One of the best tools in your bag of tricks should be the CSF […]
Run the same command on many Linux servers at once Ever have to check a list of Linux servers for various things like what version of CentOS they’re running, maybe how long each has been running to get an uptime report? You can – and it’s […]
Awwl, man… As I was reading this, I tried coming up with a solution in my head. It included some convoluted code, a sacrificial goat and some naked surf dancing. Your answer consisted of 5 whole characters. (K.I.S.S. at its best.)