I have my own SquirrelMail installation set up on my site and would like to add serverside filtering but I'm a little unfamiliar with UW IMAP and I'm not sure exactly how to do it.

Can anyone help? I beleive I'll need to use procmail somehow but where to create the script and how to install the SquirrelMail plugin and configure it is a little beyond me.