Filtering junk mail using Exim filters


By default when your account is created (or migrated) we provide a simple Exim filter which resides in the ~/.forward file containing:-

# Exim filter  <<== do not edit or remove this line!
#
#       The first line should be "# Exim filter" (plus optional extra text),
#       to signal to Exim to go ahead and look for filtering commands.
#       In other words, it's a "magic comment" similar in style to things like
#       "#!/bin/sh -" at the start of shell scripts.
#
#
#       The Exim document (http://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch03.html)
#       strongly recommends the following command as the first filter command:
#       it prevents delivery error reports going round and round in loops,
#       and such like.
#
if error_message then finish endif
#
#
if $h_X-Oxmail-Spam-Level: begins "******"
then
          # Probably spam, save in my spam mbox instead, and finish
          save IMAP/spam
          finish
endif


The number of "stars" in the Spam-Level comparison above relates to how spam like the message is.  If you are receiving too much spam, reduce by one the number of stars in the comparison and monitor your mail for a few days before considering reducing it again.  Remember spam like email is delivered into the spam file in your IMAP directory, so you can see it there and we recommend checking and emptying it weekly.