Results 1 to 8 of 8

Thread: Postfix and fully qualified name

  1. #1
    Join Date
    Mar 2014
    Beans
    51
    Distro
    Ubuntu 14.04 Trusty Tahr

    Postfix and fully qualified name

    Hello,
    I purchased a server from a hosting provider and I need to configure it. I also purchased a domain, say 'fireworks.com' and I decided to call my server 'ubuntu-18.04'.
    How am I expected to edit /etc/hosts?

    127.0.0.1 localhost
    203.0.113.10 fireworks.com ubuntu-18.04

    or

    127.0.0.1 localhost.localdomain localhost
    203.0.113.10 ubuntu-18.04.fireworks.com ubuntu-18.04

    ?

    Also, Postfix during initial configuration, asks to enter the fully qualified name of my domain.
    Considering I want my email addresses be of in the form of sam@fireworks.com and not sam@ubuntu-18.04.fireworks.com, what am I expected to enter as fully qualified name of my domain?

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix and fully qualified name

    You need to configure an MX record in your DNS zone file that designates ubuntu-18.04.fireworks.com as the host that accepts mail for fireworks.com.

    Code:
    $ host -t mx ubuntu.com
    ubuntu.com mail is handled by 10 mx.canonical.com.
    Usually you want to accept mail for both fireworks.com and for ubuntu-18.04.fireworks.com. See the "mydestination" parameter in /etc/postfix/main.cf: http://www.postfix.org/BASIC_CONFIGU...#mydestination. In fact, you should read all of that document at least twice.

    And yes, use the second entry for /etc/hosts. You might also want to include fireworks.com as an alias. These entries are purely local to your machine. They have no relevance for people sending you mail from outside. For that, the MX record is used.
    Last edited by SeijiSensei; January 8th, 2020 at 05:47 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Mar 2014
    Beans
    51
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Postfix and fully qualified name

    Thank you SeijiSensei for your reply.
    With this configuration, will I be able to receive email sent to sam@fireworks.com, or the email should be sent to sam@ubuntu-18.04.fireworks.com?
    Also, what is the fully qualified name of my domain for Postfix?
    Last edited by fangorn2; January 8th, 2020 at 06:12 PM.

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix and fully qualified name

    If the MX record is correctly configured, and the "mydestination" parameter includes fireworks.com in the list of valid names, you can receive mail as sam@fireworks.com.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Mar 2014
    Beans
    51
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Postfix and fully qualified name

    Thanks SeijiSensei, I would use as you suggested ubuntu-18.04.fireworks.com as destination of my MX record.
    This is the first time I edit my DNS zone: would that be OK? Or it would be better to use fireworks.com or 2 MX records, one for ubuntu-18.04.fireworks.com and one for fireworks.com?

  6. #6
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix and fully qualified name

    Mail for specific hosts don't require an MX record. You want to add an MX record for the domain:
    Code:
    @     IN     SOA     fireworks.com.     root.fireworks.com. (
    [stuff]
    )
    
          IN     MX      0 ubuntu-18.04.fireworks.com.
    
    [etc.]
    The "0" is a priority. You can have multiple MX hosts with different priorities. The numbers establish a simple rank order. The lowest value will be tried first. If it's offline, remote servers will try the next server in the list.

    Trailing periods are important. You can specify the host as simply "ubuntu-18.04" or with a fully-qualified name like "ubuntu-18.04.fireworks.com". The trailing period refers to the root nameservers.
    Last edited by SeijiSensei; January 8th, 2020 at 11:10 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Mar 2014
    Beans
    51
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Postfix and fully qualified name

    Thank you SeijiSensei!

  8. #8
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix and fully qualified name

    Let us know if this all works for you. And if it does, mark the thread [SOLVED] using the Thread Tools drop-down above.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •