[exim] mysql_servers from config file?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: John R. Shearer
Datum:  
To: exim-users
Betreff: [exim] mysql_servers from config file?
Greetings! I am trying to use Exim's MySQL interface for the first time and
have already run into a little speed bump. I need to be able to collect the
MySQL server name, database name, username and password from a configuration
file, but can't get it to work.

Here's the relevant section from my config file...

  CLUSTER_CONFIG=/etc/puremail/cluster.conf
  hide mysql_servers = \
     ${lookup{HOST}lsearch{CLUSTER_CONFIG}}\
    /${lookup{DB_MAIN}lsearch{CLUSTER_CONFIG}}\
    /${lookup{USER}lsearch{CLUSTER_CONFIG}}\
    /${lookup{PASSWORD}lsearch{CLUSTER_CONFIG}}\ 


...and here's the config file /etc/puremail/cluster.conf...

HOST: localhost
USER: www
PASSWORD: XXXXXXXX
DB_MAIN: PureMail

...and here's the error I get when my first query executes...

23805 lookup deferred: unexpected slash in MySQL server hostname:
${lookup{HOST}lsearch{/etc/puremail/cluster.conf}}/${lookup{DB_MAIN}lsearch{/etc/puremail/cluster.conf}}/${lookup{USER}lsearch{/etc/puremail/cluster.conf}}/${lookup{PASSWORD}lsearch{
23805 LOG: MAIN PANIC

Obviously the macro CLUSTER_CONFIG is getting expanded like it is supposed to.
If I run "exim4 -be" and enter
"${lookup{HOST}lsearch{/etc/puremail/cluster.conf}}" on the command line it
returns "localhost" as it is supposed to, so I know that the lookup is working
correctly. I also tried defining macros for the host, database, user and
password, and then using the macros (hide mysql_servers =
MYSQL_HOST/MYSQL_DB/MYSQL_USER/MYSQL_PASS) but I receive the same "unexpected
slash in MySQL server hostname" error.

Anyone have any thoughts? Thanks! - John R. S.

--
John R. Shearer
PUREmail, Inc.
http://www.puremail.com/
mailto:john@puremail.com