[Dovecot] dovecotpw
Brent Clark
brentgclarklist at gmail.com
Sat Mar 8 11:27:57 EET 2008
Hi
I would like to simulate dovecot's dovecotpw with a perl script
I tried / used
use Crypt::SaltedHash;
my $csh = Crypt::SaltedHash->new(algorithm => 'SHA-1');
$csh->add($passwd_string);
my $salted = $csh->generate;
also
use Digest::SHA1;
use MIME::Base64;
$ctx = Digest::SHA1->new;
$ctx->add($passwd_string);
$ctx->add('salt');
my $salted = '{SSHA}' . encode_base64($ctx->digest . 'salt' ,'');
But it doesnt work.
Basically what im doing is authenticating against a mysql db.
If i do a dovecotpw -s SSHA -p password
and update the DB, then the mail client authenticates perfectly.
If anyone can help, it would be most appreciated.
Kind Regards
Brent Clark
More information about the dovecot
mailing list