I'm spinning up a new Ubuntu 22.04/Virtualmin 2.021 installation and I've hit problems with DKIM signing not working on outgoing mail (via Postfix), which has been a common problem over the years (not always Webmin's fault). I'm pleased to report that most of the earlier problems are now resolved but there's one remaining one I thought I should report, because it took me some time to find and the answer didn't show up in Google.
In short, the linux user "postfix" needs to be manually added to the "opendkim" group (Webmin > System > Users and Groups > Edit user). That's it.
Hmm, odd that this group addition didn't happen as part of the DKIM package install. Did you just use the package that comes with Ubuntu 22.04 (or was installed by Virtualmin) ?
Yes, it was the standard Ubuntu package. I'm not sure exactly when it was installed - it's possible I installed it from the command line (using apt) before I enabled DKIM in Virtualmin, which would have triggered the same thing, I think.
Ok .. and what error did you get before the
postfixuser was added?You better ask this question at forum.virtualmin.com website.
Also, for DKIM to work properly, Virtualmin needs to have control over DNS or you should manually add DKIM related records to domain's DNS zone.
It's not a question, it's a bug report. It's not related to DNS at all as far as I can tell.
Did you see any error messages in
/var/log/maillogormail.log?No, at least nothing relevant as far as I could tell. The messages were sent successfully, just without their DKIM signature. It should be pretty easy to reproduce.
I had a look into this some more, and found that adding the
postfixuser to theopendkimgroup isn't necessary if a TCP socket is being used to communicate between Postfix and the DKIM milter. But it is needed if a socket file is used ... so I'll make sure the group is setup correctly in all cases in the next release.