Re: [Exim] SQL lookup fallthrough

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Bo Mellberg
Data:  
Para: exim-users
Asunto: Re: [Exim] SQL lookup fallthrough
----- Original Message -----
From: "Bo Mellberg" <bosse@???>
To: "Bo Mellberg" <bosse@???>
Sent: Monday, April 22, 2002 3:04 PM
Subject: Re: [Exim] SQL lookup fallthrough


> I think I have located the error in my script. When
> I try to match $local_part with a table in my database,
> if that table doesn't exist, the lookup just doesn't fall through
> but fails completely, so the rest of the script isn't checked.
>
> Is there a way to check the database if a table exists, before
> make the mySQL-query?
>
> Thanks again!
>
> /Bo
>
> ----- Original Message -----
> From: "Bo Mellberg" <bosse@???>
> To: "exim-users" <exim-users@???>
> Sent: Monday, April 22, 2002 10:30 AM
> Subject: [Exim] SQL lookup fallthrough
>
>
> > Hi!
> >
> > How do I write a mySQL-router that, if the lookup fails,
> > continues to the next router?
> >
> > I put the router after the system_aliases router like this:
> >
> >
> > system_aliases:
> > driver = redirect
> > allow_fail
> > allow_defer
> > data = ${lookup{$local_part}lsearch{/etc/aliases}}
> > # user = exim
> > file_transport = address_file
> > pipe_transport = address_pipe
> >
> > mysql_system_aliases:
> > driver = redirect
> > allow_fail
> > file_transport = address_file
> > pipe_transport = address_pipe
> > data = ${lookup mysql{select members.emailaddress from members,
> > $local_part where members.sheetnumber =
> > $local_part.sheetnumber}{$value}fail}
> >
> >
> > after this comes the standard userforward etc.
> >
> > The lookup works fine, but if it fails, the script doesn't continue to

the
> > next router.
> > What am I doing wrong?
> >
> > Thank you for your time,
> >
> > /Bo
> >
> >
> > --
> >
> > ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
> >
> >
>