Here's an easy method to remove email based on the IP address of the sender in Mail.app.
Every time I receive a spam email I add its email address to a list of rules in Mail to move it directly to trash. The length of this list has grown over time and I now have more than one ever-growing list. After a while I noticed that, although the sender addresses were different, the IP address in a lot of cases stayed the same. I looked at the rules in the Mail prefs, but there is no obvious rule for filtering by IP address.
However, it can be achieved using the rules, with a little tweak.
Firstly, it might be a good idea to create a new Mailbox and call it something like 'Review Spam.'
Next, identify the sender's IP address from the spam messages. If you don't know how to do this, here's a rough guide:
Select a spam message and select View » Message » Long Headers -- the header section in the message will expand. In the header you should see several 'Received' headings with aome text next to them and an IP address.
The text and IP in the first 'Received' heading is likely your own Mail server -- you don't want to add this to the rule otherwise the rule will act on all your incoming mail from that server. This can be a bit tricky if you don't know what you're looking for, but if you analyse the spam messages against legitimate messages you should be able to find the offending IP address, eventually.
To create the rule that does the filtering:
Mac OS X Hints
http://hints.macworld.com/article.php?story=20110304014802199