Re: [exim] Conditional header rewriting

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Ian Eiloart
Data:  
Para: Konstantin Boyandin, exim-users
Assunto: Re: [exim] Conditional header rewriting


--On 30 April 2008 13:22:08 +0700 Konstantin Boyandin <temmokan@???>
wrote:

> Greetings,
>
> The task is simple: i need to rewrite header addresses if and only if
> certain condition is met. E.g.
>
> If
> To/Cc/Bcc contains @domain.example.com
> Then
> <address rewrite rule>
>
> Can it be done *without* calling external program? May I ask for a
> snippet of exim.conf code, if yes?


The question is ambiguous.

First, you shouldn't usually see Bcc addresses - they're supposed to be
secret. Therefore, I'm wondering whether you really want to rewrite
envelope addresses, too.

You don't say whether you want to rewrite addresses other those that match
your conditions: in the To/CC headers, and in the specified domain.

What you can do is rewrite addresses in a specific domain (section 31.6 of
the docs), and restrict the rewriting to certain headers (section 31.8 of
the docs). Anything more complicated would have to be done in ACLs with
headers_add and headers_remove.

We used to use ACLs to rewrite From addresses when email was not destined
for a local domain, but now we do it for internal email, too.

> Thank you.




--
Ian Eiloart
IT Services, University of Sussex
x3148