I run an infrastructure with one mail server and several web servers. In the default Enhance setup, DKIM keys are generated only for emails sent from the mail server. Web servers use their own Postfix to send emails directly, but these emails are not signed.
I created a script to automatically synchronize the DKIM configuration from the mail server to the web servers.
- Runs as a systemd service
- Uses inotify to monitor changes in the mail server’s DKIM configuration
- Updates the configuration on all defined web servers and restart opendkim
Documentation and source code are available on GitHub:
https://github.com/lynt-smitka/enhancecp-dkim-sync
I've been using it for a while, but now I've tried to improve it to make it usable by other people and opensourced it.
I hope someone will find it useful too. 🙂