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 firstname.lastname@example.org (which had the email account set up with DreamHost) to email@example.com. I wanted the sender to be firstname.lastname@example.org, 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 email@example.com, the NAS was inadvertently also setting the sender to firstname.lastname@example.org, which was prohibited by the DreamHost policy.
This means I can’t send to email@example.com from the NAS. Instead, I have to send to an email account on my DreamHost domain (e.g. firstname.lastname@example.org) and forward it from there.
Oh, I love troubleshooting my tech in my free time.