On Mar 15, 2005, at 5:01 AM, Claas Langbehn wrote:
I managed to do write a wrapper in perl:

No need to use a temp file. Here's a function I use to authenticate a user. It will return the username if it was a good user/pass combo, or an empty string if not.

my $VPOPMAIL_PATH = '/home/vpopmail/bin/';
my $BINTRUE_PATH = '/bin/true';
sub vchkpw {
        my $user = fixemail (shift);
        my $pass = shift;

open (CHECK, "|$VPOPMAIL_PATH/vchkpw $BINTRUE_PATH 3<&0") or return "";
print CHECK "$user\0$pass\0";
close (CHECK);

        return ($? >> 8 ? "" : $user);

QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/
You don't need a laptop to troubleshoot high-speed Internet: sniffter.com

Reply via email to