[exim] macros in macros

Top Pagina
Delete this message
Reply to this message
Auteur: Arkadiusz Miskiewicz
Datum:  
Aan: exim-users
Onderwerp: [exim] macros in macros
Hi,

I'm trying to do something like this:
QUOTA_STANDARD = SELECT a.user_id, a.example_id, ed.parameter_id,
quota_max ...

QUOTA_EXTRA = SELECT ROUND(p.value * SUM(pl.value)) AS quota_extra \
                FROM profile p \
                LEFT JOIN price_list pl ON p.price_list_id = pl.id \
                WHERE account_id=${extract{user_id}{QUOTA_STANDARD}} \
                AND pl.parameter_id = ${extract{parameter_id}{QUOTA_STANDARD}} 
\
                GROUP BY pl.value


and then
quota = ${eval:${extract{quota_max}{${lookup mysql{QUOTA_STANDARD}}}} +
${lookup mysql{QUOTA_EXTRA}}}M

QUOTA_STANDARD works well but the problem is in ${extract{x}{QUOTA_STANDARD}}
in second macro. extract yelds empty result.

Using macros in macros is not supported? If yes then how else I could do
this... any local, user settable variables in transport?

Thanks,
-- 
Arkadiusz Miśkiewicz                    PLD/Linux Team
http://www.t17.ds.pwr.wroc.pl/~misiek/  http://ftp.pld-linux.org/