Change password hash algorithm

Hi,

I’m trying to change the hash algorithm of my Dovecot server from MD5 to SSHA256. I wanted to generate the new hash when a user is logging in, because than I have the plain password. But it seems that this is not so easy. I don’t know how to store the password, so that I can easily run a script with it.

I’m running Dovecot 1.2.15 on Debian Squeeze.

I hope you have any tips for me 😉