Re: [exim] FW: dnslists : Mysql Lookup

Top Page
Delete this message
Reply to this message
Author: Bill Hacker
Date:  
To: Michael, exim
CC: 
Subject: Re: [exim] FW: dnslists : Mysql Lookup
Michael wrote:

> Thanks,
>
> I've just dumped it to a file and it reads two results
>
> One after another without a space in a text file which would explain
> something but doesn't really match up with my error from the Exim log.
>
> You mentioned concatenating the result but will this work with multiple rows
> as they are just not fields from within the same result set
>


Try concatenation where you add the separator Exim expects between fields.
Depending on where you are WORKING, that could be a space, a comma, a
colon with space either side, etc. - whatever Exim wants at that point....

- *then* - after the *last attribute* in the SQL call add a "\"
continuation character.

See if that doesn't give you an output that looks like the 'embedded'
list Exim normally expects, row after row.

BTW - Database calls, even to lite-weights such as MySQL, are
considerably more 'expensive' that Exim's native working.

We use them for domain, user, passwords, storage locations, but I am not
aware of enough differentiation among RBL's to bother with a lot of
options on those. "none", "all", and maybe two intermediate 'sets'
should cover it, OR, a boolean flag for each 'usable' one (5?, 7?),
tested one line at a time.

HOWEVER - DB call expense again - IF/As/When you really need such, say
for user prefs, it is probably more efficient to use MACROs and/or
'ifdef' to switch between 2 to 4 pre-defined 'sets' of such - all of
which can already be resident in ~/exim/configure as plain text.

In that case, all you need the DB to return is a one-byte selector flag
- user/domain pref as a number which 'activates' the chosen section in
~/exim/configure.

That makes for a faster SQL call, allows for a 'default' (in case the DB
is down or no choice has been entered)..
.... and no need for the above monkey-motion at all.

HTH,

BIll