Re: [Exim] Rewriting based on subject line?

Pàgina inicial
Delete this message
Reply to this message
Autor: D.M.Chapman
Data:  
A: exim-users
Assumpte: Re: [Exim] Rewriting based on subject line?
On 25-May-00 at 10:19:58 D.M.Chapman wrote:
> Is there an easy way of rewriting a sender address depending on the
> subject line. We have a brain dead piece of software that sends all email
> from one account (say fred@???). We currently rewrite this with a
> normal rewriting rule. However, we now need to rewrite it to one address
> if the subject line starts with a certain magic word and to another in
> all other cases. Ideally removing the magic word in the process but we
> could live without that.
>



Ok, I now have a router configured to do this. Can anyone see any
glaring problems with this?

condition = ${if and {{match {$header_subject:} {^magic.*}} {eq {$sender_address}{eric@???}}} {true} {false} }
headers_remove ="from:"
headers_add = "From: paul@???"


This, conbined with a rewrite rule to turn fred@ukc into eric@ukc seems
to do the trick (There is no problem having the From: header as the last
header is there?).

Not neat but it will get us out of the hole for now (unless anyone spots
a glaring problem!)

Cheers,

Darren