Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Exim4 | Modify headers

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


elrippo at privatdemail

Aug 3, 2013, 11:28 PM

Post #1 of 4 (35 views)
Permalink
Exim4 | Modify headers

Hy there.

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 [at] elrippoisland>
Envelope-to: user_2 [at] elrippoisland
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 [at] elrippoisland>)
id 1V5XZy-0004Bp-VG
for user_2 [at] elrippoisland; Sat, 03 Aug 2013 10:53:00 +0200
From: user <user [at] elrippoisland>
To: user_2 [at] elrippoisland
Date: Sat, 03 Aug 2013 10:52:32 +0200
Message-ID: <3081037.y7q8ZU0DAf [at] kubuntuisier>
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 [at] elrippoisland
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!

--
## 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/


iane at sussex

Aug 6, 2013, 5:00 AM

Post #2 of 4 (29 views)
Permalink
Re: Exim4 | Modify headers [In reply to]

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 [at] privatdemail> 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 [at] elrippoisland>
> Envelope-to: user_2 [at] elrippoisland
> 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 [at] elrippoisland>)
> id 1V5XZy-0004Bp-VG
> for user_2 [at] elrippoisland; Sat, 03 Aug 2013 10:53:00 +0200
> From: user <user [at] elrippoisland>
> To: user_2 [at] elrippoisland
> Date: Sat, 03 Aug 2013 10:52:32 +0200
> Message-ID: <3081037.y7q8ZU0DAf [at] kubuntuisier>
> 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 [at] elrippoisland
> 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!
>
> --
> ## 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/

--
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148


--
## 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/


elrippo at privatdemail

Aug 10, 2013, 12:25 AM

Post #3 of 4 (7 views)
Permalink
Re: Exim4 | Modify headers [In reply to]

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 [at] privatdemail> 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 [at] elrippoisland>
> > Envelope-to: user_2 [at] elrippoisland
> > 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 [at] elrippoisland>)
> > id 1V5XZy-0004Bp-VG
> > for user_2 [at] elrippoisland; Sat, 03 Aug 2013 10:53:00 +0200
> >
> > From: user <user [at] elrippoisland>
> > To: user_2 [at] elrippoisland
> > Date: Sat, 03 Aug 2013 10:52:32 +0200
> > Message-ID: <3081037.y7q8ZU0DAf [at] kubuntuisier>
> > 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 [at] elrippoisland
> > 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!

--
## 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/


jasen at xnet

Aug 12, 2013, 12:28 AM

Post #4 of 4 (5 views)
Permalink
Re: Exim4 | Modify headers [In reply to]

On 2013-08-10, elrippo <elrippo [at] privatdemail> wrote:
> 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!!!

set the same values on all the other transports.

using a macro for the value and defining the macro in a central location
( eg: /etc/exim4/conf.d/main/00_local_config ) will make administration
easier.

--
⚂⚃ 100% natural

--
## 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/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.