Junk mail filter for iPhone via imap I have:


Mac Book Pro running OS X 10.10.2
iPhone 6 Plus running iOS 8.1.3


On my computer I run Mail, which checks the email every 1 min.  On my iPhone it runs every 15 mins.  So most of the time, my computer receives the email first and filters the message so my phone never gets the junk mail.  However when my computer is sleeping my iphone normally gets the email first and does not perform the filter for the junk mail.

Options: 


Force the computer not to sleep
Write a script to run while sleeping asking mail query the server (I'm not sure how hard this would be)
Ask here and see if someone has a better idea.
The best idea is to pay for (or set up) server side junk mail filtering. That allows all the clients to only spend time downloading non-junk.

Have a look at Mail Route (10 percent off link from the podcast where I heard about it sponsoring most recently) - http://mailroute.net/thetalkshow.html

You probably will spend more on the service than the cost to run your Mac all the time, but the filters will likely be much better on the hosted site than OS X mail client.