Droplet name is in the Mail From instead of domain name. Mailname file seems to be ignored.
I installed postfix following this tutorial. https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-debian-9 However, I had to edit the first line of the mailname file from americanpharoah.com to americanpharoah.ca since I made a typo during the install. I can send a test email to myself and I did the setup to forward emails to root to me. But the mailname in the file is not used, instead the dropletname.localdomain appears in the Mail From in my tests.
myhostname = dropletname.local domain #I tried putting americanpharoah.ca here but then I can no longer relay the emails to root to me myorigin = /etc/mailname mydestination = americanpharoah.ca, $myorigin, $myhostname, localhost.americanpharoah.ca, localhost
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×