Exim filter
Exim filters are a simpler language than sieve or procmail, if you wish to do simple filtering without any advanced features, then an exim filter will likely work. The full documentation for exim filters is available on the exim website.
At the School of Mathematics, Exim filters are stored in .forward files.
An example .forward that will filter email marked spam is show below:
# Exim filter logfile $home/filter.log 0644 if $sender_address contains "proofpoint-pps" then logwrite "$message_id proofpoint" seen finish endif if $header_X-Spam-Status begins Yes then logwrite "$message_id spam" seen finish endif
Filtering before Forwarding
# Exim filter logfile $home/filter.log 0644 if $sender_address contains "proofpoint-pps" then logwrite "$message_id proofpoint" seen finish endif if $header_X-Spam-Status begins Yes then logwrite "$message_id spam" seen finish deliver madeupmathaccount@gmail.com