- Step : 1
Access the Roundcube webmail using the server hostname or IP address.
- Step : 2
Check if the webmail’s server host is set to localhost. If not, set it as localhost and then try to send an email message.
- Step : 3
Look for the PHP errors in the apache error.log, and if you find any, resolve them.
- Step : 4
Try to reinstall the Roundcube webmail and try to send an email message.
- Step : 5
If a pop-up dialog box titled An error occurred! with the message “SMTP error (-1): Connection to server failed.” is displayed on the screen, check whether you have installed CSF/LFD. (Note: CSF/LFD is used to block the SMTP connection on Roundcube.)
- Step : 6
If you have installed it, then the SMTP_BLOCK feature is enabled on
Roundcube. To check whether SMTP_BLOCK is enabled, run the following command:
- Step : 7
grep ^SMTP_BLOCK /etc/csf/csf.conf
- Step : 8
Now, the status of SMTP_BLOCK will be displayed on the screen. If you find its value to be 1, then the following SMTP connection 465, 587, or 25 is blocked on Roundcube.
- Step : 9
To fix this issue, disable the SMTP_BLOCK option by following the below instructions.
- Step : 10
Run the following commands:
- Step : 11
SMTP_ALLOWLOCAL = "0"
- Step : 12
SMTP_REDIRECT = "0"
- Step : 13
SMTP_PORTS = "25,465,587"
- Step : 14
SMTP_ALLOWUSER = "webapps"
- Step : 15
SMTP_ALLOWGROUP = "mail,mailman"
- Step : 16
After running the above commands, restart the csf/lfd.
- Step : 17
Now, try to send the email message from Roundcube.