Jeff,

I was looking into this issue and not one of my Dspam implementations
successfully retrained with the command in the format you've presented,
although I got no errors However, I had a look at this
(http://comments.gmane.org/gmane.mail.spam.dspam.user/18277) site and
one of the maintainers of Dspam, Stevan Bajić,
<http://search.gmane.org/?author=Stevan+Baji%C4%87&sort=date> used the
command in the following way:

dspamc --class=innocent --source=error --user [email protected]
--signature=1,4fa1797980871776116685

Using the command in this way, I was successful in training dspam on
several message. You should see something like the following entry (with
a your unique signature number) in the dspam user's log
(/var/lib/dspam/data/u/s/[email protected]/[email protected]):

1423982264 F <None Specified>   1,4fa1797980871776116685   <None
Specified>   Retrained

Eric


On 2/14/2015 5:22 PM, Jeff Kletsky wrote:
> First, some thanks to those that have already posted and given me some 
> insights along the way in getting
>
> * dovecot2-2.2.15_3              Secure, fast and powerful IMAP and POP3 
> server
> * postfix-2.11.3_4,1             Secure alternative to widely-used Sendmail
> * dspam-3.10.2                   Bayesian spam filter
> * mysql56-server-5.6.22          Multithreaded SQL database (server)
>
> up and running (mainly) together, jailed on FreeBSD 9.3
>
> I've got postfix after-queue filtering the mail through dspam as per the 
> "advanced " described at http://www.postfix.org/FILTER_README.html.
>
> The mail, both innocent and spam, is successfully delivered through 
> procmail to Maildir and is managed through Dovecot.
>
> As I have multiple aliases that all get delivered to the same system 
> user, I have configured a MySQL back-end with the addition of the 
> virtual_users.sql schema for dsmap_virtual_uids (the one that has the 
> uid generated through auto_increment). This has been enabled in 
> dspam.conf. (Yes, better error messages than "received invalid result 
> (!DSR_ISSPAM && !DSR_ISINNOCENT): -2" would have been helpful.)
>
>
>
> I am stumped as to how to debug further though, as when I try to train 
> dspam:
>
> root@mail:/ # dspam --source=error 
> --signature=10,54df1c80752941515871655 --class=spam --debug
> (or)
> root@mail:/ # dspamc --source=error 
> --signature=10,54df1c80752941515871655 --class=spam --debug
>
> I get
>
> Feb 14 08:01:58 mail dspam[53601]: Unable to determine the destination user
> Feb 14 08:01:58 mail dspam[53601]: DSPAM agent misconfigured: aborting
>
> There aren't any additional clues that I can see in maillog or in 
> dspam.debug
>
>
> The signature pretty clearly exists in the database, as does the 
> associated UID
>
>
> mysql> SELECT uid, signature, length, created_on FROM 
> dspam_signature_data WHERE signature='10,54df1c80752941515871655' ;
> +-----+----------------------------+--------+------------+
> | uid | signature                  | length | created_on |
> +-----+----------------------------+--------+------------+
> |  10 | 10,54df1c80752941515871655 |  37216 | 2015-02-14 |
> +-----+----------------------------+--------+------------+
> 1 row in set (0.00 sec)
>
> mysql> SELECT * FROM dspam_virtual_uids WHERE uid='10' ;
> +-----+--------------------+
> | uid | username           |
> +-----+--------------------+
> |  10 | [email protected] |
> +-----+--------------------+
> 1 row in set (0.00 sec)
>
>
> (That email address is from before the days of spam, so it already gets 
> hit pretty hard, and I'm not "exposing" it any more here).
>
> Other signatures for other uids behave the same way.
>
>
>
> Any suggestions on where to explore from here to resolve this?
>
> Thanks,
>
> Jeff
>
>
> (Needless to say, I'm rapidly building up a lot of spam I can use for 
> training!)
>
>
>
>
> root@mail:/ # dspam --version
>
> DSPAM Anti-Spam Suite 3.10.2 (agent/library)
>
> Copyright (C) 2002-2012 DSPAM Project
> http://dspam.sourceforge.net.
>
> DSPAM may be copied only under the terms of the GNU Affero General Public
> License, a copy of which can be found with the DSPAM distribution kit.
>
> Configuration parameters:  '--sysconfdir=/usr/local/etc' 
> '--with-logdir=/var/log/dspam' '--with-dspam-home=/var/db/dspam' 
> '--with-dspam-home-owner=root' '--with-dspam-home-group=mail' 
> '--with-dspam-home-mode=0770' '--with-dspam-owner=root' 
> '--with-dspam-group=mail' '--enable-syslog' '--enable-debug' 
> '--enable-daemon' '--enable-clamav' 
> '--with-sqlite-includes=/usr/local/include' 
> '--with-sqlite-libraries=/usr/local/lib' 
> '--with-mysql-includes=/usr/local/include/mysql' 
> '--with-mysql-libraries=/usr/local/lib/mysql' 
> '--enable-client-compression' 
> '--with-storage-driver=sqlite3_drv,hash_drv,mysql_drv' 
> '--enable-virtual-users' '--with-dspam-mode=4510' '--prefix=/usr/local' 
> '--mandir=/usr/local/man' '--infodir=/usr/local/info/' 
> '--build=amd64-portbld-freebsd9.2' 
> 'build_alias=amd64-portbld-freebsd9.2' 'CC=cc' 'CFLAGS=-pipe -g 
> -fstack-protector -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib 
> -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include' 'CPP=cpp'
>
>
>
>
> root@mail:/ # egrep -v '^#' /usr/local/etc/postfix/master.cf | egrep '^.+$'
> smtp      inet  n       -       n       -       -       smtpd
>     -o content_filter=lmtp:unix:dspam/dspam.sock
>     -o receive_override_options=no_address_mappings
> localhost:24 inet  n    -       n       -       10      smtpd
>    -o syslog_name=postfix/reinject
>    -o content_filter=
>    -o 
> receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
>    -o smtpd_helo_restrictions=
>    -o smtpd_client_restrictions=
>    -o smtpd_sender_restrictions=
>    # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
>    -o smtpd_relay_restrictions=
>    -o smtpd_recipient_restrictions=permit_mynetworks,reject
>    -o mynetworks=127.0.0.0/8
>    -o smtpd_authorized_xforward_hosts=127.0.0.0/8
> [...]
>
>
>
> root@mail:/ # egrep -v '^#' /usr/local/etc/dspam.conf | egrep '^.+$'
> Home /var/db/dspam
> StorageDriver /usr/local/lib/dspam/libmysql_drv.so
> DeliveryHost        127.0.0.1
> DeliveryPort        24
> DeliveryIdent        localhost
> DeliveryProto        SMTP
> OnFail error
> Trust root
> Trust dspam
> TrainingMode teft
> TestConditionalTraining on
> Feature whitelist
> Feature tb=5
> Algorithm graham burton
> Tokenizer osb
> PValue bcr
> WebStats on
> Preference "trainingMode=TEFT"        # { TOE | TUM | TEFT | NOTRAIN } 
> -> default:teft
> Preference "spamAction=tag"        # { quarantine | tag | deliver } -> 
> default:quarantine
> Preference "spamSubject=[SPAM]"        # { string } -> default:[SPAM]
> Preference "statisticalSedation=5"    # { 0 - 10 } -> default:0
> Preference "enableBNR=on"        # { on | off } -> default:off
> Preference "enableWhitelist=on"        # { on | off } -> default:on
> Preference "signatureLocation=headers"    # { message | headers } -> 
> default:message
> Preference "tagSpam=off"        # { on | off }
> Preference "tagNonspam=off"        # { on | off }
> Preference "showFactors=off"        # { on | off } -> default:off
> Preference "optIn=off"            # { on | off }
> Preference "optOut=off"            # { on | off }
> Preference "whitelistThreshold=10"    # { Integer } -> default:10
> Preference "makeCorpus=off"        # { on | off } -> default:off
> Preference "storeFragments=off"        # { on | off } -> default:off
> Preference "localStore="        # { on | off } -> default:username
> Preference "processorBias=on"        # { on | off } -> default:on
> Preference "fallbackDomain=off"        # { on | off } -> default:off
> Preference "trainPristine=off"        # { on | off } -> default:off
> Preference "optOutClamAV=off"        # { on | off } -> default:off
> Preference "ignoreRBLLookups=off"    # { on | off } -> default:off
> Preference "RBLInoculate=off"        # { on | off } -> default:off
> Preference "notifications=off"        # { on | off } -> default:off
> AllowOverride enableBNR
> AllowOverride enableWhitelist
> AllowOverride fallbackDomain
> AllowOverride ignoreGroups
> AllowOverride ignoreRBLLookups
> AllowOverride localStore
> AllowOverride makeCorpus
> AllowOverride optIn
> AllowOverride optOut
> AllowOverride optOutClamAV
> AllowOverride processorBias
> AllowOverride RBLInoculate
> AllowOverride showFactors
> AllowOverride signatureLocation
> AllowOverride spamAction
> AllowOverride spamSubject
> AllowOverride statisticalSedation
> AllowOverride storeFragments
> AllowOverride tagNonspam
> AllowOverride tagSpam
> AllowOverride trainPristine
> AllowOverride trainingMode
> AllowOverride whitelistThreshold
> AllowOverride dailyQuarantineSummary
> AllowOverride notifications
> MySQLServer        /tmp/mysql.sock
> MySQLUser        dspam
> MySQLPass        <redacted>
> MySQLDb            dspam
> MySQLCompress        true
> MySQLReconnect        true
> MySQLConnectionCache    10
> MySQLVirtualTable        dspam_virtual_uids
> MySQLVirtualUIDField        uid
> MySQLVirtualUsernameField    username
> MySQLUIDInSignature    on
> HashRecMax        98317
> HashAutoExtend        on
> HashMaxExtents        0
> HashExtentSize        49157
> HashPctIncrease        10
> HashMaxSeek        10
> HashConnectionCache    10
> Notifications    off
> PurgeSignatures 14    # Stale signatures
> PurgeNeutral    90    # Tokens with neutralish probabilities
> PurgeUnused    90    # Unused tokens
> PurgeHapaxes    30    # Tokens with less than 5 hits (hapaxes)
> PurgeHits1S    15    # Tokens with only 1 spam hit
> PurgeHits1I    15    # Tokens with only 1 innocent hit
> LocalMX 127.0.0.1
> LocalMX 192.168.6.126
> SystemLog    on
> UserLog        on
> Opt out
> ServerMode auto  # see postfix.txt
> ServerParameters    "--deliver=innocent,spam"
> ServerDomainSocketPath    "/var/spool/postfix/dspam/dspam.sock"
> ProcessorURLContext on
> ProcessorBias on
> StripRcptDomain off
> GroupConfig /var/db/dspam/group
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Dspam-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspam-user

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Dspam-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to