[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vps-mail] SA: Using trim_whitelist in VPS environment
- Subject: [vps-mail] SA: Using trim_whitelist in VPS environment
- From: Matt Cohen <lists@xxxxxxxxxx>
- Date: Tue, 8 May 2007 22:38:55 -0700
I've got a few users who are running up against disk quota becuase of
a 15 MB auto-whitelist file in the ~/.spamassassin directory.
I did some brief searches, and came across this script which works
great by deleting the single-line entries:
http://www.deepnet.cx/~kdeugau/spamtools/trim_whitelist
Unfortunately, it has to be run as the user, which for users that
don't have shell access, means I have to temporarily give them shell
access, su to that user, run the script, then remove the shell access
again.
I know that there were some scripts that I have (written by Scott?)
that perform SA tasks as the other user, e.g. sa-learn-all:
----------------------------------------
#!/usr/local/bin/perl
## root should run this as "./sa-learn-all user1 user2 user3"
for $user (@ARGV) {
$> = getpwnam($user) or next;
$ENV{HOME} = (getpwuid($>))[7];
system(q#/usr/local/bin/sa-learn -D --force-expire#);
$>=$<;
}
----------------------------------------
and so I was hoping I could impose on someone to help me tweak the
trim_whitelist script to also run as the other user - it is as simple
as copying the third and last line from the above snippet and adding
it to the trim_whitelist script?
Thanks,
Matt
--
:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+:-:+
Matthew I. Cohen http://www.iwbyte.com/
It Won't Byte Web Design & Hosting. Ob. Quote: "Reality is for those
email: lists@xxxxxxxxxx people who can't handle Fantasy"
========================================================================
This is <vps-mail@xxxxxxxxxxxxx> <http://groupmail.org/lists/vps-mail/>
Before posting a question, please search the archives (see above URL).
Main Index |
Thread Index