[exim] perl authenticator

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Gilbert Wong
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] perl authenticator
Hi,

i'm using exim 4.34 and having a problem using perl
(v5.8.4) with it.

#main configuration file
perl_startup = do '/etc/exim4/auth.pl'

#content of "auth.pl"
use Crypt::PasswdMD5;

sub chk_passwd {
    $salt = $_[0];
    if (defined $salt) {
        $c_pwd = unix_md5_crypt($_[1], $salt);


        if ($salt eq $c_pwd) {
            return "yes";
        } else {
            return "no";
        }
    } else {
        return "no";
    }
}


#authenticator:
mysql_plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = ${perl{chk_passwd}{${lookup
mysql{SELECT passwd FROM mail_users WHERE
login='$2'}{$value}fail}}{$3}}
server_set_id = $2

it seems to me that ${perl ...} do not take effect at
all.

btw, i have a hard time figuring out how to use:
Exim::write_log(), server_debug_print, debug_print.

could anyone pls help.
thx in advance.




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com