RE: [exim] how to remove outgoing Received header?

Página Inicial
Delete this message
Reply to this message
Autor: Peter Savitch
Data:  
Para: webmaster
CC: exim-users
Assunto: RE: [exim] how to remove outgoing Received header?
If you *really* need this, try headers_remove in the outgoing transport.
Other people do not recommend this, and so do I. Though I'm a humanist
;)

But be advised of possible mail loops: if you remove the received
headers, you are risky. I suggest you to protect your exim with a
special circuit-break no-verify router, that's located IN THE BEGINNING
of the chain.

This technique was proposed by Steve Haslam from UK, October'2002, and
makes possible to mark messages relayed by your system in a safe, secure
way. Grab the exim-users archive to find more info. The message was
dated Wed, 16 Oct 2002 18:34:28 +0100.

You can make special transport that mangles these headers and use it
*only* when you accept messages from your friends via hi-port SMTP. You
are probably interested in the $interface_port expandable. Well, just
play with that stuff, but be extremely careful with mail loops because
you lack the received header, which is generally a bad idea.

Please change YourSecretString and X-Special-Header with appropriate
strings. These setup assumes that Message-Id header is present.

# ...
SEEN_SECRET = YourSecretString
SEEN_HASH =   ${hmac{sha1}{SEEN_SECRET}{\
                ${local_part}%${domain}%\
                $h_message-id:%${primary_hostname}}}
# ...
begin routers


.ifdef SEEN_HASH
circuit_break:
driver = redirect
no_verify
condition = ${if match{$h_X-Special-Header:}{SEEN_HASH} {yes}{no} }
allow_fail
data = ":fail: Mail routing loop detected by ${primary_hostname}"
.endif SEEN_HASH

# ...

some_router:
driver = ...
condition = ...
transport = external_mangling_smtp

# ...

begin transports

# ...

external_mangling_smtp:
driver = smtp
.ifdef SEEN_HASH
headers_remove = Received
headers_add = X-Special-Header: ${primary_hostname} SEEN_HASH
.endif SEEN_HASH

# ...

> -----Original Message-----
> From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org]

On
> Behalf Of webmaster@???
> Sent: Wednesday, October 13, 2004 10:14 PM
> To: Suresh Ramasubramanian
> Cc: exim-users@???; Dan Jacobson
> Subject: Re: [exim] how to remove outgoing Received header?
>
> I have some Chinese friends - students - who are afraid to mail

because
> of the very restrictive Chinese censorship laws. If there mails have a
> line included that points to a Chinese university or Internet cafe

and
> the message is not what the state likes, not only they are facing

years
> of prison, also the Network Admin, the Internet cafe owner, etc can

face
> years of prison. Don't forget also that if you go into jail in China

for
> more than 2 years, the dead rate is 25 times more than in the US or
> European... They have now access to my mail server by using a high

port
> number for outgoing mail...
>