IMAPFilter is a serverside javascript mail filtering utility. At the moment it can just move, flag and keyword mails.