i set "mail_debug = yes" in dovecot.conf, restartet dovecot and tried to move a mail out of the spamfolder with thunderbird to trigger the retraining via the dovecot-module. this of course still didn't work. then i checked mail.err, mail.info, mail.warn, mail.log and dspam.debug but it didn't write more lines than before in the logs. more ideas ?
stefan
Peter Fern schrieb:
IIRC when you turn mail debugging on in dovecot the plugin should send the output of the dspam call to the maillog, should tell you what's wrong then...
Stefan Schmidt wrote:
hello,
i added the dovecot-dspam-plugin [1] to my dovecot-installation. when trying to move a mail out of or into the predefined spamfolder with thunderbird a messagebox shows : "dspam failed" and the message remains in its original position. i am using virtual mail users contained in a postgresql-database [2]. normal imap access and dspam training from the commandline works fine. a posting concerning probably the same issue has been posted on the dspam-mailinglist [3], but there haven't been any helpful replies so far. furthermore i suspect the plugin is missing the --user option when calling dspam, since this seems to be mandatory [4,5], but unfortunately adding this option in the plugin doesn't change its behavior. i am working on a debian system and currently using dovecot 1.0.beta3-3, dspam 3.6.4-2+b1 and the dspam-plugin "for dovecot beta 2 and 3".
- calling dspam from the commandline with the same parameters as in the (slightly modified) plugin works fine
:/# su virtual :/$ /usr/bin/dspam --user retrain --source=error --stdout --class=spam --signature=4,4434846e237406491211187 --debug
-> /var/log/dspam.debug
No QuarantineAgent option found. Using standard quarantine. DSPAM Instance Startup input args: /usr/bin/dspam --debug --user retrain --source=error --stdout --class=spam --signature=4,4434846e237406491211187 pass-thru args: processing user retrain uid = 0, euid = 0, gid = 0, egid = 101 loading preferences for user retrain Loading preferences for uid 7 Loading preferences for uid 0 Loading preferences for uid 0 default preferences empty. reverting to dspam.conf preferences. Loading preferences from dspam.conf using /var/spool/dspam/opt-in/local/retrain.dspam as path using /var/spool/dspam/opt-out/local/retrain.nodspam as path sedation level set to: 0 loading preferences for user some_virtual_account@mydomain.com Loading preferences for uid 4 Loading preferences for uid 0 Loading preferences for uid 0 default preferences empty. reverting to dspam.conf preferences. Loading preferences from dspam.conf processing signature. length: 1344 reversing 112 tokens Control: [10 10] [11 9] Delta: [1 -1] reclassifying iteration 1 result: 0 libdspam returned probability of 1.000000 message result: SPAM DSPAM Instance Shutdown. Exit Code: 0
- when dspam is called via the (slightly modified) dovecot-dspam-plugin it aborts (the unmodified version aborts the same way)
-> /var/log/mail.err
dovecot: imap-login: Login: user=someuser@mydomain.com, method=plain, rip=123.123.123.123, lip=123.123.123.123 imap: /usr/bin/dspam --user retrain --source=error --stdout --class=spam --signature=4,4434846e237406491211187 dspam[25157]: Unable to determine the destination user dspam[25157]: DSPAM agent misconfigured: aborting
-> /etc/dspam/dspam.conf [extract]
Home /var/spool/dspam StorageDriver /usr/lib/dspam/libpgsql_drv.so TrustedDeliveryAgent "/usr/bin/procmail" OnFail error Trust root Trust dspam Trust mail Trust mailnull Trust smmsp Trust daemon Trust virtual TrainingMode teft TestConditionalTraining on Feature chained Feature whitelist Algorithm graham burton PValue graham Preference "spamAction=deliver" Preference "signatureLocation=headers" AllowOverride trainingMode AllowOverride spamAction spamSubject AllowOverride statisticalSedation AllowOverride enableBNR AllowOverride enableWhitelist AllowOverride signatureLocation AllowOverride showFactors AllowOverride optIn optOut AllowOverride whitelistThreshold HashRecMax 98317 HashAutoExtend on HashMaxExtents 0 HashExtentSize 49157 HashMaxSeek 100 HashConnectionCache 10 Notifications off PurgeSignatures 14 PurgeNeutral 90 PurgeUnused 90 PurgeHapaxes 30 PurgeHits1S 15 PurgeHits1I 15 LocalMX 127.0.0.1 SystemLog on UserLog on Opt out ProcessorBias on Include /etc/dspam/dspam.d/
-> /etc/dspam/dspam.d/pgsql.conf [extract]
PgSQLServer 127.0.0.1 PgSQLPort 5432 PgSQLUser dspam PgSQLPass mypassword PgSQLDb libdspam7drvpgsql PgSQLVirtualTable dspam_virtual_uids PgSQLVirtualUIDField uid PgSQLVirtualUsernameField username
-> dspam-headers from samples message
X-DSPAM-Result: Innocent X-DSPAM-Processed: Thu Apr 6 03:32:07 2006 X-DSPAM-Confidence: 0.7524 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 44346f97188755315134984
ciao, stefan
[1] http://johannes.sipsolutions.net/Projects/dovecot-dspam-integration [2] http://www.gjdv.at/snippets/linux/virtual_mail_hosting [3] http://www.nuclearelephant.com/projects/dspam/dspam-users/2872.html [4] http://www.nuclearelephant.com/projects/dspam/dspam-users/2852.html [5] http://www.nuclearelephant.com/projects/dspam/dspam-users/2850.html