On Sat, 5 Feb 2005, Marc Perkel wrote:
> unseen save /var/spool/spam/$message_id.test 777
> headers add "X-Spamprobe: ${run {/etc/exim/scripts/spamprobe-test
> $message_id}{$value}{}}"
>
> But - it seems that the program is running first and the save happens later.
> Is that what is supposed to happen?
Yes. People find it really hard to understand how filters work. I will
try to explain again:
Filters *set up* deliveries; they do not *perform* deliveries.
When a message is delivered, there are three phases:
(1) Run the system filter, either as root, or as a given user. This may
modify (add to or remove) the list of recipients, and it may specify
that certain deliveries (to files or pipes) are to happen. But it does
not do the deliveries. I repeat: a filter DOES NOT DO DELIVERIES. It
just specifies that they should happen.
(2) Run the routers as root. The end result, after redirections and so
on have been done, is to add to the list of deliveries that is to take
place.
(3) For each delivery that has been set up, either by the system filter,
a router, or a user filter (via a router), run a separate process as a
specific user, and in that process, run the relevant transport to do the
delivery.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book: http://www.uit.co.uk/exim-book