Re: [Exim] Address Re-writing

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Phil White
CC: exim-users
New-Topics: [Exim] Pseudo-Anonymous Remailing
Subject: Re: [Exim] Address Re-writing
On Wed, 27 Jun 2001, Phil White wrote:

I think I am now totally confused, but I'll try to comment sensibly.

> This is what I have so far managed to deduce (therefore eliminate from my
> list of possible methods to achieve desired aim) :
>
> * as the sender never has the address <username>@freeport.co.uk
>    rewrite rule (1) below always fails.


> (1) *@freeport.co.uk wibble@localhost Ffrs


Indeed, that will only operate on envelope senders, From:, Reply-To: and
Sender: header lines that contain addresses ending in @freeport.co.uk.

> * used in the rewite rule (2) below, $domain contains the SENDERS domain
>    (amazing but true), therefore won't work.


> (2) *@*     "${if eq {${domain}}{cadellin.itmagic.ltd.uk} \
>         {wibble@localhost}\   # use this line for testing only!
>         fail}" Ffrs


No, $domain contains the domain *of the address you are rewriting*.
Therefore, it contains different things depending on what is being
rewritten. While rewriting the envelope sender, it will certainly
contain the sender domain. And, assuming all the addresses in Ffrs are
the same sender, then indeed it will always contain the same sender
address. This is where I'm confused as to what you were expecting it to
contain?

>    $original_domain contains nothing useful.


Correct. That variable is set only while an address is being processed
for delivery. Rewriting happens when a message is being received.

> * The obvious approach is to use headers_remove = From
>    except that that doesnt remove the first line
>      From data_medica@??? Sat Sep 15 21:24:25 200


Er, that line is not a header line in the RFC2822 sense. It is not
present in messages as they are being processed by the MTA. It is a
Berkeley mailbox separator line that gets added at the time of delivery.
(You can configure Exim not to add it, but that will break your mailbox
if you are using Berkeley format.) The addresss therein is in fact the
envelope sender.

> So, AFAICS, Exim alone cannot achieve what I want.


I'm afraid I'm now confused as to exactly what you are trying to
achieve. Sorry, but there's so much going on that I can't keep
everybody's problems separate in my head.

> QUESTION: Am I missing something obvious?


Perhaps if you just state your requirements separately (mail me off list
if you like - but I don't guarantee a fast response) I could suggest
some approach.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.