Auteur: Jeremy Harris Date: À: exim-users Sujet: Re: [exim] Removing all headers with the same prefix
On 18/04/17 19:07, Stefan Unterweger wrote: > I want to scrub certain kinds of headers for all incoming messages so
> that I can use them for myself—and trust them. In particular, I want to
> get rid of all headers which start with ‘Spam-’, no matter what comes
> after that prefix (be it ‘Spam-Score’, ‘Spam-Whitelisted’ or whatever my
> yet-to-be-designed antispam filters will come up with).
It'll be a multistep process, probably. Treat ACLs as a programming
language.
Start with all the headers.
Treating them as a list, strip the content leaving just the
header names.
Filter for only the names you're
interested in.
Then feed that variable to headers_remove.
You _might be able then, having constructed it sequentially,
be able to compress it into a one-liner nested expansion -
if you care.
But start with doing it as a sequence of
set acl_m_foo = <process acl_m_foo using an expansion>
operations, it's the only way to stay sane.
--
Cheers,
Jeremy