GreenArrow Email Software Documentation

Recipient MX Selection


This document describes how GreenArrow, for remote delivery attempts, determines the order of mail exchanger servers to which to attempt delivery.

DNS Resolution

For remote delivery attempts, GreenArrow issues an MX query for the recipient’s domain name. If no domains are returned, the A records for the recipient’s domain name will be used for delivery.

The MX records are then sorted according to their ascending MX priority. MX records with equal priority are randomized within that list.

GreenArrow then issues A record queries for the MX domain names it will attempt. If an MX domain name has multiple A records, the order of those A records will be randomized in the final list of IPs to which we will attempt delivery.


Given this configuration

Recipient address:

[email protected]

MX records for MX 10 MX 10 MX 10 MX 20 MX 20 MX 30 MX 40 MX 40

A records for the MX domain names: A A A A A A A A A A A

These results occur

The MX servers of equal priority will be randomized; so in the list of MX servers,,, and will be randomized – but they will all be positioned ahead of etc.

Once that list is determined, each domain’s IPs are randomized and added to the list.

Here’s an example order we might attempt delivery: A A A A A A A A A A A

Notice that each MX domain is still grouped together, but its individual A record IP addresses have been randomized.

Copyright © 2012–2024 GreenArrow Email