Re: [Exim] failed to expand condition "${lookup mysql {SELEC…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Konrad Michels
Date:  
À: prince
CC: exim-users
Sujet: Re: [Exim] failed to expand condition "${lookup mysql {SELECT home FROM users WHERE
If you're not seeing anything in the mysql log then either logging isn't
on for mysql or exim ain't talkin to the database.

Mind you, re-reading your mail now - it looks more like a syntax problem
than anything else . . .

I'm by far the least qualified to correct your syntax here, but
shouldn't it read something like:

"${lookup mysql{SELECT home FROM users WHERE
id='${quote_mysql:$local_part} . . . .

Just a wild guess . . someone else more experienced with the syntax
will be able to assist more I'm sure.

On Fri, 2004-01-23 at 19:46, prince wrote:
> Thanks for the response. Do I have to have some kind of logging enabled for
> this? If so, do you know how I can accomplish this?
>
> I don't see anything strange in the mysqld.log.
>
> Thanks,
> Prince.
>
> On Fri, 23 Jan 2004 19:39:46 +0000, Konrad Michels wrote
> > A mysql log might tell you what is or isn't being got from the database
> > . . .
> >
> > On Fri, 2004-01-23 at 19:33, prince wrote:
> > > I am trying to test the exim installation. I get "unknown error" when I
> try
> > > the mail user defined on the mysql table "users".
> > >
> > > telnet localhost smtp
> > > Trying 127.0.0.1...
> > > Connected to localhost.
> > > Escape character is '^]'.
> > > 220 localhost ESMTP Exim 4.30 Fri, 23 Jan 2004 11:26:35 -0800
> > > mail from: prince@???
> > > 250 OK
> > > rcpt to: prince@???
> > > 550 unknown user
> > > quit
> > > 221 localhost closing connection
> > > Connection closed by foreign host.
> > >
> > >
> > > maillog has the following entry.
> > >
> > > failed to expand condition "${lookup mysql {SELECT home FROM users WHERE
> > > id='${$local_part}@${$domain}'}}" for mysql_user router: letter or digit
> > > expected after ${
> > > H=localhost [127.0.0.1] F=<prince@???> rejected RCPT
> > > prince@???: Unrouteable address
> > >
> > > Could anyone help me to identify and correct the issue, please?
> > >
> > > mysql> describe users ;
> > > +---------+------------------+------+-----+---------+-------+
> > > | Field   | Type             | Null | Key | Default | Extra |
> > > +---------+------------------+------+-----+---------+-------+
> > > | id      | char(128)        |      | MUL |         |       |
> > > | crypt   | char(128)        |      |     |         |       |
> > > | clear   | char(128)        |      |     |         |       |
> > > | name    | char(128)        |      |     |         |       |
> > > | uid     | int(10) unsigned |      |65534|         |       |
> > > | gid     | int(10) unsigned |      |65534|         |       |
> > > | home    | char(255)        |      |     |         |       |
> > > | maildir | char(255)        |      |     |         |       |
> > > | quota   | char(255)        |      |     |         |       |
> > > +---------+------------------+------+-----+---------+-------+
> > > 9 rows in set (0.00 sec)

> > >
> > > mysql> select * from users ;
> > > +-------------------+------+--------+-----+-----+--------------+----------
> ----
> > > ---+
> > > | id                 xxx  |name     uid | gid | home         |
> > > maildir         |
> > > +--------------------------+--------+-----+-----+--------------+----------
> ----
> > > ---+

> > >
> > > +-------------------+-----+--------+-----+-----+--------------+-----------
> ----
> > > --+
> > > | prince@??? | xxx | Prince | 8 | 12
> > > | /home/dom/yyy.com/users/prince | /home/dom/yyy.com/users/prince/Maildir/
> > > +-------------------+-----+--------+-----+-----+--------------+-----------
> ----
> > > --+
> > >
> > > mysql> select * from domains ;
> > > +---------+-------+------------+
> > > | domain type relay_host |
> > > +---------+-------+------------+
> > > | yyy.com | local |
> > > +---------+-------+------------+
> > >
> > > Thanks,
> > > Prince.
> > >
> > >
> > > --
> > >
> > > ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
> > --
> > ***********************************************************
> > * Konrad Michels
> > * IT Manager
> > * Surfkitchen Limited
> > * +441189298079
> > *
> > ***********************************************************
>
>
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##

--
***********************************************************
* Konrad Michels
* IT Manager
* Surfkitchen Limited
* +441189298079
*
***********************************************************