Configuring postfix to handle email on multiple domains without being an open relay

5,692

In your main.cf you need to set your mydestination parameter.

it should have something like:

mydestination = $myhostname, localhost.$mydomain, $mydomain

You need to change it to:

mydestination = $myhostname, localhost.$mydomain, domain.net, domain.com

More info on the parameter:

http://www.postfix.org/postconf.5.html#mydestination

Share:
5,692

Related videos on Youtube

warren
Author by

warren

I'm a hobbyist programmer, part-time sysadmin, and full-time analytics, big data, data center management, automation, and cloud computing architect and delivery engineer.

Updated on September 18, 2022

Comments

  • warren
    warren almost 2 years

    There was a question about open relays asked previously.

    I have a new CentOS 6 server handling multiple domains for several customers.

    On the previous server (which was running CentOS 4), I had sendmail configured to handle incoming mail for several domains.

    The goal is to replicate the old functionality on the new server - but my experience with administering mail is limited.

    Ideally, I want a given mailbox to be addressable via any of the allowed domains. Eg [email protected] & [email protected] should be the same inbox (since the user exists on the same server).

    Ultimately, I anticipate we will be splitting mail and web traffic, but the traffic demands just aren't that high yet.

    How can postfix be configured to handle multiple incoming domains for the same mailboxes?