Re: logging blocked spam

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Bill
Cc: exim-users
Asunto: Re: logging blocked spam
On Thu, 15 May 1997, Bill wrote:

> We're doing spam blocking like this:
>
> >message_filter = /etc/mail/exim/system_filter
> >message_filter_user = 1
> >message_filter_group = 12
>
> user 1 is root, group 12 is daemon.
>
> system_filter looks like:
> >if $h_subject: contains "show me the money" or
> > $h_subject: contains "Save and/or Earn a Bundle" or
> <lots more rules>
> > $h_subject: contains "Opportunity Knocks!"
> >then
> > logfile /var/mail/spam/blocked-spam-headers.log
> > log "$tod_log - $header_from - $local_part - $header_subject"
> > seen finish
> >endif
>
> We'd like to be able to create blocked spam report to show the
> users how much we love them and all that but variable $local_part
> is empty. Is there some trick to getting that variable set?
> btw, the variants on local_part(prefix, suffix) are also empty.


The reason $local_part is unset while running the system filter is that
the system filter is run once per message, at the start of delivery. A
message may have many recipients, so consequently there is no single
value that can be set in $local_part.

I suppose I should think about providing a variable containing a list of
all the recipients for use in the system filter. Not for user's filters,
of course. One thing you can currently do is to set log_recipients on,
and fish the data out of the log files.

Philip

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714