[Exim] Mailman 2.0.12, Exim 4.10 and MySQL

Top Page
Delete this message
Reply to this message
Author: cal
Date:  
To: exim-users
Subject: [Exim] Mailman 2.0.12, Exim 4.10 and MySQL
I am trying to pull the value for COMMAND in a list transport out of a MYSQL
database. Is this possible?

Here's what I've got currently. (cloned from someone)
list_admin:
    driver = pipe
    command = MAILMAN_WRAP mailowner ${lc:$local_part}
    current_directory = MAILMAN_HOME
    home_directory = MAILMAN_HOME
    user = MAILMAN_UID
    group = MAILMAN_GID


Here's what I want:
list_admin:
    driver = pipe
    command = ${lookup mysql{SELECT_MAILINGLIST_ALIAS}}
    current_directory = MAILMAN_HOME
    home_directory = MAILMAN_HOME
    user = MAILMAN_UID
    group = MAILMAN_GID


The SQL:
SELECT_MAILINGLIST_ALIAS = \
  SELECT a.dest                                                 \
    FROM alias a left join domain d on a.domainID = d.domainID  \
   WHERE a.localPart  = '${lc:$local_part}' AND                 \
         d.domain     = '${domain}' AND                         \
         a.type       = 'site' AND                              \
         a.active     = '1' AND                                 \
         d.active     = '1'


One of my list records in alias:

type localpart dest
------ --------- -----------------------------------------------------------
-
site testlist |/home/virtual/domain.com/mailman/mail/wrapper post
testlist

Is it possible to load the variable COMMAND with the value from a.DEST? The
above example does not work. COMMAND contains the SQL statement which
causes mailman to PAINC. (I LOVE that message.)

Any help would be appreciated.

=C=
*
* Cal Evans
* Techno-Mage
* http://www.calevans.com
*