Re: [exim] Exim4 | Modify headers

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: elrippo
Data:  
Para: exim-users
CC: Ian Eiloart
Assunto: Re: [exim] Exim4 | Modify headers
Hi there.

Thanks to your hint, i managed to remove the wanted headers.

By placing the variables headers_add and headers_remove in
/etc/exim4/conf.d/transport/30_exim4-config_remote_smtp, the headers are
modified as wanted.

But, this only works on smtp connections. Unfortunately dis does not apply on
local users. If user1 sends a mail to user2 on the same system, the headers
are not modified.

How can i tell exim to modify the headers systemwide?

Thank you very much in advance!!!

Am Dienstag, 6. August 2013, 13:00:31 schrieb Ian Eiloart:
> Hi,
>
> You need to look at these transport options, or router options:
> "headers_add" and "headers_remove".
>
>
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_
> for_transports.html
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options
> _for_routers.html
> On 4 Aug 2013, at 07:28, elrippo <elrippo@???> wrote:
> > Hy there.
> > s
> > I hope you can give me some help on this one. I am kind of stuck and can't
> > find an appropiate answer. Exim4 is installed with the split
> > configuration.
> >
> > I want to modify the recieved_header_text, to anonyminize it as much as
> > possible.
> >
> > 1.) I managed to modify the recieved_header_text = in
> > 02_exim4-config_options as
> >
> > received_header_text = Received: \
> >
> > ${if def:sender_rcvhost {from 127.0.0.1\n\t}\
> > {${if def:sender_ident \
> > {from ${quote_local_part:$sender_ident} }}\
> > ${if def:sender_helo_name {(helo=127.0.0.3)\n\t}}}}\
> > by $primary_hostname \
> > ${if def:received_protocol {with $received_protocol}} \
> > ${if def:tls_cipher {($tls_cipher)\n\t}}\
> > (Exim latest)\n\t\
> > ${if def:sender_address \
> > {(envelope-from <$sender_address>)\n\t}}\
> > id $message_exim_id\
> > ${if def:received_for {\n\tfor $received_for}}
> >
> > 2.) So now the mail source looks like this
> >
> > Return-path: <user@???>
> > Envelope-to: user_2@???
> > Delivery-date: Sat, 03 Aug 2013 10:53:00 +0200
> > Received: from 127.0.0.1
> >
> >    by server500gb.chello.at with esmtpsa
> >    (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
> >    (Exim latest)
> >    (envelope-from <user@???>)
> >    id 1V5XZy-0004Bp-VG
> >    for user_2@???; Sat, 03 Aug 2013 10:53:00 +0200

> >
> > From: user <user@???>
> > To: user_2@???
> > Date: Sat, 03 Aug 2013 10:52:32 +0200
> > Message-ID: <3081037.y7q8ZU0DAf@kubuntuisiert>
> > User-Agent: KMail/4.8.5 (Linux/3.2.0-51-generic; KDE/4.8.5; x86_64; ; )
> > MIME-Version: 1.0
> > Content-Type: multipart/signed; boundary="nextPart137562676.tHzCL3Ggym";
> > micalg="pgp-sha1";      protocol="application/pgp-signature"
> > Content-Transfer-Encoding: 7Bit
> > X-SA-Exim-Connect-IP: 192.168.2.35
> > X-SA-Exim-Mail-From: user@???
> > X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on

> >
> >    server500gb.chello.at

> >
> > X-Spam-Level:
> > X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,TVD_RCVD_IP,
> >
> >    TVD_RCVD_IP4,URIBL_BLOCKED autolearn=ham version=3.3.2

> >
> > Subject: Headertext
> > X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 03:05:19 +0000)
> > X-SA-Exim-Scanned: Yes (on server500gb.chello.at)
> >
> > --nextPart137562676.tHzCL3Ggym
> > Content-Transfer-Encoding: 7Bit
> > Content-Type: text/plain; charset="us-ascii"
> >
> >
> >
> >
> > 3.) I want to modify three strings
> >
> > a.) User-Agent to something like Windows NT 4.0 blaablaablaa
> >
> > b.) X-SA-EXIM-Connect-IP to 127.0.0.1
> >
> > c.) Message-ID I would like to modify the hostname to something like
> > myhost
> >
> >
> >
> > I would appreciate your help :D
> > Thank you in advance!