[Wolves] IMAP filtering

David Goodwin david at openminds.co.uk
Wed May 12 12:24:24 BST 2004


> 
> Then imapfilter or procmail is the way. When you decide and work out
> which to use, post it here so I can steal how you did it ;)
> 


Dunno if the two .procmail files I have on my website are of any use.

the first (non-maildir) was when I had a text file containing people i 
didn't want mail from.. this didn't really work too well... as you can 
imagine...

the second, is for Maildir type things (e.g. courier/cyrus).

The important bits to note are :

e.g.

:0
* ^From.root at codepoets.co.uk|^TOroot at codepoets.co.uk
.Logcheck/

Line 0 - The :0 just says it's the start of a new rule. (If you have :0: 
then it will also lock, but this isn't needed with maildir).

Line 1 - You then have a regexp for the mail - e.g. ^From / ^TO (special 
as it does ^To or ^cc etc).

Line 2 - where you want matching mail (matches line 1) to go to... 
trailing slash says it's a maildir thing.


There are quite a few examples on the web, and i'm sure mine aren't very 
good.

See http://codepoets.co.uk/doc/ for the full versions.



Thanks
David.






More information about the Wolves mailing list