Recently, we have set-up a centos 5 web server with Kloxo installed in it for managing hosting and emails. Kloxo came by default with Courier-IMAP, qmail and vpopmail configured on the server. We have set-up the site that you are currently reading this content from. The email accounts have been created for the domain and we were able to send and receive emails. The problem was that all incoming messages are being marked as "***** SPAM *****" in the subject line even though the sender is from a reliable resource.
We have disabled Domain Keys, Spam Dyke, Anti-virus scanner and everything that we possibly could think of that interacts with the email before it is received and till it is read. But still the problem persisted. Our best friend Google didn't lend it's hand this time for us in resolving this issue. Upon much search on the internet and kloxo, qmail and courier we found out that all the email messages are passed through a SPAM filter called "BogoFilter" that was installed and enabled by default for every domain on the server. This we could able to confirm by seeing the message headers which have a X-BogoFilter header.
We then were able to catch the culprit that is marking the subject as "****SPAM****". We then adjusted the configuration for the BogoFilter and increased the SPAM level and the messages are now marked as safe. It is a bit hard though to train BogoFilter on what to consider as SPAM and what not to consider SPAM.
We switched to SPAMASSASSIN which was much easier to set-up and configure than BogoFilter and we were able to see instant results. It was able to identify the messages properly as SPAM.