[exim] Replace From with To for forwarded mails and also enc…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Sebastian Nielsen
Data:  
Para: exim-users
Asunto: [exim] Replace From with To for forwarded mails and also encapsulate email.
Im gonna set up a mail forwarding service for some users.

But to prevent policy violations and SPF/DKIM identity aligment errors, I
want to do the following:

Replace MAIL FROM with the specified RCPT TO.
For example:

MAIL FROM: user@??? <mailto:user@gmail.com>
RCPT TO: user@??? <mailto:user@example.org>

That has a forward set up for user@??? <mailto:user@example.org>
--> user@??? <mailto:user@hotmail.com>

Should be forwarded as:

MAIL FROM: user@??? <mailto:user@example.org>
RCPT TO: user@??? <mailto:user@hotmail.com>


For the body, I want to encapsulate the whole email (the whole
message/rfc822 object) inside a new message/rfc822 container, such as:

If a mail comes like this:

From: user@??? <mailto:user@gmail.com>
To: user@??? <mailto:user@example.org>
Subject: Hi
Content-Type: text/plain

Hi you there

I want to encapsulate it as:
--------------------------------------------------
From: user@??? <mailto:user@example.org>
To: user@??? <mailto:user@hotmail.com>
Subject: FWD: Hi
Content-Type: message/rfc822

From: user@??? <mailto:user@gmail.com>
To: user@??? <mailto:user@example.org>
Subject: Hi
Content-Type: text/plain

Hi you there
--------------------------------------------------


Any ideas to accomplish both of these in Exim4?


Best regard, Sebastian Nielsen