Re: [exim] smtp authentication using default domain

Góra strony
Delete this message
Reply to this message
Autor: alexis
Data:  
Dla: exim-users
Temat: Re: [exim] smtp authentication using default domain
sounds dangerous.
and what about to define a variable before (pseudo code) i cannot
realize how to do this with exim yet, im new using it.

if(!${domain:$1})
      $dvar='mydefaultdomain.com'
else $dvar=${domain:$1};


the other idea is to directly write a stored procedure to do this.

On 6/30/07, Jakob Hirsch <jh@???> wrote:
> alexis wrote:
>
> > server_condition = "${if and { \
> >                     {eq {${domain:$1}}{}{defaultdomain.com}} \

>
> Um? That doesn't make any sense.
> Move the "default domain" stuff into the query:
>
> ... domain='${quote_mysql:${if !eq {${domain:$auth1}} {}
> {${domain:$auth1}} {DEFAULT_DOMAIN}}}'
>
> (you could also do it entirely in SQL, but that'd look even more
> complicated.)
>
> btw, you are aware that you should quote_mysql for every externally
> provided string in your query, otherwise you are prone for sql injection?
>
>