Re: [exim] perl authenticator

Top Page
Delete this message
Reply to this message
Author: Odhiambo G. Washington
Date:  
To: Gilbert Wong
CC: exim-users
Subject: Re: [exim] perl authenticator
* Gilbert Wong <jaguar_fender@???> [20050301 13:19]: wrote:
> Hi,


Hi Gilbert!


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


Are you on Debian? :-)

> #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.


Without commenting on your script, may I ask if the output of the
following command shows that support for perl is compiled into
Exim:

#ldd `which exim`    # Or ldd /path/to/exim


Does it show anything like libperl.so??


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


What would you like to achieve with these ones? What is the task at
hand?

Also, there are better methods of authenticating than using the perl
script. Why is it that you are tied to this script? What are your setup
limitations that are tying you down to this?



        cheers
       - wash 
+----------------------------------+-----------------------------------------+
Odhiambo Washington                    . WANANCHI ONLINE LTD (Nairobi, KE)  |
wash _at_ wananchi _ dot _ com        . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223            . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121            . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"  
                         --from a /. post