spamd throws error
-
Hi!
My kopano shall be updated and I want to use kopano-spamd for training.
In my kopano-test-system I upgraded in the last weeks to several nightly builds but I always get the same errors in the logfile and no mails are written to the appropriate directorys. The system runs with a “up-to-date” Ubuntu 16.04 and the last spamd I used was in core-8.6.80.1350_0+212-Ubuntu_16.04-amd64.
The logfile shows: (first test move from spam to inbox, second move from inbox to spam);2018-08-05 14:22:43,727 - spamd - ERROR - could not process change for entryid 00000000A3F4802403064977A3B381C38531666B010000000500000041761C035E3E45D0AA94A98B1D220C0700000000 ([SPropValue(0x67110003, 1526903), SPropValue(0x6715000A, 2147746063), SPropValue(0x0FFA0102, b'\xa3\xf4\x80$\x03\x06Iw\xa3\xb3\x81\xc3\x851fk')]): 2018-08-05 14:22:43,747 - spamd - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/ics.py", line 118, in ImportMessageChange self.importer.update(item, flags) File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 79, in update self.learnham and self.was_spam(searchkey): File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 60, in was_spam return searchkey in db File "/usr/lib/python3.5/_collections_abc.py", line 601, in __contains__ self[key] File "/usr/lib/python3/dist-packages/bsddb3/__init__.py", line 239, in __getitem__ return _DeadlockWrap(lambda: self.db[key]) # self.db[key] File "/usr/lib/python3/dist-packages/bsddb3/dbutils.py", line 67, in DeadlockWrap return function(*_args, **_kwargs) File "/usr/lib/python3/dist-packages/bsddb3/__init__.py", line 239, in <lambda> return _DeadlockWrap(lambda: self.db[key]) # self.db[key] TypeError: Bytes or Integer object expected for key, str found 2018-08-05 14:22:48,835 - spamd - ERROR - could not process change for entryid 00000000A3F4802403064977A3B381C38531666B0100000005000000F2659AF7E39D49D9B6946A41602DFADF00000000 ([SPropValue(0x67110003, 1526937), SPropValue(0x67150003, 1327515), SPropValue(0x0FFA0102, b'\xa3\xf4\x80$\x03\x06Iw\xa3\xb3\x81\xc3\x851fk')]): 2018-08-05 14:22:48,835 - spamd - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/ics.py", line 118, in ImportMessageChange self.importer.update(item, flags) File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 69, in update item.header(self.headertag).upper() != 'YES': AttributeError: 'NoneType' object has no attribute 'upper'
Does anybody can give me a hint?
Beside this problem I really love kopano, all my family and some friends are using it without complaints (and in Germany this is the best you can get ;-) ).
Kind regards,
Christian -
Hi,
the kopano-spamd only works, when the X-Spam-Flag is found in the header.
As I am using amavisd to filter our mails, I just edited the amavisd.conf like that:
$sa_tag_level_deflt = -9999;
So all mail are getting this flag even if thir spam score is negative.
Regards
Vogi -
Hi Vogi!
Thanks for the quick reply, but even if I move a mail from spam to ham which has the following tags in the mail:X-Virus-Scanned: Debian amavisd-new at …
X-Spam-Flag: YES
X-Spam-Score: 10.416
X-Spam-Level: **********
X-Spam-Status: Yes, score=10.416 tagged_above=-100 required=5
tests=[BAYES_99=3.5, BAYES_999=0.2, FUZZY_ERECT=1.859,
HTML_IMAGE_ONLY_04=1.172, HTML_MESSAGE=0.001,
HTML_SHORT_LINK_IMG_1=0.001, MAILING_LIST_MULTI=-1,
MPART_ALT_DIFF=0.79, PYZOR_CHECK=1.392, SPF_PASS=-0.001,
TVD_SPACE_RATIO=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_SPAM=2.5]
autolearn=no autolearn_force=no
Received: from …I get the same error like in the first part in my first posting.
Kind regards
Christian -
Hi tueftler!
I updated to core-8.6.82.0_0+105-Debian_9.0-amd64 now and I´m still facing the same problem. I only get the first of the two exceptions present in the log of the first post.
X-Spam-Flag is present in the email in question.Will there ever be a fix for this? kopano-spamd ist non-functional for me since 6 months now…
Best regards,
Chris -
Hi @weini ,
This post solves that exception:
https://forum.kopano.io/topic/1457/kopano-spamd-8-6-2-is-broken/8#Regards,
Nuno -
please see the other post for updates.