Re: [exim] How I do to add headers to a unseen save in a sys…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Ian Zimmerman
Fecha:  
A: exim-users
Asunto: Re: [exim] How I do to add headers to a unseen save in a system filter?
On 2020-05-07 07:27, Sebastian Nielsen wrote:

> I wonder, how I do to add headers to a unseen save in a system filter, but
> which is NOT sent through to the original recipient, just used for the
> unseen save?
>
> I tried with:
>
> if $received_port is 10026 then
> if $sender_address_domain is sebbe.eu then
> headers add "Status: RO"
> unseen save /var/mail/sebastian/Sent
> headers remove "Status"
> endif
> endif
>
> but didn't work.


This is because "save", "unseen" or not, doesn't save the message at
that point, but rather sets up an additional delivery to be done in the
normal Exim pipeline, ie. at the routing stage.

What I would do (and I think this is the officially approved way) is use
"add" to change one of the user variables, n0 through n9, as a way of
setting a flag; later, at the transport stage, you can test the flag by
expanding $sn0 (for example) and add the header at that time, if indicated.

--
Ian