our $LDAPCLIENT = "/usr/local/bin/ldapclient" ;
..................
my ( $x , $u , $d , $a ) = ( $LDAPCLIENT , $pw_name ,
$pw_domain , "userPassword" ) ;
my $pargs = "$x 127.0.0.1 \"o\=q\" \"\([EMAIL PROTECTED])\" $a 2\>/dev/null" ;
my @ldaplines = ( grep { /userPassword/ } ( readpipe ( $pargs ) ) ) if -x $x ;
if ( @ldaplines ) {
$ldaplines[0] =~ s/^.* (\w+)/$1/ ;
chomp $ldaplines[0] ;
$auth_pass = $ldaplines[0] ;
}
still stuck if qpsmtpd has "-T" but it's a little neater this way, and I've been logging the cram-md5 hash--
return ( OK , "authldap/$method passHash $passHash hmac" . hmac_md5_hex ( $ticket , $auth_pass ) ) ;
--nice.
-Bob Dodds
http://perlq.org/tinyldap/ http://perlq.org/tinyldap/auth_ldap.html