milter_protocol silent change breaks Rspamd on Ubuntu 20.04

When installed on Ubuntu 20.04 LTS, Virtualmin configures Postfix to use

milter_protocol = 2

which works for OpenDKIM.

But I also added Rspamd to block spam during incoming smtp, and that requires manually editing /etc/postfix/ to set milter_protocol = 6.

Ordinarily this would be a harmless manual tweak.

However, any time DKIM is re-initialized, Virtualmin silently changes milter_protocol back to 2, and Rspamd breaks.

So here’s a suggested fix: Initialize milter_protocol to any desired level when Virtualmin is initially installed, but don’t change it subsequently. The idea is to not override a manual tweak.


Yes, this is correct, currently it’s hard-coded and forced to be set to value 2. @JamieCameron Jamie, should we not forcefully change the value, if directive already exists, but only if DKIM is not re-enabled. If it’s disabled and then re-enabled again, we can assume safely setting it to 2. If it’s just regular add new domain process, then we could respect currently set value.

Good idea - I’ll make this change in the next release.