oSpam: a system-wide anti-spam solution for qmail and vmailmgr, ----- based on perl, mysql, ifspamh and SpamAssassin (c) 2000 Olivier Mueller $Id: CONCEPT, v 1.10 2001/02/24 21:47:30 swix Exp $ $Source: /cvsroot/omail/ospam2/CONCEPT,v $ System-wide solution for qmail + vmailmgr + spamassassin mail server. Mail users and administrators can turn on and off the anti-spam system and set their settings (score, what to do with spams, white/blacklists), which are saved in the standard SpamAssassin SQL base. (cf. http://spamassassin.rediris.es/dist/sql/README and ./sql/nospam.sql for the table structure). The last solution I used before was to do the spam-scanning of incoming mails via qmail-scanner, directely on smtp server level: it worked fine, but solution as not optimal because of a few problems with multiple recipients and compatibility problems with vmailmgr. That's why I now started to work on a solution based on .qmail-xxx files. Steps: 1. the user logs in into omail-admin and use the "Antispam" panel (screenshot: http://www.omnis.ch/stuff/ospam/oadmin.jpg ) 2. settings are saved into the sql table "userpref" At this moment, the mail server don't know yet it has to scan the mails for this user. 3. cron or a trigger runs the ospam-dotqmail.pl script 4. ospam will compare the SpamAssassin table with its internal table (dotqmail) and will create (or edit/remove) the according . qmail-xxx file. For example: omega:/home/omx.ch # more .qmail-scan_and_trash # ================================================================================= # /home/omx.ch/.qmail-scan_and_trash generated on Sat May 3 19:35:08 2003 # by oSpam version 1.1000 for [o1a336] # ___ DO NOT EDIT ___ -== http://ospam.omnis.ch/ ==- # |/usr/local/nospam/ifspamh _trash_ scan_and_trash@omx.ch |/var/qmail/bin/preline -d /usr/bin/spamc -f -u scan_and_trash@omx.ch | /usr/local/nospam/filepipe /usr/local/bin/vdeliver # # ================================================================================= 5. on further user settings changes (in omail-admin): - settings like score and white/blacklists are fetched directely by spamc, so it will be valid just after the change - spam scanning on/off, action with the spams (forward/trash/tag) are updated only on ospam-dotqmail.pl run Voila, I hope you see the concept a little bit better... :) --Olivier