Hello list, I've been working on getting DSPAM deployed and have implemented it on my own (CentOS 5) email server with great results. I've put it on a client's (CentOS 5) QMT, so far, with good results. I followed the instructions on this fellow's site <https://qmail.jms1.net/dspam/> but wanted to use the Redhat Package Manager for ease of upgrade and came up with the below procedure using EPEL (If anyone is interested): I've changed the stock configuration file so that spam is tagged and delivered rather than quarantined. Training is done per user on an one's IMAP '.spam' and '.notspam' folders.
The reason for implementing DSPAM were as follows: Out of 56,000 emails for the month of October 17,000 were being blocked by Spamdyke. and about 1/2 to 2/3 of the rest, 39,000 emails, were being tagged by Spamassassin. With these great numbers clients were still inundated with spam. We tried Sonicwall's Anti-Spam service, at first with great results, but with their firmware upgrade things went to smash. Sonicwall admitted it was a problem on their side but have yet to correct the problem. If anyone would like to see my dspam.conf file or the training scripts I use, please ask. Eric Instructions (hopefully I've not forgotten anything): Step 1) Add EPEL Repo (For YOUR Distribution): http://wiki.centos.org/AdditionalResources/Repositories Step 2) Set priorities according to centos: http://wiki.centos.org/PackageManagement/Yum/Priorities Step 3) Create the dspam database according to the following site and outlined below (http://qmail.jms1.net/dspam/): ***Note: After creating the DSPAM database you must type the command 'use dspam;' $ cd /usr/share/dspam/sql-scripts/mysql $ mysql -u root -p Enter password: (Enter your mysql root password.) Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 5.0.95 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE dspam ; Query OK, 1 row affected (0.00 sec) mysql> use dspam; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> \. mysql_objects-4.1.sql Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.06 sec) Records: 0 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.06 sec) Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.05 sec) Records: 0 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.06 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.03 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> \. virtual_users.sql Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.04 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> GRANT ALL ON dspam.* TO dspam@localhost IDENTIFIED BY 'p4ssw3rd' ; Query OK, 0 rows affected (0.00 sec) mysql> \q $ mysql -u dspam -p dspam Enter password: (Enter the "dspam" mysql user's password.) Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 245 Server version: 5.0.95 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ALTER TABLE dspam_preferences ENGINE=innodb ; Query OK, 1 row affected (0.50 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_signature_data ENGINE=innodb ; Query OK, 475 rows affected (2.04 sec) Records: 475 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_stats ENGINE=innodb ; Query OK, 15 rows affected (0.31 sec) Records: 15 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_token_data ENGINE=innodb ; Query OK, 1175704 rows affected (1 hour 16 min 35.29 sec) Records: 1175704 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_virtual_uids ENGINE=innodb ; Query OK, 15 rows affected (1.13 sec) Records: 15 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_token_data ADD INDEX( spam_hits ) ; Query OK, 1175704 rows affected (52.53 sec) Records: 1175704 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_token_data ADD INDEX( innocent_hits ) ; Query OK, 1175704 rows affected (1 min 10.16 sec) Records: 1175704 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE dspam_token_data ADD INDEX( last_hit ) ; Query OK, 1175704 rows affected (1 min 36.51 sec) Records: 1175704 Duplicates: 0 Warnings: 0 mysql> \q Step 4) Install appropriate software. From command line type the following: yum install dspam dspam-client dspam-mysql Step 5) Change permissions on configuration file: chmod 744 /etc/dspam.conf Step 6) Change permissions to the folder containing dspam.sock chmod 777 /var/run/dspam Step 7) Start dspam service and turn it on: service start dspam chkconfig dspam on Step 8) Replace the line in '/home/vpopmail/domains/yourdomain.com/.qmail-default' with the following: | /usr/bin/dspamc --user "$EXT@$HOST" --deliver=stdout | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
