Szerző: Cyril B. Dátum: Címzett: exim-users Tárgy: [exim] System filter cannot modify headers after first delivery
Hello,
I'm trying to have a system filter modify headers, in some cases, after
the first delivery. According to the documentation, that should be possible:
"For this reason, it is usual to make the headers command conditional on
first_delivery so that the set of header lines is not modified more than
once."
As I understand it, although most users only want to modify headers on
the first delivery, they specifically have to use "if first_delivery".
My test filter is very simple (the defer is only to make testing easier,
I get the same results without it):
headers add "X-Foo: bar"
defer
It adds the header just fine on the first delivery, but fails to do so
on retries. It's not a matter of duplicate headers: even if I
temporarily rename the header name and force a delivery with exim -M, it
doesn't do anything, and the spool header file remains untouched.
Removing headers doesn't work either.
Testing the filter with -bF prints:
Headers add "X-Foo: bar"
Defer text ""
Filtering ended by "defer".
2012-06-20 12:05:08 Delivery deferred by system filter
Running exim -d+all -M prints nothing unusual:
12:08:53 1862816 Filter: start of processing
12:08:53 1862816 Filter: defer ""
12:08:53 1862816 Filtering ended by "defer".
12:08:53 1862816 Filter: end of processing
12:08:53 1862816 system filter returned 3
12:08:53 1862816 LOG: MAIN
12:08:53 1862816 Delivery deferred by system filter
This was tested on Exim 4.77. Am I missing something?