[exim] Save a copy of every rejected spam?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Dickenson, Steven
Date:  
À: Exim-users
Sujet: [exim] Save a copy of every rejected spam?
Hi all, I'd like to save a copy of every message marked as spam by my
server (for Bayes learning). I'd like some input on my options and my
proposed implementation.

Details:
We run Exim (on Debian Sarge) as a spam/av gateway for our internal
Exchange server. Using SpamAssassin and Exiscan-ACL with Exim 4.50, we
reject spam that score over 8 points, and tag anything over 5. We only
scan messages under 100k, so spam_score_int isn't available for every
message.

Wants:
To save a copy of every message marked as spam to a maildir style folder
on the gateway server itself, including messages we would normally
reject.

Thoughts:
Use a fakereject control on the deny statement in our DATA ACL. Since I
only want to save one copy of the message (nothing per-user), I'm
thinking my only option here is a system filter. I would need to check
for the existence of the spam_score_int variable in the system filter,
then perform an unseen save to a maildir folder for messages between 5
and 8, and do a seen save to the same folder for message over 8.

Questions:
My system filter skills are next to zero. Can someone help me out with
this? Here's what I have so far, untested.

if ${def:$spam_score_int}
then
  if $spam_score_int is above 8
  then
    save /var/spool/exim4/training/spam/
  elif $spam_score_int is above 5
  then
    unseen save /var/spool/exim4/training/spam/
  endif
endif


In my main configuration I have the lines:
system_filter = CONFDIR/system_filter
system_filter_directory_transport = address_directory

Finally, the address_directory transport, supplied with the default
Debian configuration is this:
address_directory:
debug_print = "T: address_directory for $local_part@$domain"
driver = appendfile
envelope_to_add = true
return_path_add = true
check_string = ""
escape_string = ""
maildir_format

Anyone see any problems or errors with this?

Thanks so much!

Steven
---
Steven Dickenson <sdickenson@???>
Computer Network Manager
The Key School, Annapolis Maryland