Re: [Exim] mysql help

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Jez Hancock
Fecha:  
A: exim-users
Asunto: Re: [Exim] mysql help
On Wed, Nov 12, 2003 at 09:20:19PM -0500, Wakko Warner wrote:
> > so how would i check the user exists in the db?
>
> Here's how I did it:
> Router
> local_vuser:
>         debug_print = "R: local_vuser for $local_part@$domain"
>         address_data = ${lookup mysql{select * \
>                                         from userbase.passwd \
>                                         where enabled='yes' and \
>                                         email='$local_part' \
>                                         limit 1 \
>                                      } \
>                                 {$value} \
>                                 fail \
>                         }
>         driver = accept
>         transport = mail_vuser_spool

<snip> Transport
If mail is received for john@???, a system user 'john' exists
but 'john@???' does not exist then does the mail does not get
routed because of the 'fail' line? This sounds like the right thing -
something I've left out on my mysql lookup for virtual user/domains. :(

Presumably that router goes before your system routers?

--
Jez Hancock
- System Administrator / PHP Developer

http://munk.nu/