Cyrus supports server-side filtering via Sieve. This includes filing messages into folders, vacation responses, and more. Read the docs for details. There are a handful of Web interfaces (eg, Websieve) for managing scripts.
Ok, but what about spam detection tools that rely on procmail recipes? I read the sample chapter from an O'Reilly book that's online and describes how to integrate sendmail, procmail and cyrus-imap:
http://www.oreilly.com/catalog/mimap/chapter/ch09.html
Does this work fine in cases where cyrus-imap fails to deliver the message due to over quota or non existant mailboxes?
Consider replacing Sendmail with Exim (http://www.exim.org/) and the ExiScan-ACL patch (http://www.duncanthrax.net/exiscan-acl/). Add SpamAssassin (http://spamassassin.org/) and possibly clamav (http://clamav.elektrapro.com/stable/)
The big advantage of Exim with ExiScan-ACL is that it can reject spam messages while the SMTP connection is still open; so you never try to bounce messages to probably bogus or forged addresses.
And Exim works quite well with Cyrus.
There are FAQs and How-To's on the various sites mentioned above that should make it easy to get everything set up and working together. (If you happen to be running FreeBSD, you can install all of them through the ports. The Exim port uses ExiScan-ACL by default.)
-Pat