Συντάκτης: Evgeniy Berdnikov Ημερομηνία: Προς: exim-users Αντικείμενο: Re: [exim] Preserve certain headers, drop the rest
On Wed, Jan 08, 2020 at 01:08:06PM +0000, Jeremy Harris via Exim-users wrote: > On 07/01/2020 21:13, Rigu Cucu via Exim-users wrote:
> > We relay emails from various remote locations (which are using various mail setups). It is impossible to anticipate the variety of headers each individual MTA has added (custom x-headers and such) and we need a clear and consistent outgoing mail header setup. So ideally we would retain a predefined set of headers and drop the rest.
>
> Walk the $message_headers (it's a newline-sep list) using foreach.
> See if it's not a wanted header, and call an ACL to remove_header.
>
> Possibly worth a wishlist-level bug, for a simpler method?
If mail is DKIM-signed, this task requires separate stage to scan headers
and make a list of signed ones below DKIM (if we want to keep DKIM).
For several DKIM signatures complexity grows.
IMHO, it's not good idea to make optimization for this very special and
very complex (in general) task, which may be solved by a filter script.
--
Eugene Berdnikov