Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Claws is stuck sending messages to spamassassin
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
bluenuht
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2005
Posts: 126

PostPosted: Tue Dec 26, 2017 10:42 pm    Post subject: [SOLVED] Claws is stuck sending messages to spamassassin Reply with quote

Every time I "get mail" in Claws the status bar shows filtering to spamassassin for 7-8 minutes. But then I get any new mails correctly.

To try and narrow down the problem I ran
Code:
egrep "@" /var/log/messages | egrep -o "spamd:.+$" | sort | uniq -c | sort -n
which showed it was the same messages each time. 198 of them Then checked the POP3 mailbox that my mail is picked up from, but there were no messages with those email addresses.

Enabled "Show receive dialogue" and Claws clearly says "no new messages" but the status line reads "Spamassassin Filtering message n/198" where n = 0-198.

When there are new messages Claws returns almost immediately correctly reporting the number of new "real" messages and then the "Spamassassin Filtering message n/N" where N = 198+new.

/var/log/messages spamd entries for these 198 all appear to have spammy email domains.
e.g.

Code:
Dec 26 22:33:12 MACHINE spamd[22749]: prefork: child states: II
Dec 26 22:33:13 MACHINE spamd[24297]: spamd: connection from localhost [127.0.0.1]:56708 to port 783, fd 6
Dec 26 22:33:13 MACHINE spamd[24297]: spamd: setuid to MYUSER succeeded
Dec 26 22:33:13 MACHINE spamd[24297]: spamd: checking message <c332257553e5d5f138a77a9e350c908b@alrowadms.com> for MYUSER:1000
Dec 26 22:33:14 MACHINE spamd[24297]: spamd: clean message (4.6/5.0) for MYUSER:1000 in 0.4 seconds, 4651 bytes.
Dec 26 22:33:14 MACHINE spamd[24297]: spamd: result: . 4 - BAYES_99,BAYES_999,DKIM_SIGNED,HELO_MISC_IP,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RDNS_NONE,T_DKIM_INVALID scantime=0.4,size=4651,user=MYUSER,uid=1000,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=56708,mid=<c332257553e5d5f138a77a9e350c908b@alrowadms.com>,bayes=0.999765,autolearn=no autolearn_force=no
Dec 26 22:33:14 MACHINE spamd[22749]: prefork: child states: II
Dec 26 22:33:15 MACHINE spamd[24297]: spamd: connection from localhost [127.0.0.1]:56710 to port 783, fd 6
Dec 26 22:33:15 MACHINE spamd[24297]: spamd: setuid to MYUSER succeeded
Dec 26 22:33:15 MACHINE spamd[24297]: spamd: checking message <c10e2276c9c00d28d61220e031890465@bricksitalia.com> for MYUSER:1000
Dec 26 22:33:16 MACHINE spamd[24297]: spamd: clean message (4.5/5.0) for MYUSER:1000 in 1.2 seconds, 3142 bytes.
Dec 26 22:33:16 MACHINE spamd[24297]: spamd: result: . 4 - BAYES_99,BAYES_999,HELO_MISC_IP,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RDNS_NONE scantime=1.2,size=3142,user=MYUSER,uid=1000,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=56710,mid=<c10e2276c9c00d28d61220e031890465@bricksitalia.com>,bayes=1.000000,autolearn=no autolearn_force=no


Found a error in syslog "Dec 26 21:09:13 MACHINE spamd[22192]: spamd: failed to create readable default_prefs: /home/MYUSER/.spamassassin/user_prefs"
That I was able to fix by editing /etc/conf.d/spamd and setting SPAMD_RUN_AS_ROOT=true. That fixed that error but the behaviour continues. As part of that issue I also deleted the /home/MYUSER/.spamassassin/user_prefs file, it has been automatically recreated.


So, on each collection of mail, Claws appears to only get new messages and invokes spamassassin but for some reason spamassassin tries to process 198 "other" messages.

Where are these messages and how can I stop spamassassin processing them.
_________________
Linux 4.12.12-gentoo #1 SMP Mon Nov 13 22:11:31 GMT 2017 x86_64 AMD Phenom(tm) II X4 850 Processor AuthenticAMD GNU/Linux - Sapphire ATI Radeon HD 6450 - 8G DDR3
Pay for Free Open source Software


Last edited by bluenuht on Wed Dec 27, 2017 9:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
bluenuht
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2005
Posts: 126

PostPosted: Wed Dec 27, 2017 9:55 pm    Post subject: Reply with quote

And then things turn nasty.

I shut down claws and when I reopened it the same sequence of events started to take place and then it crashed ...

Code:
suspecting a corrupt file in UTF8 conversion


running in debug mode

Code:
claws-mail --debug


Code:
spamassassin.c:214:Filtering message 3566
procheader.c:155:generic_get_one_field: empty line
procheader.c:155:generic_get_one_field: empty line
procheader.c:155:generic_get_one_field: empty line
tnef_parse.c:295:Tnef parser parsing part (42094).
tnef_parse.c:297:content: /home/MYUSER/.claws-mail/mimetmp/claws.5BDZBZ
Attempting to parse /home/MYUSER/.claws-mail/mimetmp/claws.5BDZBZ...
suspecting a corrupt file in UTF8 conversion


Tried removing the claws.5BDZBZ file but on the next run it was recreated with a different name.

Found a single mention of the same issue [url]https://groups.google.com/forum/#!topic/linux.debian.bugs.dist/rp-XIynhoMU[/url] which led me to re-emerge ytnef. Which was pointless because the ytnef claws-mail uses is built in.

But I found if I started claws-mail in offline mode and then disabled the tnef plugin I could then restart in online mode and not crash out.

Code:
claws-mail --offline


Now I knew what folders to look in I started poking around for the 198 messages.
Code:

/home/MYUSER/.claws-mail/tempfolder/processing-1

Contains 201 files, of which 3 were not email messages, BINGO 198. The date range was surprising

2016-11-04 21:11:15 - 2017-02-24 06:00:00

I knew this issue had been going on a while, but as I always ended up with my emails, I just got used to doing something else while waiting.

So I renamed the /home/MYUSER/.claws-mail/tempfolder/processing-1

claws recreated the folder and ... IT WORKED!


Re-enabled the "tnef" plugin and it continued to work.

I had a look in the renamed processing folder and found each message was indeed spam and curiously they were all to a single email address. Which is odd because I get emails from all sorts of addresses forwarded to this mailbox.

Would be interested in any comments of what went wrong and why those messages got stuck in that folder and why tnef started to crash claws.
_________________
Linux 4.12.12-gentoo #1 SMP Mon Nov 13 22:11:31 GMT 2017 x86_64 AMD Phenom(tm) II X4 850 Processor AuthenticAMD GNU/Linux - Sapphire ATI Radeon HD 6450 - 8G DDR3
Pay for Free Open source Software
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum