My postfix was badly configured and let a lot of spam emails through to an account. I've fixed postfix now so it's become a much better spam filter, and almost no new spam is getting through. However, there are still a lot of old spam emails on the server which I would like to remove somehow. These are Maildir style email files (ie one file per email). Is there a command line tool for going through these emails that have already passed the mail server? I don't want them to reach the client.
Basically, all I need is a cli to check whether one email file is a spam or not, then I can sort out the rest using the "find" command.
I've found rblcheck but it seems to require an ip address (rather than a whole email) as input.
Any ideas?