I have a NAS4Free machine which used to be able to automatically send me emails, like when the system booted, the UPS failed, etc. That feature hasn't been working for me since sometime in the version 10 range, if not longer. How can I fix it?
I'm running version 188.8.131.52 - Sayyadina (revision 3330), 64-bit embedded.
Here are my email settings as shown in the webui, at
System > Advanced > Email Setup:
From Email Address: email@example.com To Email Address: firstname.lastname@example.org SMTP Server: smtp.gmail.com Port: 465 Security: TLS TLS Mode: NOT checked TLS Server Certificate Check: Off Authentication: CHECKED (enable SMTP auth) Username: email@example.com Password: ******* Authentication Method: Best available
I'm using an app password since I have 2-factor authentication enabled on my Gmail account.
When I click
Send Test Email, it shows an error message at the top in red,
Failed to send test email. Please check the log files.
Clicking the link, I find
Diagnostics > Log shows:
root: msmtp service executed msmtp: host=smtp.gmail.com tls=on auth=on firstname.lastname@example.org email@example.com firstname.lastname@example.org errormsg='cannot read from TLS connection: a protocol violating EOF occured' exitcode=EX_IOERR root: Failed to send test email to: email@example.com.
From this I gather that the configuration for
msmtp is the problem. However, when I boot from a NAS4Free LiveCD, and configure the email with the same settings through the UI, it works fine.