Re: [Exim] Catching and Modifying Outgoing Messages (Develop…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Teresa_Schnell/MO/americancentury
CC: exim-users
Asunto: Re: [Exim] Catching and Modifying Outgoing Messages (Development Environment Only)
On Tue, 2 Jul 2002 Teresa_Schnell/MO/americancentury@??? wrote:

> --Change the TO address to a mail-in database we've set up.
> --Append the original recipient's address to the BODY text so we can verify
> the message was going to the right person before we rerouted it.


Let me be sure I've understood this:

You have a message addressed to user1@domain1 (say) and you actually
want to deliver it to user2@domain2, preserving the original recipient
somewhere for reference. Right? Maybe you want to deliver ALL messages
to user2@domain2?

1. Install Exim 4.05 (the latest release).

2. Add this router before the first router in the runtime configuration:

catch_all:
  driver = redirect
  domains = domain1          <====  omit if you want this for all domains
  local_parts = user1        <====  omit if you want this for all users
  data = user2@domain2
  headers_add = \nThe original recipient was $local_part@$domain.
  redirect_router = dnslookup


3. Enjoy.

Comments:

1. I have not tested this. It is only one of many possible approaches.

2. You don't need to put the original recipient in the body if it is
already in the To: header line, which it should be in a normally
constructed message.

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