Re: [exim] Problems with mysql query

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Adrian Chapela
Dátum:  
CC: exim-users
Tárgy: Re: [exim] Problems with mysql query
Magnus Holmgren escribió:
> On Monday 05 March 2007 13:32, Adrian Chapela wrote:
>
>> I can't select a user from a mysql database.
>>
>> The query seem not execute and I don't understand anything.
>>
>> I have a user in local and it's OK. The exim was compiled with mysql
>> support.
>>
>> The domains list can't be retrevied from the database and no error....
>>
>> The config:
>>
>> The domain list error:
>> domainlist local_domains = localhost: mysql;SELECT userid FROM domains
>> WHERE userid='$domain';
>>
>> The domain list OK:
>> domainlist local_domains = localhost : example.es
>>
>> #Router
>> virtual_users:
>> driver = redirect
>> allow_fail
>> allow_defer
>> data = ${lookup mysql{select maildir from users where
>> id='$local_part@$domain'}{$value}fail}
>> directory_transport = virtual_delivery
>>
>
> You don't reference the local_domains domainlist from anywhere; at least not
> from here (perhaps in the ACLs?). No wonder it doesn't execute. You would
> typically include a condition:
>
>    domains = +local_domains

>
> if that is really necessary. The data being empty gives the same result in
> practice.
>
>
>> The errors:13:21:41 29972 local_part=proba_salva domain=example.es
>> 13:21:41 29972 calling virtual_users router
>> 13:21:41 29972 rda_interpret (string): ${lookup mysql{select maildir
>> from users where id='$local_part@$domain'}{$value}fail}
>> 13:21:41 29972 expanding: select maildir from users where
>> id='$local_part@$domain'
>> 13:21:41 29972    result: select maildir from users where
>> id='proba_salva@???'
>> 13:21:41 29972 search_open: mysql "NULL"
>> 13:21:41 29972 search_find: file="NULL"
>> 13:21:41 29972   key="select maildir from users where
>> id='proba_salva@???" partial=-1 affix=NULL starflags=0
>> 13:21:41 29972 LRU list:
>> 13:21:41 29972   :/etc/aliases
>> 13:21:41 29972   End
>> 13:21:41 29972 internal_search_find: file="NULL"
>> 13:21:41 29972   type=mysql key="select maildir from users where
>> id='proba_salva@???"
>> 13:21:41 29972 database lookup required for select maildir from users
>> where id='proba_salva@???'
>> 13:21:41 29972 MYSQL query: select maildir from users where
>> id='proba_salva@???'
>> 13:21:41 29972 MYSQL new connection: host=localhost port=0 socket=NULL
>> database=maildb user=mail

>>
>
> I can't see any error. The debug output shows how Exim starts expanding the
> ${lookup ...} item and prepares to execute the query "select maildir from
> users where id='proba_salva@???'". But then you cut off before getting
> to the interesting part.
>
>

Here it is all...

13:21:41 29972 MYSQL query: select maildir from users where
id='proba_salva@???'
13:21:41 29972 MYSQL new connection: host=localhost port=0 socket=NULL
database=maildb user=mail
13:21:41 29971 SMTP>> 221 correo2.example.es closing connection
13:21:41 29971 LOG: smtp_connection MAIN
13:21:41 29971 SMTP connection from dns1.example.es
(correo1.example.es) [192.168.19.143] closed by QUIT
13:21:41 29971 search_tidyup called
13:21:41 29947 child 29971 ended: status=0x0


I can't see a error at all.
But if I shutdown the mysql server nothing happens... The exim write
all the same messages..

It is strange ...