Use different hostname only for postfix


I’m tying to set up my home server with Virtualmin.
I’ve bought a domain name and set the hostname of the system to
The server is supposed to handle for this domain :

  • A mail server (postfix)
  • Several websites under sub-domains (sub-servers in virtualmin)

When testing for the spam score of my outgoing mail, I was told to create A record to the name of my server whereas I only did CNAME records pointing to my @ A record which points to my home IP address.

My question is : I’d like my mail server to have a different hostname ( than the system hostname ( Is it wrong to only change the hostname in /etc/mailname/ and myorigin in postfix’s and keeping all other hostname parameters to the system host name ?



Those names don’t need to match, that shouldn’t matter.

If you run into any problems with that setup, just let us know, it should be a simple tweak.


Thanks for your answer, it seems to work well !