Re: [exim] Store (not deliver) messages if sent to/from an a…

Top Page
Delete this message
Reply to this message
Author: Graeme Fowler
Date:  
To: exim-users
Subject: Re: [exim] Store (not deliver) messages if sent to/from an address
On Mon 12 Dec 2005 11:28:14 GMT , Burhan Khalid
<burhan.khalid@???> wrote:
> I tried the router option, and I got it 90% done. It saves emails to
> a file when sent from a specific address, but I can't figure out how
> to only save those emails sent from a particular address to a specific
> address. Right now, it seems that it is ignoring my condition and
> saves ALL emails from that address.
>
> Here are the relevant parts:
>
> test_block:
> driver = redirect
> senders = burhan@???
> condition = $header_to is "burhan.khalid@???"
> file_transport = test_transport
> data = /home/amul/test/inbox
> #transport = test_transport


That's because you're using filter logic in a router. It should be
something like (untested!):

condition = ${if eq {$header_to}{burhan.khalid@???}{true}{false}}

Although these days you can drop the {true}{false} part as it will by
default return true if the test succeeds.

Graeme