Introduction

We use Exim as our mail daemon. It has a built-in filtering system that allows people to write a ".forward file" to give it custom instructions. Normally this is stored at ~/.forward, but at HCoop we store it at ~/.public/.forward to make it easier to keep the rest of your home directory private. So when we say ".forward" on the rest of this page, we mean ~/.public/.forward.

When email is delivered, the delivery process will run as the USER.daemon user, where USER is your HCoop username.

Delivering all mail to a different address

If you want email sent to your HCoop email address to be forwarded elsewhere, you can do that as follows.

Make a .public/.forward file in your home directory.

It should contain only one line, consisting of just the e-mail address to which mail should be forwarded.

Examples

Please note, an exim filter file, as opposed to a standard UNIX .forward file, must start with a line consisting exactly of the string "# Exim filter". This line is not an ordinary comment and any change will cause Exim to attempt to treat it as a list of forward addresses instead of a filter file.

Also, you should create and subscribe to any folders mentioned in these filters from within your IMAP client before installing these scripts.

NathanKennedy

It is possible to set up custom filters to do fancy things based on the X-Spam-Level: header. Here is NathanKennedy's ~/.public/.forward file. He finds that the default setting of 5.0 is too wimpy, and lets too much spam into his inbox. Virtually no ham that he gets scores less than 3.0, whereas a lot of spam scores less than 5.0, so he'd rather have anything over 3.0 go to his Junk folder. At the same time, he doesn't want to waste time, cycles, disk space or bandwidth with spam over 9.0. Most of his spam does score 9.0, and this goes straight to /dev/null (immediately disposed of) with this filter.

StephenMichel

This template filters anything sent to me@example.comor to me+$anything@example.com into the sub-folder me. This is useful if you have one or more aliases set up, to filter mail for each alias into its own subfolder.