Re: [exim] Removing all headers with the same prefix

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Stefan Unterweger
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Removing all headers with the same prefix
* Jeremy Harris on Tue, Apr 18, 2017 at 10:54:58PM +0100:
> It'll be a multistep process, probably. Treat ACLs as a programming
> language.
>
> […]
>
> But start with doing it as a sequence of
>
> set acl_m_foo = <process acl_m_foo using an expansion>


I’m already doing something very similar to implement a home-grown
greylisting (with the heavy lifting coming from Postgres). This is
indeed one of the best ways I found out to build ACLs from scratch.


* Heiko Schlittermann via Exim-users on Wed, Apr 19, 2017 at 09:23:10AM +0200:
> As part of my data acl I use:
>
>      warn  set acl_m_headers_remove \
>                = ${filter {MESSAGE_HEADERS}{match{$item}{\N^x-(?:ius|hh)-\N}}}

>
> to remember all headers matching /^x-(ius|hh)-/i in an ACL variable.
> The MESSAGE_HEADERS macro is:
>
> MESSAGE_HEADERS  = \
>           ${lc:${sg\
>            {${map\
>              { <\n ${sg {$message_headers_raw}{\N\n\s+\N}{ }} }\
>              {${extract{1}{:}{$item}}}\
>              }\
>            }\
>            {\N\n\N}\
>            {:}\
>            }}


Thanks for the pointer: This is exactly the direction I was looking for.
Now I know where to look, thanks!


Cheers,
    Stefan


--
▪ Die Internetbleibe. Schick, magisch, leistungsstark. https://internetbleibe.de/
▪ medoly media UG (haftungsbeschränkt) | Hausburgstraße 13, 10249 Berlin
▪ info@??? | https://medolymedia.de/ | Tel. 030 609 826‒560 | Fax …‒569
▪ Geschäftsführer: Matthias Nothhaft | HRB 131198 (Amtsgericht Berlin-Charlottenburg), Sitz: Berlin, USt-ID: DE275221203