Where it’s at - New VPS.
Clean OS, fresh VMin 8 install.
Restore system settings from old server.
Edit selector in opendkim.conf
Disable and then re-enable the “Signing of outgoing mail enabled”
Old system.
Send an email to gmail, check Show Original - all good.
Transfer domain to new system
Back to new VPS.
Copy/paste DKIM record from Suggested DNS Records to the DNS zone file. Reload named on DNS server (external, not VMin).
Wait for propagation (1m) Get coffee.
Disable signing of outgoing mail
Send email to gmail. Accepted - proves SPF is OK.
Enable signing of outgoing mail
Send email to gmail - it works! DKIM lives with my choice of name.
Possibly getting the coffee made a difference allowing more time for google to see the updated DNS, the 60 second TTL isn’t long enough to wait.
We could make it selectable when DKIM is first enabled, but changing it afterwards is tricky as this could break signatures for emails in the process of being delivered.
Yes, that’s true. However, if we make it configurable somewhere in the Virtualmin config page, it won’t be obvious, and most users won’t change it anyway.
And, also, we currently generate a new selector for every new install. What happens during migration? Do we correctly use the system’s new DKIM selector afterward?