Re: [Exim] [Feature-Request] syslog from filter files

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Heinz Ekker
CC: exim-users
Assumpte: Re: [Exim] [Feature-Request] syslog from filter files
On Thu, 21 Aug 2003, Heinz Ekker wrote:

> We have Exim running on multiple servers. Users can create their own
> filters via a web interface, which generates an Exim filter file.
>
> For customer care and statistic purposes, each filter action writes a
> log line about what it did to which message. This works quite nicely,
> but I couldn't find a possibility to do this via syslog to our central
> log host.


Wow. That sounds like a dangerous recipe for letting bad users write a
lot of junk to your syslog. Are your users particularly well-behaved? :-)

> So I wrote a small (but crude) patch to do this. If you specify
>
> logfile "syslog"
>
> all output from logwrite is now sent via syslog.
>
> Is it possible to incorporate this or a similiar feature into Exim?


I'm afraid I'm not happy with this because of the possibility of abuse.
It seems to me to be something that very, very few sites would actually
want to do.

> Or does anybody see another possibility to achieve that?


You could write a long-running daemon that listens on a named pipe
(FIFO) or Unix domain socket, and copies anything it reads to syslog. If
the permissions on the pipe allowed anybody to write to it, it should be
possible for users to access it from their filters as a "log file".

An advantage of this approach is that your daemon could take a look at
what is being written and perhaps prevent possible abuse.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book