On Fri, 3 Oct 1997, Mark Willson wrote:
> I'm using Exim 1.61 and was wondering if it's possible to filter
> outbound messages similar to the way inbounds are with
> "system_filter:"? I'm willing to upgrade to the latest stable version
> if needed.
What Exim calls a "system filter" is applied to *all* deliveries, both
inbound and outbound. However, it is run only once per message, not once
per address.
> I'm trying to keep an audit trail of all in/outbound mail for my domain.
> (we handle a few others that I don't want).
Surely the easiest way to do this is just to extract the entries from
your domain from the log? Check out the "exigrep" utility.
> I currently have:
>
> system_filter:
> no_verify,
> driver = forwardfile;
> no_check_local_user,
> filter,
> file = /usr/local/exim/filter,
> user = nobody
That will run the filter file for all incoming mail, for each local
address.
> and a filter of:
>
> # Exim filter - this line is required
> if $header_to: contains "mydomain.com" or
> $header_from: contains "mydomain.com"
> then
> unseen pipe "/usr/local/lib/loadallmail"
> endif
> Also, the above config does not capture mail to a user who has
> an alias that contains a pipe.
>
> theguy: theguy,"|/usr/local/lib/loadguymail"
It wouldn't. Once the pipe has been encountered, there is no more
directing to be done.
> I've also tried the following with no success:
>
> message_filter_user = nobody
> message_filter_group = nobody
> message_filter = /usr/local/exim/filter
>
> It just complains that there is no user set for the pipe transport.
You will need to put a user= option on the "address_pipe" transport so
that Exim knows who to run it as, since you are generating a pipe
address from a place that doesn't have an associated user. However, as I
said above, this will run only once per message, and it sounds as if
that isn't what you are after.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
* This is sent by the exim-users mailing list. To unsubscribe send a
mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/