2

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?

Verity
  • 23
  • 2

2 Answers2

0

you can try running spamassassin on every single message and then analyzing its output.

some example here.

pQd
  • 29,981
  • 6
  • 66
  • 109
  • Thanks but unfortunately not many of these emails get a high enough score. Many of them <1. I think it's a matter of matching domains and/or ips against blacklists. – Verity Jun 14 '12 at 09:46
0

You can put something like spam gateway before your mail server. But this gateway should not only inspect smtp because it will do nothing with spam email in maildirs but also have to inspect pop and imap. I know that Untangle can work as transparent bridge and check all smtp, imap and pop protocols for spam

http://untangle.com

Its not exacly the same thing that you asked but it will prevent spam emails from reaching your clients.

B14D3
  • 5,188
  • 15
  • 64
  • 83
  • Yes I've thought of changing the architecture a bit, but it will not help this problem now. I didn't know about untangle. – Verity Jun 14 '12 at 09:49