Over the holidays, I migrated from 1&1 to DreamHost, and I got almost everything to work. The only thing that didn’t work anymore were the email notifications from my Buffalo LinkStation NAS. Normally, they report once a day that everything is okay, or immediately if there is an error.
I had re-created the email account that I use for that in DreamHost, updated the SMTP server and credentials in the LinkStation admin interface, but it wasn’t sending any emails. It was saying “Test email sent.” when I tested the new settings, but nothing ever arrived. No combination of login mode and SSL/TLS/disable worked.
I had to figure out if there were logs anywhere. I know the NAS has SSH access, but I hadn’t done that in a really long time. It seems like somehow, it got disabled again. No problem, yesterday evening I ran an easy-to-use Java application called ACP Commander GUI to re-enable SSH access and set a new root password. Then I could SSH into the NAS.
The logs were fortunately easy to find in /var/log. The file messages contained the following line every time I sent a test message:
550 5.7.1 Sender domain not allowed
What in the world does that mean? It turns out DreamHost has a policy against spoofing the sender. But I don’t think I was doing that. All I was doing was sending it from email@example.com (which had the email account set up with DreamHost) to firstname.lastname@example.org. I wanted the sender to be email@example.com, which shouldn’t be blocked, and I wasn’t setting a different sender email anywhere!
After searching a bit for the ssmtp.conf file, I found it at /etc/melco/ssmtp.conf, and it contained the following line:
Whenever I set it to NO, it got overwritten again and set to YES. I don’t know from where or why, but I assume this somehow sets the sender email to the destination email. So when I was trying to send to firstname.lastname@example.org, the NAS was inadvertently also setting the sender to email@example.com, which was prohibited by the DreamHost policy.
This means I can’t send to firstname.lastname@example.org from the NAS. Instead, I have to send to an email account on my DreamHost domain (e.g. email@example.com) and forward it from there.
Oh, I love troubleshooting my tech in my free time.