Openfire can be enabled to pass authentication to underlying database.
This might be useful if passwords stored by mysql PASSWORD function or some other way inaccesible from openfire directly.
There is a library available to enable such behaviour.
It will pass authentication process to database.
Remember to build from source, attached file is just a nothing but a recent snapshot (working though).
See linked wiki for configuration and Dovecot example
extended-jdbc-0.0.1-SNAPSHOT.jar (13417 Bytes)