| 3 | | We are running two servers (rustin in Telehouse and cleveland in XO) that are configured to run multiple instances of postfix. |
| 4 | | |
| 5 | | These servers relay mail on behalf of our servers that send bulk mail: |
| 6 | | |
| 7 | | * leslie.mayfirst.org (lists.mayfirst.org) |
| 8 | | * assata.mayfirst.org (lists.people-link.net) |
| 9 | | * morales.mayfirst.org (lists.portside.org) |
| 10 | | * mx3.mayfirst.org (listas.laneta.apc.org) |
| 11 | | |
| 12 | | == The relays == |
| 13 | | |
| 14 | | Currently, there is only one relay setup on rustin. The setup is handled in puppet by the following lines in rustin's pp file: |
| 15 | | |
| 16 | | {{{ |
| 17 | | class { "m_postfix::multi": |
| 18 | | smtp_bind_ip => "216.66.22.61", |
| 19 | | multi_instance_directories => [ "postfix-a" ] |
| 20 | | } |
| 21 | | m_postfix::multi_relay_instance { "postfix-a": |
| 22 | | smtp_bind_ip => "216.66.23.37", |
| 23 | | mynetworks => $::mfpl_relaying_ips |
| 24 | | } |
| 25 | | }}} |
| 26 | | |
| 27 | | The first stanza should be included once for each host. |
| 28 | | |
| 29 | | The second stanza should be repeated for each relay instance on that host. |
| 30 | | |
| 31 | | When adding a new instance: |
| 32 | | |
| 33 | | * Create a DNS Host record that associates the IP address to the host |
| 34 | | (e.g. rustin.mayfirst.org <=> 216.66.23.37). |
| 35 | | * Create an A record set to a.rustin.mayfirst.org (or b or c, etc corresponding |
| 36 | | to how you have named the instance). |
| 37 | | |
| 38 | | == Using the relay == |
| 39 | | |
| 40 | | To use a relay, add an entry to /etc/postfix/transport.relay, e.g.: |
| 41 | | |
| 42 | | {{{ |
| 43 | | hotmail.com smtp:a.rustin.mayfirst.org |
| 44 | | }}} |
| 45 | | |
| 46 | | The line above says: relay all mail destined for hotmail.com through a.rustin.mayfirst.org. |
| 47 | | |
| 48 | | You will then need to run the commands: |
| 49 | | {{{ |
| 50 | | # postmap transport.relay |
| 51 | | # postfix flush |
| 52 | | }}} |
| 53 | | |
| 54 | | These commands say respectively, convert the transport.relay into transport.relay.db (so postfix can use it) and flush the mailq. |
| 55 | | |
| 56 | | At the moment this must be done by hand on each individual server. Once fully tested, it will be handled by puppet. |
| | 3 | This documentation is superseded by [wiki:bulk-mail-relay]. |