Re: [exim] smtp authentication using default domain

Pàgina inicial
Delete this message
Reply to this message
Autor: alexis
Data:  
A: exim-users
Assumpte: Re: [exim] smtp authentication using default domain
How many "and" conditions can be inside an if?


Look

5133 failed to expand:
${if and { {!eq{$1}{}} {!eq{$2}{}}
{eq{${domain:$1}}{}{defaultnone}{${domain:$1}}}
{crypteq{$2}{\{md5\}${lookup mysql{SELECT password FROM users WHERE
username='${local_part:$1}' AND domain='${domain:$1}'}{$value}fail}}}
} {yes}{no}}

 5133    error message: missing } at end of condition inside "and" group
 5133 expansion failed: missing } at end of condition inside "and" group


i cannot realize where's missing that bracket.


On 7/1/07, Ted Cooper <eximX1211@???> wrote:
> alexis wrote:
> > Please, can you help me how to to this in exim directly (to ask for a
> > default domain if none is provided). because i created a stored
> > procedure on mysql and i need to specify client_flags on the
> > connection string for this to work and i cannot get it working (the
> > connection string) on exim.
> >
> > what i want is if user doesnt provide a domain in it's username,
> > append a default domain.
>
> I ran into a problem very similar to this the other day. All my SMTP
> AUTH username are username@??? styled. If someone tried to
> authenticate without an @domain.name part it went a little wonky and
> tried to open a directory to lsearch. To fix the problem, I created a
> default file in that directory and exchanged ${domain:$1} with:
>
> ${if eq{${domain:$1}}{}{defaultnone}{${domain:$1}}}
>
> So that if the {$domain:$1} part expands to the empty string, the whole
> thing expands out to "defaultnone". Otherwise it expands into what I
> really wanted in the first place :P
> I have a "defaultnone" file stored in with all the domains which is a
> completely empty file. No username/password combination will ever work :)
> With a few minor tweaks, the same thing should work with your database.
> Just create a fake domain in there that's never going to work and
> replace a few bits. Have fun!
>
> Ted.
>
>
> --
> The Exim Manual
> http://www.exim.org/docs.html
> http://www.exim.org/exim-html-current/doc/html/spec_html/index.html
>
> --
> ## 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/
>