DKIM Demystified
20i.com
20i.com
If you operate your own domain and you are worried about spoofing, implementing DMARC will put a stop to it with all the major email receivers (Gmail, Yahoo!, Microsoft, etc.), since they all respect DMARC.
But the really cool thing about DMARC is that it lets you receive feedback reports from email receivers with copies of these spoofed messages along with aggregate statistics showing you where spoofed email is originating.
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.S... (PDF obv.)
If it is for your own domain and you don't have customers for which you send emails on their domains, it is quite easy to set up on your own.
If you want to use DMARC, you should use an aggregation tool such as ours to process the reports. You typically start with the DMARC policy in 'none' mode, which only enables reporting. Using the reports you verify that all legitimate senders are correctly signing email with DKIM (and preferably are also SPF aligned) before you switch to a 'quarantine' or 'reject' DMARC policy.
As long as you have the following configured, then you shouldn't have any problems with getting classified as spam:
- Tight authorization on your SMTP server, obviously,
- SPF, to declare what IPs your domain sends from, so people can't spoof SMTP as you,
- DKIM to let your domain name sign your messages, so you can prove that you what arrived is what you intended to send,
- DMARC to link up the From header with the above, to prove that you're not spoofing senders, and
- The right MX and PTR records in youre DNS zones, to prove you're not spoofing IP addresses.
The above essentially amounts to setting up postfix, opendkim, and DNS, but there are a lot of moving parts, so it's easy to feel overwhelmed at first. Don't hesitate to PM me if you would like to set up your server and need some help.
There are plenty guides on setting up postfix. Follow them, cross reference a few, read the docs and use the various free email test sites to sanity check everything. If you've never done it before, expect to dedicate 2-3 days to this.
Ongoing maintenance is approximately nothing.
But don't forget to periodically check the TLS certificate of your SMTP server. Administrators often forget to renew the certificates, and automated renewal processes may also break.
I've seen countless examples of SMTP servers with expired certs. The problem is that you won't notice it, as SMTP will fall back to plain-text communication if the certificate is invalid. So the server will still work with an expired cert.
But if you want to do it right, or if you want to adopt MTA-STS, you usually need to do a bit of regular maintenance on the TLS part.
We've also had some of our users report that an expired cert was hurting their domain reputation for spam algorithms. We have not been able to verify that, but it sounds plausible.
From an inbox perspective these often look like cold outreach (you've never emailed this company before and the first email they send to you is after you order something) so it's suspicious, and being from a trusted platform helps pass the test.
If it is for yourself or for your single person company and YOU handle all the things and you know what is important and when emails are not delivered it is not that much of a problem.
[edit] having done a bit more research, I think the problem lies with the BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754809
Some List on behalf of John Sender <list@example.com>
... instead of ...
John Sender <john@other-example.com>
And now the list software can generate its own (valid) DKIM signature.
EDIT: Nevermind, listen to dbqpdb[0] instead. ARC sounds like a better way to go.
However the issue is fixed by the new ARC protocol though, which is supported by most major email providers & in most mailing list software as of like this year. Theoretically, just a matter of time until they update their software & the issue is resolved.
* https://en.wikipedia.org/wiki/Authenticated_Received_Chain
SPF: passed or failed
DKIM: passed or failed
DMARC: passed or failed
There are basically 0 violations, until I mail the Debian BTS or a mailing list, whereupon there are dozens. So it could be a problem at my end, Debian's end, or maybe downstream of Debian (e.g., if mail for foo@debian.org is forwarded on to someone else who has a misconfigured email setup...)
Regardless, my DMARC record has p=none so these reports are informational only. On the other hand, it's basically the reason I've never gotten around to changing it to p=reject...
A lot of owners reconfigured said software to rewrite the From header since Yahoo changed their DMARC policy to a hard fail and broke quite a lot of mailing lists in doing so, as the resulting backscatter caused the software to unsubscribe people from the mailing list when delivery failed if someone sent a message from their Yahoo account.
[1] https://blog.erratasec.com/2016/10/yes-we-can-validate-wikil...