One thing I really like about Courier is the fact that I can filter messages with Spamassassin from a maildroprc file, essentially as an after queue postfix filter. Upon retrospect, it is probably a good thing that sieve scripts cannot execute arbitrary system commands!
So how should Spamassassin get integrated into a Dovecot / Postfix world?
As I see it, there are two options:
While I'm at it, I need to read up on Amavis, ClamAV and DSpam.
UPDATE: Looks like a spamassassin milter or a spampd relay proxy might be the way to go. It would be nice to flag some messages as spam, and flat out reject (before queue) other messages that have a very high spam rating.
The problem with a before queue filter / proxy relay is that all incoming mail must be either accepted or rejected. To reject mail, it must be analyzed. If its not rejected, then it would be bounced if its not deliverable, causing potential backscatter spam.
So, a post-queue content filter is really the way to go. So how should it be configured? There are many ways, and a proxy relay can be configured as a post content filter too. Milters are before-queue, so how about a Postfix contentfilter using spampd as a proxy relay or as a contentfilter? Decisions, decisions...
Probably a proxy relay, as Postfix supports sender dependent relay hosts, which is interesting. Thankfully there are a number of smtp proxies out there which could potentially be used as a conduit to spamassassin. I actually prefer using spamc though... because it can connect to remote spamassassin hosts as a specific user. Also, by using a spamc content filter, the filtering could take place on the gateway. I'll have to check into how to specify different users, exclude certain messages by header content, and so on.
Also noting: if I remove courier and maildrop, I'll use Dovecot as the LMTP / virtual transport. Need to figure out how to do that.