Often we may find issues in sending mails from your cpanel domains even after trying to send mails using Webmail.
We will be receiving following error:-
SMTP Error (-1): Connection to server failedIn such cases, there is nothing to be panic. We can easily fix this issue within a short span of time.
1). First of all, check the
exim status.
# service exim status
exim dead but subsys locked
If you see this error check for a file located in /etc/eximdisable. If you found the file then do the following steps and you are all done.
root@server [/]# mv eximdisable eximdisable.bak
root@server [/]# /etc/init.d/exim restart2). If the above steps didn't come to your help, then try the following steps.
Sometimes this error may also cause due to a setting in the CSF firewall or another firewall. It might be caused by having the following set:
SMTP_BLOCK = 1
SMTP_ALLOWLOCAL = 0You would need to change SMTP_ALLOWLOCAL to 1 to enable Webmail to function.
3). One more tip:-
If the above two didn't come to your help, then the below steps indeed help you.
mv /etc/exim.conf /etc/exim.conf_bak ------ (take a backup)
/scripts/rebuildeximbsd
/scripts/eximconfgen
/scripts/eximup –force
/etc/init.d/exim restartNow the exim service will be working fine.