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

Inizio della pagina
Delete this message
Reply to this message
Autore: Burhan Khalid
Data:  
To: exim-users
Oggetto: Re: [exim] Store (not deliver) messages if sent to/from an address
On 12/12/05, Burhan Khalid <burhan.khalid@???> wrote:
> On 12/12/05, Marc Sherman <msherman@???> wrote:
> > Burhan Khalid wrote:
> > >
> > > I'm having a trouble trying to google what kind of filter I would
> > > write if I want to *archive* and not deliver messages matching a to
> > > and a from address.
> >
> > Archiving is delivery, to a file.
> >
> > > In other words, if email is from x@??? and is addressed to b@???
> > > then store in /foo/bar and not deliver.
> >
> > Just use a redirect router, with appropriate conditions to match the
> > addresses, and deliver to the appropriate /foo/bar file in the data option.
>
> I experimented with this in a filter:
>
> if $header_from: is "me@???"
> then
>    save "/home/domain/test"
> endif

>
> For testing purposes, I chmod /home/domain/test to 777 -- but this
> failed in that the emails were delivered and nothing was stored. I
> will try with the router option (now that I know that is what I need).


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

and later down

test_transport:
    driver = appendfile
    delivery_date_add
    envelope_to_add
    file = /home/amul/test/inbox
    mode = 0660