Re: [EXIM] rewrite/${if match problem

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Peter Radcliffe
Fecha:  
A: exim-users
Asunto: Re: [EXIM] rewrite/${if match problem
Philip Hazel <ph10@???> probably said:
> On Fri, 12 Dec 1997, Peter Radcliffe wrote:


> But you can put the item in quotes, for precisely this reason. From
> chapter 33 of the spec:

[snip]
> Remember to double up those \ characters when you put it in quotes.


Ahhh, something I missed. That has helped _lots_ - thanks - and added to
the w rewrite flag I can now deal with all the qualified cases, but this
brings up the other problem again:

> > [1] It would be nicer to rewrite the From: line and then rewrite the
> >     envelope from to be that, but it appears $header_from: isn't
> >     updated during rewrites.
> The order of rewriting is not defined...


Yes, but if I have:

rewrite From: line
rewrite envelope from, using $header_from:

Which is what I'd like to do, then $header_from: still contains the
unrewritten From: header.

If I do:

rewrite envelope from, using $header_from:
rewrite From: line

Then I'm left with a possible unqualified address:

1997-12-15 10:54:02 0xhcqI-0002Kf-00 Rewrite of uucp@???
yielded unqualified or unparseable address "uucp test <pir!rond>"

In this case I'd have to deal with all the unqualified address cases, which
is a silly number of rewrite rules and I may get very wrong - KISS.

If either $header_from: was changed after the rewrite or $header_from:
was qualified (but then this may not be the origional header), or there was
a flag to qualify unqualified addresses that result from rewrites or a
flag to ignore unqualified addresses that don't get rewritten later
(pir!rond would later get rewritten as rond@???) I could do this
trivially :/

Is there any way to get access to the qualified version of $header_from:
or a way to automaticly qualify an unqualified address in a rewrite rule ?

> Some rewrites cause the addition of X-headers, but I don't recall
> exactly which and why. You can add log_write calls to the rewrite.c
> module if you want. I guess I could add an option for this.


That would be nice.

> You can always turn "rmail" into a script that calls Exim with the
> options of your choice.


Yes, but then there is an extra shell instance floating around for each
mail that is sent. Not a great hardship, but not optimal.

> Well, you could look at the one in the appendix of Jeff Friedl's book,
> but it is about 5,000 characters long... (It is actually one of the
> test expressions in the PCRE distribution in Exim 1.80.) I don't know if
> Exim could handle an expression that big.


My only comment ... "Eeeeewww" :)

I don't now have to deal with every case (every qualified case is fine,
now I RTFM about the w rewrite flag) but I'd really rather not go into all
the (comment) cases :/

P.

--
Peter Radcliffe | pir@??? | Shore.net systems administrator.


--
*** Exim information can be found at http://www.exim.org/ ***