9

In a VPS with Ubuntu 12.04 LTS, I have installed postfix. The domain name is example.com, the VPS hostname is server.example.com. For the domain example.com I create an MX record. After that a mail server mail.example.com is up and running.

How to in postfix configuration main.cf set myhostname?

myhostname=server.example.com

OR

myhostname=mail.example.com
1
  • 1
    myorigin = $mydomain will use the dnsdomainname of the system which should be your example.com domain.
    – douggro
    Dec 26, 2013 at 21:05

1 Answer 1

10

The hostname is really the name of your VPS host. The name in your MX record goes into mydomain.

myhostname=server.example.com
mydomain=mail.example.com # if you receive emails as me@mail.example.com, or mydomain=example.com if you receive emails as me@example.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.