[Exim] Exim named lists

Góra strony
Delete this message
Reply to this message
Autor: Yann Le Guennec
Data:  
Dla: exim-users
Temat: [Exim] Exim named lists
--
Hi,

I'm trying to use exim-4.04 with a database and I stuck on
something strange :

Here are some bits of my configuration file :


   SQL_RELAYFROMHOST=select SQL_DATAFIELD from SQL_TABLE \
                       where SQL_TYPEFIELD='relayfromhost'


hostlist relay_from_hosts = mysql;SQL_RELAYFROMHOST


In the ACL acl_check_rcpt provided with the sample config, if I put :

accept hosts = +relay_from_hosts

exim never match it because it cannot resolve the host (the database
provides a list of IPs). It seems normal as relay_from_hosts is a
hostlist. But if I put IPs instead of the SQL lookup, it does the
matching against the IPs.

How can I match on IPs with lists and lookup ?

The solution I found is to put the SQL lookup directly in the ACL,
without passing through a named list :

accept hosts = ${lookup mysql {SQL_RELAYFROMHOST} {$value}{false}}

and that works... Is that the way to do it or am I missing something ?

Yann.

--
Content-Description: This is a digitally signed message part

[ signature.asc of type application/pgp-signature deleted ]
--