Collapse

Announcement

Collapse
No announcement yet.

SMTP Error (-1): Connection to server failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SMTP Error (-1): Connection to server failed

    Have you come across a issue where you are trying to send email from cPanel and you get error as "SMTP Error (-1): Connection to server failed." Here is what you can do to fix it.. There are 2 analysis/fix that I have found.

    Fix 1: At first, check the status of the exim service on the server and check if exim is running, and if it does, then the issue is different, so you can then follow what is mentioned in the "Fix 2."
    # service exim status
    If you get error here, like "exim dead but subsys locked", then do as given below:

    # service exim status
    exim dead but subsys locked
    Search for file /etc/eximdisable. If it does exist, then rename it using below command:
    # mv eximdisable eximdisable.bak
    After that restart the exim service using below command:
    # service exim restart
    Fix 2: If the Exim status is okay, then please follow the below steps.

    Edit the CSF firewall using below command:
    # vi /etc/csf/csf.conf
    Check for below 2 codes in the configuration file.
    SMTP_BLOCK = 1
    SMTP_ALLOWLOCAL = 0
    Change the SMTP_ALLOWLOCAL to 1, so this will enable webmail to function properly.

    Now, restart the firewall configuration using below command.
    # csf -r
    If you are not familiar with the commands, then her is the method to update it from WHM interface..
    Login to the WHM >> ConfigServer Security & Firewall.

    Click image for larger version

Name:	1.png
Views:	3
Size:	45.5 KB
ID:	616



    Edit the configuration file by clicking "Firewall Configuration" in "ConfigServer Security & Firewall" section.

    Click image for larger version

Name:	2.png
Views:	4
Size:	52.1 KB
ID:	617


    Change "SMTP_ALLOWLOCAL" Off to On.

    Click on "Change" button to enable the changes and restart csf.

    This will fix the issue..

Working...
X