Re: [exim] Sourcing Exim Filter from MySQL/MariaDB table?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Jeremy Harris
日付:  
To: exim-users
題目: Re: [exim] Sourcing Exim Filter from MySQL/MariaDB table?
On 08/05/2019 00:39, Mike Tubby via Exim-users wrote:

> user_filter:
>     driver = forwardfile
>     data = ${lookup mysql{SELECT rule FROM users LEFT JOIN domains \
>         ON domains.id=users.domain_id LEFT JOIN filters \
>         ON users.id=filters.user_id WHERE
> domains.domain='${quote_mysql:$domain}' \
>         AND users.username='${quote_mysql:$local_part}' \
>         AND domains.active=1 \
>         AND users.active=1 \
>         AND filters.active=1}}
>     no_verify
>     no_expn
>     check_ancestor


Where's your rule ordering? And what on earth is "forwardfile" ?

> Am I going to need to arrange for the database result set to start with
> '# Exim Filter' each time or is their a boolean to force this?
>
> If there isn't a boolean to force it, then it would be good to have a
> 'is_filter' boolean ;-)


No, there's not enough call for that; it's your problem :)
It's only a string; just glom it on before the result
of the DB lookup expansion.

> As far as memory utilisation goes, won't Exim discard any memory it
> allocated for the result set at the end of the delivery?


Yes. I wasn't meaning permanent.
--
Cheers,
Jeremy