I spent most of my day pouring over exim4, mutt, dovecot, maildrop/mailfilter, bogofilter and spamassasin documentation and examples. And when that failed, I was just experimenting.
I must have quite a polished setup now, including offlineimap for when I without a net connection (and backups), mairix for searching my mail and rss2email for news feeds.
What cost me a lot of time today, is maildir. Note you have to have this stupid dot prefix to the filename. So your spam folder should be called, .spam. I wish there was stronger conventions when it came to naming of the folders. I don’t like for example INBOX.lists.debian-www. Having slashes would of been much nicer. And everything lowercase.
Get bogofilter to periodically train from a junk folder I create. I can’t pipe directly into bogofilter, as I generally do not read mail on my mail server!
Cleverly combine or rsync mails from my school Courier’s IMAP and my Dovecot IMAP.
I will love to share my configuration with you from my repo, but it’s web interface is a little unstable.