| A few tips from setting up SPF/DMARC/DKIM for a SAAS service: * SPF: limit your record and all includes to 10 DNS lookups (e.g., "A MX include:_spf.google.com" is 3 DNS lookups plus all of the lookups inside the include. * DMARC: to see a strict reject policy, check out Yahoo: $ dig +short -t txt _dmarc.yahoo.com
"v=DMARC1\; p=reject\; pct=100\; rua=mailto:dmarc_y_rua@yahoo.com\;"
* Mail forwarding: if your app sends mail as the logged-in user, make sure the user's actual email address is not in the FROM address as Yahoo does not authorize you to send FROM: xxxx@yahoo.com* DMARC emails: use dmarcian.com to parse and process the auto-generated emails * SPF: use the ~all for your first day of testing and then lock it down to -all after testing is complete * DKIM: OpenDkim appears to be the most widely supported Linux software package. * DKIM keys: setup a TXT entry you control and ask client to CNAME it. Then setup key rotation. |
1. SPF -all can break forwarding with DMARC p=reject. If your recipients tend to forward your email, you probably want to stick with SPF ~all (or DMARC p=none) until standards settle (and get widely implemented) around rewriting headers during forwarding. [1]
2. Hotmail and Outlook.com recently introduced a change that breaks forwarding from any DMARC p=reject or p=quarantine sender, through a hotmail.com or outlook.com address, to any recipient MTA that enforces DMARC. There's not really anything you can do about this (as a sender) other than not use DMARC, so hopefully that gets fixed soon. [2]
[1]: https://blogs.msdn.microsoft.com/tzink/2015/07/12/what-is-th...
[2]: https://blogs.msdn.microsoft.com/tzink/2016/05/19/why-does-m...