[exim] conditional transport filters?

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

I'm using a transport filter before passing the message to dovecot (LDA). This
transport filter adds a few headers (spam checking).

Now I don't want to run the transport filter for every mail but exclude a few
mails (e.g. from authenticated senders).

The docs [1] say
transport_filter    Use: transports     Type: string†     Default: unset
"If unset, or expanding to an empty string, no filtering is done. "


So I tried:
transport_filter = ${if def:authenticated_id {}{ \
    /usr/bin/rspamc ... \
}}


However Exim 4.87 complained:
Expansion of "${if" from command "${if def:authenticated_id ...}" in transport
filter failed: condition name expected, but found ""


Of course I could always move the if-condition in a custom script and
unconditionally call the script with appropriate variables but in the end I
need to access several variables so this is a bit inconvenient.
(Duplicating the entire router/transport combo is even less appealing to me as
you can imagine...)

Probably I'm just getting the Exim syntax wrong so I'm still hopeful.

Felix


[1]
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_transports.html