Re: [Exim] rewriting question

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Dave Holland
Cc: exim-users
Asunto: Re: [Exim] rewriting question
On Wed, 10 Nov 1999, Dave Holland wrote:

> To: inet:joe@???, inet:fred@???


<groan>

Not only are these addresses wrong, they are syntactically invalid,
because : is a special character. In one of the more bizarre aspects of
RFC 822 it introduces the name of a list. A line such as

To: inet:joe@???, fred@???;, jim@???

*is* valid, containing a named list (note the terminating semicolon) and
another single address.

> I tried to remove the "inet:" with a rewriting rule like this:
>
> ^inet:(.*)$             $1                              S

>
> thinking to do the rewrite before the address is validated.


That won't work. The "S" flag applies only to addresses that arrive in
SMTP commands, not to headers.

> This is close, but not quite there:


'Fraid it's not even close.

> # exim -brw inet:dave.holland@???
> 1999-11-10 16:01:16 "inet:dave.holland@???" rewritten as "dave.holland@???" by rule 5
>     SMTP: dave.holland@???


This means it managed to do the SMTP-type rewrite that you defined, but
that won't do you any good, as explained above.

> Syntax error in address: missing or malformed local part (expected word or "<")


This error occurs when it tries to test the address for rewriting rules
with flags other than 'S'. As we know, this is an illegal address.

> What am I missing? Is what I'm trying to do possible?


You could set headers_check_syntax, and then it would reject these
messages, making this Somebody Else's Problem. :-)

Other than that, the only thing would be to run an expensive transport
filter on outgoing messages and fix them up by hand. I'm afraid I've
made so many concessions in Exim for accommodating software that can't
cope that my sympathy is running low...

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