Sorry, not Postfix, but PostgreSQL.

On 7/15/2015 1:42 PM, Eric Broch wrote:
> First, I would move to a MySQL (or Postfix) backend. I use MySQL because
> I'm familiar with it. This would resolve any need to clean your hash
> database.
> I think misclassification of email is (at least in my case) a
> problematic database and reason to clear it. I had a similar issue in
> the past on which basis I cleared a database. I never could resolve the
> issue by training. Maybe someone with more experience could chime in on
> this.
> I am familiar with the dovecot antispam plugin but don't use it. I may
> give it a try some time in the future. One reason I don't use it now is
> because Outlook 2013, which some clients use, strips headers out of
> email causing difficulty, or impossibility, in DSPAM training.
>
> Here's how I create a MySQL DSPAM DB:
>
> 1) Install MySQL/MariaDB server
>
>
>
> 2) Create DPSAM DB (minus the <begin> and <end> tags):
> <begin>
> MYSQLPW=mypassword
> mysqladmin drop dspam -uroot -p$MYSQLPW
> mysqladmin create dspam -uroot -p$MYSQLPW
> mysqladmin -uroot -p$MYSQLPW reload
> mysqladmin -uroot -p$MYSQLPW refresh
>
> echo "GRANT ALL ON dspam.* TO dspam@localhost IDENTIFIED BY 'mydspampw'"
> | mysql -uroot -p$MYSQLPW
> mysqladmin -uroot -p$MYSQLPW reload
> mysqladmin -uroot -p$MYSQLPW refresh
>
> mysql -uroot -p$MYSQLPW dspam < dspamdb.sql
> mysqladmin -uroot -p$MYSQLPW reload
> mysqladmin -uroot -p$MYSQLPW refresh
> <end>
>
>
>
>
> 3)
> dspamdb.sql file (minus the <begin> and <end> tags):
>
> <begin>
> --
> -- MySQL dump 10.13  Distrib 5.1.71, for redhat-linux-gnu (x86_64)
> --
> -- Host: localhost    Database: dspam
> -- ------------------------------------------------------
> -- Server version       5.1.71
>
> /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
> /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
> /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
> /*!40101 SET NAMES utf8 */;
> /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
> /*!40103 SET TIME_ZONE='+00:00' */;
> /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
> /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
> FOREIGN_KEY_CHECKS=0 */;
> /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
> /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
>
> --
> -- Table structure for table `dspam_preferences`
> --
>
> DROP TABLE IF EXISTS `dspam_preferences`;
> /*!40101 SET @saved_cs_client     = @@character_set_client */;
> /*!40101 SET character_set_client = utf8 */;
> CREATE TABLE `dspam_preferences` (
>   `uid` int(10) unsigned NOT NULL,
>   `preference` varchar(32) COLLATE latin1_general_ci NOT NULL,
>   `value` varchar(64) COLLATE latin1_general_ci NOT NULL,
>   UNIQUE KEY `id_preferences_01` (`uid`,`preference`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
> /*!40101 SET character_set_client = @saved_cs_client */;
>
> --
> -- Table structure for table `dspam_signature_data`
> --
>
> DROP TABLE IF EXISTS `dspam_signature_data`;
> /*!40101 SET @saved_cs_client     = @@character_set_client */;
> /*!40101 SET character_set_client = utf8 */;
> CREATE TABLE `dspam_signature_data` (
>   `uid` int(10) unsigned NOT NULL,
>   `signature` char(32) COLLATE latin1_general_ci NOT NULL,
>   `data` longblob NOT NULL,
>   `length` int(10) unsigned NOT NULL,
>   `created_on` date NOT NULL,
>   UNIQUE KEY `id_signature_data_01` (`uid`,`signature`),
>   KEY `id_signature_data_02` (`created_on`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
> MAX_ROWS=2500000 AVG_ROW_LENGTH=8096;
> /*!40101 SET character_set_client = @saved_cs_client */;
>
> --
> -- Table structure for table `dspam_stats`
> --
>
> DROP TABLE IF EXISTS `dspam_stats`;
> /*!40101 SET @saved_cs_client     = @@character_set_client */;
> /*!40101 SET character_set_client = utf8 */;
> CREATE TABLE `dspam_stats` (
>   `uid` int(10) unsigned NOT NULL,
>   `spam_learned` bigint(20) unsigned NOT NULL,
>   `innocent_learned` bigint(20) unsigned NOT NULL,
>   `spam_misclassified` bigint(20) unsigned NOT NULL,
>   `innocent_misclassified` bigint(20) unsigned NOT NULL,
>   `spam_corpusfed` bigint(20) unsigned NOT NULL,
>   `innocent_corpusfed` bigint(20) unsigned NOT NULL,
>   `spam_classified` bigint(20) unsigned NOT NULL,
>   `innocent_classified` bigint(20) unsigned NOT NULL,
>   PRIMARY KEY (`uid`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
> /*!40101 SET character_set_client = @saved_cs_client */;
>
> --
> -- Table structure for table `dspam_token_data`
> --
>
> DROP TABLE IF EXISTS `dspam_token_data`;
> /*!40101 SET @saved_cs_client     = @@character_set_client */;
> /*!40101 SET character_set_client = utf8 */;
> CREATE TABLE `dspam_token_data` (
>   `uid` int(10) unsigned NOT NULL,
>   `token` bigint(20) unsigned NOT NULL,
>   `spam_hits` bigint(20) unsigned NOT NULL,
>   `innocent_hits` bigint(20) unsigned NOT NULL,
>   `last_hit` date NOT NULL,
>   UNIQUE KEY `id_token_data_01` (`uid`,`token`),
>   KEY `spam_hits` (`spam_hits`),
>   KEY `innocent_hits` (`innocent_hits`),
>   KEY `last_hit` (`last_hit`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
> PACK_KEYS=1;
> /*!40101 SET character_set_client = @saved_cs_client */;
>
> --
> -- Table structure for table `dspam_virtual_uids`
> --
>
> DROP TABLE IF EXISTS `dspam_virtual_uids`;
> /*!40101 SET @saved_cs_client     = @@character_set_client */;
> /*!40101 SET character_set_client = utf8 */;
> CREATE TABLE `dspam_virtual_uids` (
>   `uid` int(10) unsigned NOT NULL AUTO_INCREMENT,
>   `username` varchar(128) DEFAULT NULL,
>   PRIMARY KEY (`uid`),
>   UNIQUE KEY `id_virtual_uids_01` (`username`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> /*!40101 SET character_set_client = @saved_cs_client */;
> /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
>
> /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
> /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
> /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
> /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
> /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
> /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
> /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
>
> -- Dump completed on 2014-01-29 10:00:12
>
> <end>
>
>
>
>
> 4) Storage Driver settings in dspam.conf
>
> <begin>
> StorageDriver /usr/local/lib/dspam/libmysql_drv.so
>
> MySQLServer             /var/lib/mysql/mysql.sock
> MySQLUser               dspam
> MySQLPass               mydspampw
> MySQLDb                 dspam
> MySQLCompress           true
> MySQLReconnect          true
> <end>
>
> Eric
>
>
> On 7/15/2015 11:37 AM, waterdog wrote:
>> Eric,
>>
>> This doesn't seem to be working right.  Here is an example of running dspam
>> on a known clean email in my inbox:
>>
>> 1) Initially, dspam incorrectly classifies the message as Spam even though
>> it delivered the email properly.
>>
>> dspam --user <username> --classify <
>> 1436977475.M667188P27913.www,S=22671,W=23095:2,S
>> X-DSPAM-Result: <username>; result="Spam"; class="Spam"; probability=1.0000;
>> confidence=1.00; signature=55a6894350061878812237
>>
>> 2) Then, I tell dspam to reclassify the same message as Innocent.
>>
>> dspam --user <username> --mode=teft --class=innocent --source=error <
>> 1436977475.M667188P27913.www,S=22671,W=23095:2,S
>>
>> 3) However, it still incorrectly classifies the message as Spam even after I
>> reclassify it as Innocent.
>>
>> dspam --user <username> --classify <
>> 1436977475.M667188P27913.www,S=22671,W=23095:2,S
>> X-DSPAM-Result: <username>; result="Spam"; class="Spam"; probability=1.0000;
>> confidence=1.00;  signature=55a6894350061878812237
>>
>> Am I missing something or interpreting this wrong?  I can't understand why
>> dspam continues to tag messages incorrectly.  How can I clean the dspam
>> database entirely and start over?  The man page for dspam_clean says that it
>> doesn't work for the hash storage driver and I can't find any clear
>> instructions.
>>
>> Also, you mention that you retrain messages from the SPAM folder.  Do you
>> use dovecot and have you tried the dovecot antispam plugin?  This is
>> supposed to automatically train dspam when users move email between their
>> SPAM folder and Inbox.  However, this doesn't seem to be working either.
>>
>>
>>
>> --
>> View this message in context: 
>> http://dspam-users.2290790.n4.nabble.com/dspam-not-training-tp4641961p4641963.html
>> Sent from the dspam users mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Don't Limit Your Business. Reach for the Cloud.
>> GigeNET's Cloud Solutions provide you with the tools and support that
>> you need to offload your IT needs and focus on growing your business.
>> Configured For All Businesses. Start Your Cloud Today.
>> https://www.gigenetcloud.com/
>> _______________________________________________
>> Dspam-user mailing list
>> Dspam-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspam-user
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Dspam-user mailing list
> Dspam-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspam-user


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Dspam-user mailing list
Dspam-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to