In my /etc/hostname (Ubuntu 14.04) file I have:
pavel@subdomain:~$ cat /etc/hostname example.ru
But when I run:
pavel@subdomain:~$ hostname -f subdomain.example.ru
It possibly (100%) affects my postfix configuration, when I'm trying to configure it as send-only SMTP-server and it sends messages with "email@example.com" sender address.
How and where to avoid subdomain in my case? Thank you!
Postfixissue, you might want to take a look at Postfix Address Rewriting - Masquerade. I can't tell you this is the solution to use, but it worked perfectly when I had the same issue as yours.