Re: [exim] smtp authentication using default domain

Góra strony
Delete this message
Reply to this message
Autor: Jakob Hirsch
Data:  
Dla: alexis
CC: exim-users
Temat: Re: [exim] smtp authentication using default domain
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?