wiki:postfix-multi-relay

Version 2 (modified by Jamie McClelland, 7 years ago) (diff)

--

Postfix Multi Relay

We are running two servers (rustin in Telehouse and cleveland in XO) that are configured to run multiple instances of postfix.

These servers relay mail on behalf of our servers that send bulk mail:

  • leslie.mayfirst.org (lists.mayfirst.org)
  • assata.mayfirst.org (lists.people-link.net)
  • morales.mayfirst.org (lists.portside.org)
  • mx3.mayfirst.org (listas.laneta.apc.org)

The relays

Currently, there is only one relay setup on rustin. The setup is handled in puppet by the following lines in rustin's pp file:

 class { "m_postfix::multi":
    smtp_bind_ip => "216.66.22.61",
    multi_instance_directories => [ "postfix-a" ]
  }
  m_postfix::multi_relay_instance { "postfix-a":
   smtp_bind_ip => "216.66.23.37",
   mynetworks => $::mfpl_relaying_ips
  }

The first stanza should be included once for each host.

The second stanza should be repeated for each relay instance on that host.

When adding a new instance:

  • Create a DNS Host record that associates the IP address to the host (e.g. rustin.mayfirst.org <=> 216.66.23.37).
  • Create an A record set to a.rustin.mayfirst.org (or b or c, etc corresponding to how you have named the instance).

Using the relay

To use a relay, add an entry to /etc/postfix/transport.relay, e.g.:

hotmail.com	smtp:a.rustin.mayfirst.org

The line above says: relay all mail destined for hotmail.com through a.rustin.mayfirst.org.

At the moment this must be done by hand on each individual server. Once fully tested, it will be handled by puppet.