Q: I want to see more hits in the search window

A: Edit config-site.php, and set the following:

 $config['MAX_SEARCH_HITS'] = 2000;

Note that the higher the value, the more resources you need.

Q: I want to send you a (spam) sample to analyse, etc.

A: Go ahead, but please send it as a gzip or zip attachment.

Q: Does clapf support virtual users?

A: Yes, however, it requires a little configuration.

Let's say you have the following postfix configuration in main.cf and the virtual stuff is stored in MySQL tables:

virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-vdomains.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-aliases.cf
virtual_uid_maps = static:1004
virtual_gid_maps = static:104

Create /etc/postfix/mysql-vdomains.cf like this:

user = clapf
password = verystrongsecret
dbname = clapf

query = SELECT domain FROM domain WHERE domain='%s'

Create /etc/postfix/mysql-aliases.cf like this:

user = clapf
password = verystrongsecret
dbname = clapf
query = SELECT LOWER(CONCAT(substring_index(substring_index('%s', '@', -1), '.', -2), "/", 
    substring_index('%s', '@', 1), "/")) FROM user, t_email WHERE user.uid=t_email.uid AND email='%s'

This will return the virtual directory in the form of yourdomain.com/user/, eg. aaa.fu/aa/ for aa@aaa.fu.

Q: How do I create a dedicated filtering box and forward all my email to my Exchange server?

A: Create the mysql .cf files like above, then create a transport map file


virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-vdomains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-aliases.cf
transport_maps = proxy:hash:/etc/postfix/transport


   *               smtp:[exchange.aaa.fu]

Q: How to prevent spam to reach users' inboxes?

A: Set the spaminess_oblivion_limit somewhere between the value of spam_overall_limit and 1, eg. 0.99. Then clapf will silently drop any spam message with a spam probability value greater than 99%. Please note that these spam messages will still get to the users' queue directory, so they can access their spam through the GUI, but their inbox will be free of spam.


Q: How to disable spam check for outgoing emails?

A: I strongly recommend to separate the flow of incoming and outgoing emails, ie. incoming emails go through clapf, while outgoing emails don't. You may solve this by using two postfix instances using IP-addresses.

If that's not possible, then specify the mynetwork variable in clapf.conf, thus clapf knows to bypass the antispam engine for emails from internal senders.

Q: What happens if I mistakenly train a message as ham, then as spam?

A: The accuracy of any statistical anti-spam application mostly depends on the quality of the token database. Although it's not a fatal problem if you happen to do this, but be aware, it may result a less accurate operation in some cases.

Q: How could I figure out what this application does?

A: If you are curious, set verbosity=5 in clapf.conf, then run /etc/init.d/rc.clapf reload, and it will syslog a lot of stuff.

If you want to know why a single message is considered as spam (or ham) then use the spamdrop utility against a single RFC-822 format message as follows:

spamdrop -m message.eml -D

This will print out the message as clapf sees it, the tokens participated in the statistical decision, and other stuff. If you have a merged database, then use the -r <recipient email> option to spamdrop, eg.

spamdrop -m message.eml -r aaa@aaa.fu -D