Binary package “imapfilter” in ubuntu precise
filter mail in your IMAP account
Imapfilter is a client application that allows you to
filter mail in your imap mail account. When used in
conjunction with mutt, as your precommand, it allows
you to have your mail sorted into imap folders.