1

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 11.0.0.4 - Sayyadina (revision 3330), 64-bit embedded.

Here are my email settings as shown in the webui, at System > Advanced > Email Setup:

From Email Address: abc123@gmail.com
To   Email Address: abc123@gmail.com
SMTP Server:        smtp.gmail.com
Port:               465
Security:           TLS
TLS Mode:           NOT checked
TLS Server Certificate Check: Off
Authentication:     CHECKED (enable SMTP auth)
Username:           abc123@gmail.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 user=abc123@gmail.com from=abc123@gmail.com recipients=abc123@gmail.com errormsg='cannot read from TLS connection: a protocol violating EOF occured' exitcode=EX_IOERR
root: Failed to send test email to: abc123@gmail.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.

1

This bug was fixed in version 11.0.0.4 - Sayyadina (revision 3460), released on 2017-01-17. Per the changelog, they "Fix[ed] don't add domain parameter when domain is empty."

The bad /var/etc/msmtp.conf file generated by the WebUI looked like this:

account default
domain
host smtp.gmail.com
port 465
protocol smtp
from abc123@gmail.com
auth on
user abc123@gmail.com
password <plaintext_pw>
tls on
tls_starttls off
tls_certcheck off
syslog LOG_MAIL

The second line, "domain", with nothing following it, is the problem.

When I booted from the LiveCD, that line said domain local, and the email worked. Now, after upgrading to rev 3460, that line is not there at all, and email also works.

I think if my embedded installation hadn't been domain-less, I might not have run into this issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.