In our postfix setup, we are using the pam_mysql module to authenticate the user from the MySQL database. ( similar to this link)
Which is perfectly working fine. We are using SHA512_CRYPT() for storing password using ENCRYPT() MySQL function.
However, ENCRYPT() function is not available on MYSQL 8. Hence we are trying to figure out an alternative way to move the encryption from SHA512_CRYPT to SHA512 / SHA256 or similar
Even though the repo support for sha512 and it's not available in the latest release pam_mysql-0.8.1-0.22
Only other options available with the latest version of pam_mysql are a crypt,md5, and sha1. Since these are not good hashing algos we don't want to use them.
Also, do not want to overload Dovecot for authentication, hence not using Dovecot SASL auth postfix authentication
Please suggest an authentication mechanism which we can use with postfix to authenticate the user with SHA512 or SHA256 ( Not SHA512-CRYPT) from MySQL Database.