Changes between Version 3 and Version 4 of relay-server-by-domain


Ignore:
Timestamp:
Jun 4, 2014, 11:38:53 AM (5 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • relay-server-by-domain

    v3 v4  
    1 = Relay Server By Domain =
    2 
    3 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.
    4 
    5 This strategy allows us to:
    6  * 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
    7  * provide flexibility so we can easily redirect messages being blocked on one server to be redirect to a different relay server
    8  * permanently or temporarily rate-limit sending messages to certain providers, without affecting other providers
    9  * 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.
    10 
    11 == How to make a change ==
    12 
    13 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.
    14 
    15 You can edit this file to add or change entries (this file is not controlled by puppet).
    16 
    17 == Where to send? ==
    18 
    19 We have two servers configured to relay email:
    20 
    21  * rustin (in Telehouse)
    22  * cleveland (in XO)
    23 
    24 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):
    25 
    26 {{{
    27 0 rustin:# ls -d /etc/postfix*
    28 /etc/postfix-yahoo-a  /etc/postfix-aol-a  /etc/postfix-therest-a
    29 0 rustin:#
    30 }}}
    31 
    32 /etc/postfix is the base instance.
    33 
    34 == Adding more instances ==
    35 
    36 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.
    37 
    38 == Configuring a server to use the relay farm ==
    39 
    40  * Edit /etc/postfix/main.cf, adding:
    41 {{{
    42 transport_maps = hash:/etc/postfix/transport.relay
    43 }}}
    44 
    45 Or add this new line to the transport_maps line if it exists already.
    46 
    47 Then, run `postmap /etc/postfix/transport.relay`
    48 
    49 Lastly, add the server's IP address to the manifests/global.pp file in puppet.
    50 
     1This page is replaced by [wiki:bulk-mail-relay]