Timothy Murphy writes:
> On Tuesday 09 September 2008, FRLinux wrote:
>> I have a directory containing about 50,000 email messages,
> of which I am sure over 95% is spam.
>> What is the best (quickest) way of passing these messages through spamassassin
> and deleting those that fail the test.
> [I'm running spamd on the machine in question.]
>> A simple script - if appropriate - would be very much appreciated.
>> > Hello Timothy, you didn't specify the mailbox format (mbox or Maildir)
>> They are in maildir format - 50,000 separate files.
You could run
spamassassin -t /path/to/maildir/new > mbox1
spamassassin -t /path/to/maildir/cur > mbox2
It'll output mboxes with the filtered versions of each message. You then
need to replace the maildir with the mboxes and remove the ones that
match "X-Spam-Flag: YES".
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!