Im not talking about editing the message body, but rather prepend a bunch of
headers.
Editing headers are fine, I already edit the Date header (to avoid emails
from misconfigured systems 1970-01-01 appearing in the bottom of the inbox)
by replacing them with the correct date, and I also already edit subject
lines by removing "illegal" characters and also cutting them to 100
characters (to prevent filenames to become too long on NTFS systems when
exporting mail from Microsoft Outlook).
"
remove_header = date
remove_header = subject
add_header = Date: $tod_full
add_header = Subject:
${rfc2047:${length_100:${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${sg{${s
g{${sg{${sg{$h_subject:}{\\xE5}{\\xA5}}}{\\xC4}{\\x84}}}{\\xD6}{\\x96}}}{\\x
C5}{\\x85}}}{\\xF6}{\\xB6}}}{\\xE4}{\\xA4}}}{\N[^a-zA-Z0-9\xA5\xA4\xB6\x85\x
84\x96
!"\@#\$%&\/\{(\[)\]=\}?+\\\-_:.;,*><|^~]\N}{}}}{\N([\xA5\xA4\xB6\x85\x84\x96
])\N}{\\xC3\$1}}}{ }{ }}}{ }{ }}}{ }{ }}}{^ }{}}}{ \$}{}}}}
"
Now when forwarding emails, I want to encapsulate them in a new container,
just to ensure that any spoof or antispam systems doesn't throw away the
email because my server isn't authorized to send email on behalf of the
sender.
Technically it should be possible, in some way to prepend the complete email
body with a new set of headers right? Guess I need a system filter for that,
or would it be possible to add X headers + a blank newline (so the "old"
headers become body to the "new" headers)
And also about replacing the MAIL FROM adress with the RCPT TO adress
shouldn't be a problem either when forwarding? That question seems to be
unanswered.
Just need a point in the right direction, as I only want this to apply to
forwarding, not to mails delivered to real inboxes.
-----Ursprungligt meddelande-----
Från: Exim-users <exim-users-bounces+sebastian=sebbe.eu@???> För Jeremy
Harris via Exim-users
Skickat: den 20 april 2020 16:42
Till: exim-users@???
Ämne: Re: [exim] Replace From with To for forwarded mails and also
encapsulate email.
On 18/04/2020 06:03, Sebastian Nielsen via Exim-users wrote:
> Any ideas to accomplish both of these in Exim4?
You can't. Exim takes the view that an MTA should edit
message bodies.
--
Cheers,
Jeremy
--
## List details at
https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at
http://www.exim.org/
## Please use the Wiki with this list -
http://wiki.exim.org/