Re: [exim] filtering mail from specific hosts

Top Page
Delete this message
Reply to this message
Author: Stephen Gran
Date:  
To: exim-users
Subject: Re: [exim] filtering mail from specific hosts
On Tue, Mar 15, 2005 at 04:26:14PM -0300, Roberto S. Meyer said:
> Stephen Gran escribió/wrote/a écrit:
>
> > On Tue, Mar 15, 2005 at 03:39:45PM -0300, Roberto S. Meyer said:
> > > Hi,
> > >
> > > I need to setup a filter to test two conditions:
> > >
> > > - only mail from four LAN hosts to the Internet
> >
> > hosts = 192.168.0.2 : 192.168.0.3 ...
> >
> > or, more flexibly,
> >
> > hostlist allowed_lan_hosts = 192.168.0.2 : 192.168.0.3 ...
> >
> > then use the condition
> >
> > hosts = +allowed_lan_hosts
>
> Sorry if my english wasn't clear enough, I didn't mean I only
> wanted to allow them to send email to the Internet.
>
> What I need is to catch this traffic in a filter and save a copy
> of it in a special mailbox for auditing.


So use a warn statement to insert a header. Later, look for that
header, and do an unseen delivery if present, then remove it and
continue other deliveries as usual. This is usually called a shadow
transport, and is covered in the docs.
--
--------------------------------------------------------------------------
|  Stephen Gran                  | New York now leads the world's great    |
|  steve@???             | cities in the number of people around   |
|  http://www.lobefin.net/~steve | whom you shouldn't make a sudden move.  |
|                       | -- David Letterman                      |

--------------------------------------------------------------------------