Postfix: how to force MX lookup for 'local' domain?

Discussion in 'Installation/Configuration' started by random.guy, Nov 3, 2010.

  1. random.guy

    random.guy New Member

    Let's say my server's hostname is I also run various web based software packages, which send out e-mail to customers. This works great. The problem is that my server also sends out e-mail to [email protected].

    The problem is that the e-mail is not hosted on this server, it's actually hosted on a 3rd party e-mail server, so I am not getting these e-mails. Is there a way of forcing Postfix to use the MX records for, even if this is the local name of the server? The server will not be receiving ANY e-mail, just send out.

  2. jnsc

    jnsc rotaredoM Moderator

    There is an "External mailserver" option in ISPConfig. Don't forget to set it also for co-domains.
  3. random.guy

    random.guy New Member

    Oops, I didn't realize I was in the ISPConfig2 subforum, this is about a clean postfix install on Ubuntu 10.04 LTS. Hopefully a mod can move this thread.

    I am hoping I can avoid hardcoding the SMTP server, or I will run into problems when the 3rd party changes its MX records. I just want to force postfix to look up the MX records for whenever e-mail is sent to

    Mods: please move this thread, thanks!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Postfix is always doing this by default. So no need to configure something. Just do not create as local email domain.
  5. random.guy

    random.guy New Member

    Ok, finally figured it out. It looks like I had to set mydestination to nothing:
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Mydestination has to be set to the hostname of the server, it my not be empty. Just make sure that you use a subdomain for it as it is described in the perfect setup manuals.

Share This Page