One way to remove the mail server FQDN from the mail header when using OpenSMTPD.
I run a mail server for my domain. It runs OpenBSD 6.1 which uses the new OpenSMTPD mail application to send and receive mail. In older versions of OpenBSD it used sendmail to do this job and I could set it up to masquerade my email address as coming from my domain name as apposed to coming from my fully qualified host name (FQDN).
For example, if my machine was called nitro, then the FQDN would be nitro.example.com but sendmail would just strip off the nitro part when sending mail so it was sending mail "from" [email protected] instead of [email protected]. All good.
Now for the life of me I couldn't find a way to make OpenSMTPD do this masquerading so I ended up with [email protected] instead of [email protected], not what I wanted. From the research I did it appears it's a feature being worked on but not yet available in the configuration of OpenSMTPD.
But, alas, there is a workaround. That is to tell the "mail" program to substitute the "from" address with what you want. so for each user you just have to modify the .mailrc to include the statement "set [email protected]" which is slightly inconvenient but nevertheless doable.