imapspamfilter is a client-side IMAP client that deletes spam mail without downloading the mailbox. It does this by looking only at the header and the first 1024 bytes of the body, and applying a set of heuristics to decide if the mail is spam. It prints a list of suspect messages, asks for confirmation, and then deletes them all in place.