[Exim] variables in exim.conf; multiple rows sql result

Góra strony
Delete this message
Reply to this message
Autor: Tamas TEVESZ
Data:  
Dla: exim-users
Temat: [Exim] variables in exim.conf; multiple rows sql result
hi,

can i define my own variable in exim.conf ? if not, how to achieve the
following:

i have this in my received_header_text (broken up in two lines):

${if def:authenticated_id {(authenticated sender:
${md5:${authenticated_id}})\n\t}}\

instead of putting in the md5 hash of ${authenticated_id}, i'd like to
put in ${md5:${authenticated_id}mysecrethere}

i've tried playing around with several combinations of extract and
macros, but they didn't work. (preferaby i'd like to put
``mysecrethere'' in a variable-like thing so that it's easy to spot,
comment, remember and change, not ``hardcoding'' it into
received_header_text.)

=== other.

>>>

6.12 More about MySQL and PostgreSQL
If the result of the query contains more than one field, the data for
each
field in the row is returned, preceded by its name, so the result of
  ${lookup pgsql{select home,name from users where id='ph10'}{$value}}
might be
    home=/home/ph10 name="Philip Hazel"
<<<


now, what i have in my local_delivery is this:

group = ${lookup mysql{select gid from mail where ...
user = ${lookup mysql{select uid from mail where ...
directory = ${lookup mysql{select concat(home, "/", ...

this has been working very fine for almost a year now, it's just that
it is three sql queries. i'd like to merge these into one query,
something like:

  something = ${lookup mysql{select gid as gidm uid as uid, concat(..)
               as home from ...}


so that ``something'' would be

``gid=11231 uid=52321 home="/mails/me"'',

and then use

group = ${extract{gid}{something}}
user = ${extract{uid}{something}}
directory = ${extract{home}{something}}

given {6.12}, this could be done if i could put the result of the sql
query into a variable.

is this achievable ? if yes, how ?

exim version being 3.22, but i didn't find anything in the changelogs
that would make this piece of info too relevant :)

thanks a lot,

-- 
[-]
[Szilva] eppen szolt bx hogy szolt neked hogy szoltam neki
[bx] varja. szolok szilvanak, hogy szoltal nekem, hogy szoltam
     neki, hogy ... varj. elb*sztam