Email spam overload

creasemedia

New member
Joined
Jan 15, 2009
Messages
1
Hi everyone,
this is my first post: I have an issue with a client's email accounts collecting SPAM emails. Some have collected over 100 MG as shown here in this screenshot:
http://creasemedia.com/downloads/emailoverload.png

Can anyone advise on how to manually purge these? I have no idea where it's being saved to start with...it's annoying as it's accumulated over 1 GB of SPAM mails taking up space in the server.

Also is it possible to have them not collect them or auto-purge in the very least? thanks in advance,
Kevin
 
This could be as simple as clicking on 'Select' at the top of the screen shown, make sure Spambox, is Selected, then click Delete. In case things go wrong, here is how to deal with the problem from a shell prompt.

With the standard maildir setup:

ls -R /home/*/Maildir/.INBOX.spam

shows you location of the spam. There is always a (rare) chance that a legitimate message might end up in the spam box by mistake, so you may want to use grep with a similar path to make sure to look at Subject:, To:, From:, etc. You can just move any false positives to the proper inbox. Once you are sure your are good to go, you can use rm for wholesale cleanup - don't use -R here because you do not want to remove the directories - something more like:

rm -f /home/*/Maildir/.INBOX.spam/new/*

Note if you have a lot of files (and it sounds like you might), you may need to use something like q1LN* instead of * to batch the matches so command line wild card expansions don't run out of memory.

Depending on your users, you can automate parts of this process with cron, but you probably want to have a human review before deleting anything (I use a daily cron to move the spam to a review area, where it can be scaned and deleted as need be)
 
Last edited:
Back
Top