Forwarding email using Exim filtering

Forwarding email using Exim filtering

Let us assume you would like to forward a copy of non-spam email to your email account at another place, e.g. othermail@other.place, whilst still receiving a copy here. This can be achieved by modifying the spam filter decribed here to now look like:-

if $h_X-Oxmail-Spam-Level: begins "*******"
then
          # Probably spam, save in my spam mbox instead, and finish
          save IMAP/spam
          finish
else
          # Forward a copy to another place, and continue
          unseen deliver othermail@other.place
endif

If you do not want a local copy of your messages, to forward all non-spam like email, and finish there (i.e. in Exim terms, a significant delivery has taken place, don't continue processing through the filter file looking for more things to do).

if $h_X-Oxmail-Spam-Level: begins "*******"
then
          # Probably spam, save in my spam mbox instead, and finish
          save IMAP/spam
          finish
else
          # Forward to another place
          deliver othermail@other.place
endif

Full detail about Exim filtering can be found here