Failed to send test email. Error message: SMTP Error: Could not connect to SMTP host.

Sometimes, your domain points to external mail server such as google apps in this case you need to setup your smtp server to gmail or other third party. But sometimes, although values in your script are set correctly, while sending an email you get following error.

Failed to send test email. Error message: SMTP Error: Could not connect to SMTP host.

It might be caused because of wrong settings in the script or firewall.

Use SMTP when sending emails from this system Yes
SMTP hostname (eg: mail.yoursite.com) smtp.gmail.com
SMTP Security – TLS
Use SMTP authentication – Yes
SMTP Username – your user name
SMTP Password – your password.
SMTP port – 465

If your settings are correct, then you would need to make sure that you do not enable SMTP_BLOCK in csf.conf if you want to allow such connections.

Edit csf.conf file and set!

SMTP_BLOCK = “0”

Exim: remote_smtp defer (-53): retry time not reached for any host

This can be caused by multiple things, however if it happens for each email, it’s likely your exim databases are corrupt; to resolve this you should:

/usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null

/scripts/courierup -- force
/scripts/eximup --force

1 2 3