Re: [exim] SQL-macros in auth-section

Page principale
Supprimer ce message
Répondre à ce message
Auteur: info
Date:  
À: kalle, exim-users
CC: 
Sujet: Re: [exim] SQL-macros in auth-section
hi !
Perhaps this might help :

my config :

<--------snipp------------->
login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = Username:: : Password::
        server_condition =${if eq{$2}{${lookup mysql{select clear from virtual_users where address='$1'}{$value}fail}} {yes}{no}}
        server_set_id = $1


<-----------------snapp------------->


$1 = <email-address>
$2 = <clear - text - password>

<----- perhaps matching your config it should look like this : ------------->

login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = Username:: : Password::
        server_condition =${if eq{$2}{${lookup mysql{select password from mailsettings.mailauth where domain='$1'}{$value}fail}} {yes}{no}}
        server_set_id = $1


^^this one looks for a match between the given pw($2) at smtp and the one found for the given username aka $1 in your DB.


>client_send = ${lookup mysql {SELECT username FROM mailsettings.mailauth \
>
>        WHERE domain = '${domain:$1}'}}



kind regards
Malte Geierhos

-------- Original Message --------
Subject: [exim] SQL-macros in auth-section (16-Jun-2005 18:39)
From:    kalle@???
To:      info@???


> Hi!
>
> I'm having some trouble getting a mysql-query to work from the auth-section.
>
> This is what I have managed to peice together by googling and reading this
> list :)
>
> # route
> route_domain2_com:
> driver = manualroute
> domains = domain2.com
> route_list = * my.mailserver.tld
> host_find_failed = defer
> transport = remote_smtp_auth
>
> # transport
> remote_smtp_auth:
> driver = smtp
> hosts_require_auth = my.mailserver.tld
>
> # auth
> login:
> driver = plaintext
> public_name = LOGIN
> server_prompts = "Username:: : Password::"
> client_send = ${lookup mysql {SELECT username FROM mailsettings.mailauth \
>
>        WHERE domain = '${domain:$1}'}}

>
>
> I'm trying to get exim to use a specifict username/password for each domain
> that my server is relaying mail to.
> I have been fiddling with this for most of the day but cant get it to work.
> I'm getting errors like this no matther how I write the lookup-code:
>
> 2005-06-16 18:11:03 1DiwxH-0004kS-5B <= from-user@??? H=localhost
> (ll) [127.0.0.1] U=1000 P=smtp S=199
> 2005-06-16 18:11:03 1DiwxH-0004kS-5B == to-user@???
> R=route_domain2_com T=remote_smtp_auth defer (0): expansion of "${lookup
> mysql {SELECT username FROM mailsettings.mailauth WHERE domain = '${domain"
> failed in login authenticator: "${domain" is not a known operator (or a }
> is
> missing in a variable reference)
>
> Can someone please explain what I'm doing wrong?
>
> Btw.. I'm using exim-4.50
>
> TIA
>
> /Kalle
>
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://www.exim.org/eximwiki/



To: kalle@???
    exim-users@???