[exim] Conditionally using a system filter?

Pàgina inicial
Delete this message
Reply to this message
Autor: Chris Siebenmann
Data:  
A: exim-users
CC: cks
Assumpte: [exim] Conditionally using a system filter?
I want to use an Exim system filter only some of the time, for certain
inbound email messages, and it happens that the condition is most easily
checked in Exim itself (instead of the filter). No problem, thought I,
the 'system_filter' setting is documented as an expanded string. So I
wrote:

    system_filter = ${if ={10025}{$interface_port} {/etc/exim4/exim-system-filter}}


This worked when I sent a message over the special port. But when I sent
it over the regular port, Exim immediately complained:

    Error in system filter: "" is not an absolute path


(This is with the Ubuntu 16.04 package of Exim 4.86(.2).)

I can always create an alternate do-nothing Exim system filter and
rewrite the system_filter condition to specify that instead, but I'm
wondering if there's a better way to do this, one where Exim knows to
not even try to run a system filter here.

Thanks in advance.

(Even if I can theoretically do all of my conditional checking in
the system filter instead of exim4.conf, I prefer not to in this case
because there are other exim4.conf bits related to email coming in on
that port. I would like to keep all knowledge of this special case in
one configuration file, ie exim4.conf, not duplicated across two, with
both exim4.conf and my system filter knowing about the special magic.)

    - cks