10

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
Braiam
  • 67,791
  • 32
  • 179
  • 269
ptheo
  • 1,676
  • 1
    myorigin = $mydomain will use the dnsdomainname of the system which should be your example.com domain. – douggro Dec 26 '13 at 21:05

1 Answers1

11

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
Calimo
  • 1,172
  • 17
  • 23