It seems like the fundamental problem is that the module needs to be chosen before the user filter is available. Could this be done using the sysconfig file (/etc/sysconfig/mimedefang) instead of in the filter?