
Mail::PopPwd - Perl 5 module to talk to a poppasswd daemon

use Mail::PopPwd;
my $poppwd = Mail::PopPwd->new(
HOST => "localhost",
USER => "hdias",
OLDPWD => "********",
NEWPWD => "********");
my $error = $poppwd->change();
# set hash values
$poppwd->{HOST} = "localhost";
$poppwd->{USER} = "hdias";
$poppwd->{OLDPWD} = "********";
$poppwd->{NEWPWD} = "********";

This module implements an Object-Oriented interface to a poppassd daemon. It can be used to write perl-based clients to change users password (you can use this for change passwords via www clients).

Mail::POP3Client->new(
HOST => "local",
PORT => 106,
USER => "",
OLDPWD => "",
NEWPWD => "",
TIMEOUT => 0,
);

These commands are intended to make writing a poppassd client easier.
Construct a new connection with this. You should give it at least 4 arguments; HOST, USER, OLDPWD and NEWPWD. All others arguments are optional. All passwords are send in clear text.
Check password against given paramenters; STOREDPWD, NMIN, NMAX, NDIFCHARS, NSEQWORD and CRACKLIB if you set the path to the dictionary (check the password for their appearance in dictfile). Return a error code if the passwords are invalid.
Connect to poppasswd daemon and change the old password to the new password. Return a error if the connection fail.

USER empty
OLDPWD empty
NEWPWD empty
CONFPWD empty
length of NEWPWD lesser then NMIN
length of NEWPWD greater then NMAX
STOREDPWD and OLDPWD do not match
CONFPWD and NEWPWD do not match
The NEWPWD must have NDIFCHARS or more different characters.
The NEWPWD and OLDPWD is similar
The NEWPWD and USER is similar
The NEWPWD and NAME is similar
BAD PASSWORD: it is based on a dictionary word or to easy

Henrique Dias <hdias@aesbuc.pt>

Based on poppassd by Pawel Krawczyk <kravietz@ceti.com.pl>, http://www.ceti.com.pl/~kravietz/prog.html
and
change-pass.cgi by mp@atlantic.net
Thanks to Anita Afonso for the revision.

perl(1).