openDKIM problem with milters - I was having a problem with getting a proper reboot of the MTA with mailarchiva setup as a milter server. openDKIM was barfing:
Oct 25 16:47:04 mta opendkim: OpenDKIM Filter: Unable to bind to port inet:email@example.com: Cannot assign requested address
Oct 25 16:47:04 mta opendkim: OpenDKIM Filter: Unable to create listening socket on conn inet:firstname.lastname@example.org
192.168.0.5 is my mailarchiva server, openDKIM *should* be running trying to find this port open on the localhost.
The problem is that the Zimbra config for openDKIM includes the variable %%zimbraMilterBindAddress%% in /opt/zimbra/conf/opendkim.conf.in under the Socket attribute.
Socket %%zimbraInetMode%%:8465@%%zimbraMilterBindAddress% %
Thus if you change the milter bind address while the MTA and mailarchiva server are running it appears to work, however upon reboot, the opendkim file gets rewritten from source and then openDKIM starts complaining about trying to run on a server (192.168.0.5 instead of localhost). This stops the MTA from working.
Since openDKIM is only going to be running on the localhost I rewrote the line in opendkim.conf.in to
Restarting the MTA now rewrites opendkim.conf with the proper configuration and starts correctly.
I'm sure the Zimbra developers will have a more graceful solution, but for now, if you are running into the openDKIM error, this is a viable workaround.