Setting up MX record for static host for mail server

Discussion in 'Server Operation' started by yngwie, Mar 5, 2009.

  1. yngwie

    yngwie New Member

    I don't understand how the MX record works. From what I read you have to point the MX record to your computer and has something to do with hostname? This is my first attempt at configuring a mail server using postfix on Mandriva 2009. I have a static host configured at and an MX record. So if my web site or static host is do I make the MX record or does it have to match my computer hostname or does it even matter what I name the MX record?

    2nd question
    My computer has two nics one is for lan (eth1 ) hostname: pegasus and the other is for my internet connection 24.x.x.x.(eth0). My computer hostname is pegasus which points to

    Trying to follow this guide but confused as to what hostname should be and MX record They use 192.x.x.x address and for the example. Doesn't it have to be FQDN or is that just the MX record has to be FQDN?

    My guess is I use pegasus for hostname in postfix but where do I plug in the MX record in mail server configuration:
    postconf -e 'myhostname = pegasus'
    postconf -e 'mydestination = pegasus, localhost, localhost.localdomain'
    postconf -e 'mynetworks ='
    postconf -e 'virtual_alias_domains ='???
  2. falko

    falko Super Moderator ISPConfig Developer

    First you must create an A record, e.g. or
    Then you create an MX record as follows:
    Code: MX 10 (or
    This is if you want to receive emails for (e.g. [email protected]).
    If you want to receive emails for (e.g. [email protected]), your MX record should look as follows:
    Code: MX 10 (or
    Take a look at this tutorial:

    I'd get a hostname at and use that one.

Share This Page