Quarantine ?

Craig Daters craig at WESTPRESS.COM
Wed Jan 26 17:16:35 GMT 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Craig Daters wrote:
> I'm talking about the 'user filter' option that is distributed with the
> MailWatch distro (see the file labeled USER_FILTERS). This involves
> using an additional column in the table called 'type' where you can
> specify whether a user is an admin, domain admin, user, or regexp
>
> A new table called 'user_filters' has four columns which discribes the
> user and domain/email matching criteria.
>
> The file USER_FILTERS shows a few examples that explains how it works,
> and I must admit, it works quite nicely.
>
> This also needs to be set up manually, but Steve promises that later
> versions will allow user management from within the web interface.
>
I just wanted to add that I am storing the non-spam email in addition to
delivering it. I have set up a cron job using a modified
'clean.quarantine' script to delete any messages over 90 days from the
quarantine.

After I set this up, I discovered that the quarantine section of the
messages for non-spam was not showing up. Thanks to Michael Svendsen on
the MailWatch list for this fix:

   In detail.php change following line (line 190 in my file):

   $quarantinedir = get_conf_var("QuarantineDir");
   $quarantine = $quarantinedir.'/'.$row->date.'/'.$row->id;
   $spam = $quarantinedir."/".$row->date.'/spam/'.$row->id;
   $notspam = $quarantinedir."/".$row->date.'/not-spam/'.$row->id;


   Change the $notspam variable to point on the right directory name:

   $notspam = $quarantinedir."/".$row->date.'/nonspam/'.$row->id;

And that did the trick!

With regard to the clean.quarantine script I happened upon this tip a
little bit ago that I think is too cool and uses the 'tmpwatch' app
installed on most everyone's *nix distro:

/etc/cron.daily/mailscanner-tmpwatch

#!/bin/bash

/usr/sbin/tmpwatch -u 168 /var/spool/MailScanner/quarantine
# 168 == 24 * 7 or one week
# 720 == 24 * 30 or one month
# 2160 == 24 * 90 or three months

I just thought I would share, this can be handy for all sorts of things :)

--
Craig Daters (craig at westpress.com)
Systems Administrator
West Press Print Communications

1663 West Grant Road
Tucson, Arizona 85705
(520) 624-4939
(520) 624-2715 fax

www.westpress.com

--
Please note: It is the policy of West Press that all e-mail
sent to and from any @westpress.com address may be recorded
and monitored. Unless it is West Press related business,
please do not send any material of a private, personal,
or confidential nature to this or any @westpress.com
e-mail address.

This message has been scanned for UCE (spam), viruses,
and dangerous content, and is believed to be clean.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list