Re: [Exim] Syntax for a MySQL select true/false statement

Pàgina inicial
Delete this message
Reply to this message
Autor: William Thompson
Data:  
A: Eli
CC: exim-users
Assumpte: Re: [Exim] Syntax for a MySQL select true/false statement
> Thanks - that's the syntax I was looking for. I didn't know it was that
> easy!


NP.
To me, a ${lookup and a ${if are the same thing except one has information
in $value. =)

> -----Original Message-----
> From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On Behalf
> Of William Thompson
> Sent: Wednesday, June 18, 2003 3:00 PM
> To: Eli
> Cc: exim-users@???
> Subject: Re: [Exim] Syntax for a MySQL select true/false statement
>
>
> > I want to do a MySQL select to test something, but I don't really have any
> > useful data to return. It's a test to see if a user account has
> forwarding
> > enabled (or is an alias), or is a real account to receive actual delivery
> of
> > email. Right now I have:
> >
> > virtual_user:
> >         driver                  = accept
> >         domains                 = +virtual_domains
> >         transport               = virtual_delivery

> >
> > virtual_forward:
> >         driver                  = redirect
> >         no_expn
> >         no_verify
> >         check_ancestor
> >         domains                 = +virtual_domains
> >         data                    = ${lookup mysql{SELECT fwd FROM users
> WHERE
> > host = '${quote_mysql:$domain}' AND user = '${quote_mysql:$local_part}'
> AND
> > fwd IS NOT NULL}}

> >
> >
> > But when I send an email to an address that is supposed to forward email
> > (not receive delivery), it attempts to receive delivery anyways because it
> > just matched the virtual_user router settings first.
> >
> > I want to add something like:
> >
> >     condition            = ${lookup mysql{SELECT fwd FROM
> > users WHERE host = '${quote_mysql:$domain}' AND user =
> > '${quote_mysql:$local_part}'}}

>
> How about: ${lookup mysql{SELECT fwd FROM users WHERE host =
> '${quote_mysql:$domain}' AND user = '${quote_mysql:$local_part}'} {yes}
> {no}}
> ?
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
>
> ---
> [This E-mail scanned for viruses]
>
>
> ---
> [This E-mail scanned for viruses]
>