= Relay Server By Domain = One of our [wiki:email-deliverability email deliverability] strategies is to relay bulk email through different IP addresses based on the domain name of the recipient. In other words, all bulk messages sent by our members (this does ''not'' include private/individual messages - only messages sent to email lists) are sent to a different server depending on their destination (all email for Yahoo goes to one server, AOL mail goes to another, etc.). This strategy is based on our understanding that many big email providers allow or block sending IP addresses based on the ratio of valid email addresses to bad email addresses (among other criteria). By concentrating all email messages sent by our various bulk email servers (mostly leslie, assata - which provides bulk.mayfirst.org, and morales - which provides Portside) we can earn a good reputation based on sending thousands of legit emails per day. This strategy allows us to: * build a better reputation for any given email provider by combining all sent messages from all MF/PL servers so they originate from one, or a few, IP address * provide flexibility so we can easily redirect messages being blocked on one server to be redirect to a different relay server * permanently or temporarily rate-limit sending messages to certain providers, without affecting other providers * take special action on messages just before being relayed (see, for example, [wiki:dmarc-and-mailing-lists our technique to avoid strict DMARC rules]). By maintaining servers that ''only'' relay email out, we can safely apply rules that will not affect incoming messages. == How to make a change == Each server that is using this method has a file called /etc/postfix/transport.relay. This file lists all the domains that should be relayed instead of sent by the local server, as well as the domain it should be relayed to. You can edit this file to add or change entries (this file is not controlled by puppet). == Where to send? == We have two servers configured to relay email: * rustin (in Telehouse) * cleveland (in XO) Each of these servers is configured to use a postfix multi instance. That is a method that allows more than one instance of postfix to run on the same virtual server. Each instance sends via a different IP address. The instances are enumerable with the following command (as run on rustin): {{{ 0 rustin:# ls -d /etc/postfix* /etc/postfix-yahoo-a /etc/postfix-aol-a /etc/postfix-therest-a 0 rustin:# }}} /etc/postfix is the base instance. == Adding more instances == You can add more postfix instances to either rustin or cleveland via puppet. You'll need a free IP address. You can edit either server's .pp file to see existing examples and go from there. == Configuring a server to use the relay farm == * Edit /etc/postfix/main.cf, adding: {{{ transport_maps = hash:/etc/postfix/transport.relay }}} Or add this new line to the transport_maps line if it exists already. Then, run `postmap /etc/postfix/transport.relay` Lastly, add the server's IP address to the manifests/global.pp file in puppet.