[Nottingham] Exim filtering

Simon Amor simon at leaky.org
Thu May 26 22:21:05 BST 2005


Hi,

   I'm trying to use exim filters in a .forward file to alter the  
subject of an email before it resends it to another address (so I  
know where it's come from when it arrives at the new address).

It looks like headers add/headers remove might do it, but they're  
only available in a system-wide filter not in a user filter.

So far, I've got
-----------------------------------------
# Exim filter

if error_message then finish endif

if $h_from contains x at y.com
then
   unseen finish
else
   deliver simon at leaky.org
endif
-----------------------------------------

This should only allow emails from x at y.com to be delivered to the  
local mailbox, everything else is forwarded to my leaky.org address.  
What I want is something to go in the else block that will modify the  
subject, either prepend or append a marker e.g [TAG] to it.

The documentation on exim filters covers filtering based on subject  
but nothing particularly helpful. The only other thing I can think of  
is to use the 'mail' command to setup a new mail message entirely.

Any pointers much appreciated.

   Simon
-- 
Simon Amor
simon at leaky.org
http://www.leaky.org/



More information about the Nottingham mailing list