Email Test Failing

I have attempted to setup the email and my mail server uses SSL/TLS on port 587, but when I tried to send a test email it claimed to timeout somewhere. It didn’t seem to provide much detail in the logs for what it failed. I have other applications set to send email out through the SMTP server in a similar fashion to Duplicacy GUI, so I know the server is there and accessible. Where can I find more information to diagnose this further?

Did the log say how many seconds passed before the timeout?

Running the test displayed a dialog notification:

Email error
Timeout was reached.  Please refer to the logs for detailed information.

This was from the logs:

12:22:26.000    CURL: Rebuilt URL to: smtps://xxxxxxxxx.zmailcloud.com:587/
12:22:26.000    CURL:   Trying 104.197.151.163...
12:22:26.000    CURL: TCP_NODELAY set
12:22:26.000    CURL: Connected to xxxxxxxxx.zmailcloud.com (104.197.151.163) port 587 (#0)
12:22:26.000    CURL: Operation timed out after 30000 milliseconds with 0 out of 0 bytes received
12:22:26.000    CURL: Closing connection 0

Apparently it was after 30 seconds.

I wrote a simple bash script to test the interactions with the mail server in case this helps you discover what may be tripping things up.

EMAIL_USER="xxxxxxx@xxxxxxx.xxx"
EMAIL_PASS="xxxxxxx"
EMAIL_HOST="xxxxxxx.xxx"
EMAIL_DOMAIN="${EMAIL_HOST}"
EMAIL_HOST_PORT="587"
EMAIL_AUTH=$(echo -ne "\0${EMAIL_USER}\0${EMAIL_PASS}" | base64)
EMAIL_FROM="xxxxxxx@xxxxxxx.xxx"
EMAIL_TO="xxxxxxx@xxxxxxx.xxx"
EMAIL_SUBJECT="Test Email From CLI"
EMAIL_DATE=$(date)
EMAIL_BODY=$(cat <<EMAIL_CONTENTS
Hey
This is a test email only

Thanks
EMAIL_CONTENTS
)
SMTP_PAYLOAD=$(cat <<SMTP_COMMANDS
EHLO ${EMAIL_DOMAIN}
AUTH PLAIN ${EMAIL_AUTH}
MAIL FROM: ${EMAIL_FROM}
RCPT TO: ${EMAIL_TO}
DATA
To: ${EMAIL_TO}
From: ${EMAIL_FROM}
Subject: ${EMAIL_SUBJECT}
Date: ${EMAIL_DATE}
${EMAIL_BODY}
.
QUIT
SMTP_COMMANDS
)

echo "${SMTP_PAYLOAD}" | \
    openssl s_client -quiet -starttls smtp -connect ${EMAIL_HOST}:${EMAIL_HOST_PORT}

The responses when I ran this from a terminal was:

verify error:num=19:self signed certificate in certificate chain
verify return:0
250 DSN
250-zmcc-4-mta-1.zmailcloud.com
250-PIPELINING
250-SIZE 2147483648
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
235 2.7.0 Authentication successful
250 2.1.0 Ok
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
250 2.0.0 Ok: queued as AF8C6A3156
221 2.0.0 Bye

Nice markdown support here by the way, even though the in-page editor is a bit clunky.

I think you can specify the server as xxxxxxxxx.zmailcloud.com:587 or smtps://xxxxxxxxx.zmailcloud.com. Their server may not open port 587 for smtps.

Dropping the port specification and keeping smtps:// allowed it to connect (smtps://xxxxxxxxx.zmailcloud.com).
Thanks