Regular readers will know I've had an on/off battle with mail deliverability for a few years now, mostly aimed at Microsoft/Hotmail addresses (the main thread on that is here, and a related one here). That one's still unresolved on their end, and after this long getting nowhere with their support I've more or less accepted it's a "some day" problem rather than a "today" one.
While going through the mail server logs properly (something I don't do often enough, in fairness) I found something separate and rather more concerning: DKIM signing had been switched off on the server entirely.
For anyone not familiar, DKIM is one of three checks (along with SPF and DMARC) that receiving mail servers use to work out whether an email claiming to be from a domain actually came from that domain, or from someone pretending. DKIM specifically adds a digital signature to outgoing mail, signed with a private key that only the sending server holds, which the receiving server checks against a public key published in DNS. If it doesn't sign correctly, or isn't there at all, your mail looks a lot more like something a spammer would send, which does nobody any favours.
I was fairly sure I'd set this up properly years ago using a different DKIM system entirely, but going back through everything there's no evidence any other system was ever installed, it's always been the same one. Best guess is it started causing mail to hold or fail at some point, got switched off to make the problem go away, and then just got forgotten about, the way these things do when there's no obvious symptom pointing back at it. It stayed that way until Claude spotted it a few days ago while going through the logs for something else entirely.
Digging further turned up a second, older problem sitting underneath the first. This server sends mail for several domains, including the two exxos ones (exxosforum and exxoshost) and others, and all of them had been signing under a single DKIM key registered to exxosforum's own domain. That's fine for exxosforum itself, but for the rest it breaks DMARC alignment, since the signature doesn't match the domain the mail claims to be from. So even with DKIM nominally working, most of the mail leaving this box would still have looked suspicious to anywhere strict enough to check properly.
As for why it likely got switched off, the probable culprit was a missing setting (milter_default_action) that controls what the mail server does if the DKIM signing service doesn't answer in time. Left unset, it defaults to holding the mail rather than sending it, which is exactly the kind of thing that ends with someone switching the whole lot off in frustration rather than tracking down why mail was getting stuck.
Separately, the store side of things sends its own mail through PHPMailer rather than the forum's own mail path, and that turned up its own small pile of history while I was in there. There were two duplicate copies of it kicking about, both carrying the same manual patch I'd made a while back to stop it falling over when an email address or name came through empty. Both copies got consolidated down to one, and then that one was updated to the current official release, which has its own, slightly more thorough version of the same fix built in, so the manual patch isn't needed any more. While in there it also turned up that the store's own attempt at DKIM signing had been pointing at the wrong file the whole time, the DNS text record instead of an actual private key, so it had been silently failing on every single email without ever throwing an obvious error. Removed, since real signing now happens properly at the server level for everything regardless.
Fixed now, properly:
- A separate DKIM key generated for each domain, with new records published in DNS for each one
- The missing setting corrected so a slow signing check no longer holds mail hostage
- DKIM re-enabled and verified with real sent mail, headers checked across every domain, all passing
- PHPMailer tidied up to one current copy instead of two old ones, and the broken app-level DKIM attempt removed
To be clear, none of this explains the Microsoft situation, which remains its own mystery. But it should have been fixed a long time ago regardless, it's just that running a server these days comes with so many things to fix, update and keep on top of that there simply aren't enough hours in the day to keep trawling the internet hoping for an answer on every single one of them.
It's only because of using AI properly lately that I've been able to go back and actually revisit problems like this rather than leave them filed under "one day". DKIM is now confirmed working, which alone is a fair chunk of time saved, what would probably have been weeks of poking around trying to work it out by hand took a couple of hours of Claude session tokens instead.
