I setup an mailserver with Postfix and configured it to use Cyrus SASL to authenticate my users. It worked perfectly, until I found out that I can login with shorter passwords than they actually are.
For example the Password should be uhuh1234h22 i can login with:
uhuh1234
uhuh1234h
uhuh1234h2
uhuh1234h22
But not with anything shorter...
I tested that with this command:
testsaslauthd -u USERNAME -p PASSWORD -s smtp -f /var/spool/postfix/var/run/saslauthd/mux
My question is why this happens and how I can prevent that?
Edit
My configuration file in /etc/pam.d/smtp is:
auth required pam_mysql.so user=USR passwd=PASS host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=USR passwd=PASS host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1