Re: [exim] conditional transport filters?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Felix Schwarz
Datum:  
To: exim-users
Betreff: Re: [exim] conditional transport filters?

Am 04.05.2016 um 17:54 schrieb Jeremy Harris:
> The string is split on spaces first, and the parts expansion-item
> expanded separately (the docs do point this out). Your first item
> was thus a bare "$if{". You may be able to do what you want by
> adding quoting.


Thank you very much for your suggestion. I see that in the docs now as well
even though I think moving the section up a bit might have helped.

Anyway I can now execute the transport filter command conditionally but ...
well, now I still need to pass some variables (e.g. $authenticated_id) to the
filter which I guess is not possible due to quoting [1]:

transport_filter = '${if !def:authenticated_id {}{/usr/bin/rspamc
$authenticated_id}}'

16:42:23 5138 direct command after expansion:
16:42:23 5138 argv[0] = /usr/bin/rspamc root


well, maybe I didn't fully grasp the quoting magic?
Felix


[1] yes, I reversed the logic from my previous example but that should be
irrelevant. I just want to call a filter script conditionally and pass some
variables to it.