<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>358041</bug_id>
          
          <creation_ts>2016-01-15 19:39:57 +0000</creation_ts>
          <short_desc>spamassassin filter deletes every incoming mail</short_desc>
          <delta_ts>2022-11-18 05:17:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kmail2</product>
          <component>general</component>
          <version>5.1</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Tom Mittelstädt">tom-kde.bugs</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1569871</commentid>
    <comment_count>0</comment_count>
    <who name="Tom Mittelstädt">tom-kde.bugs</who>
    <bug_when>2016-01-15 19:39:57 +0000</bug_when>
    <thetext>From time to time, the generated spamassassin filter rules deletes every incoming mail.

The filter log says (localized in german. if you could provide me information how to get the english output i&apos;ll post it):
[19:49:29] Filterung beginnt bei Nachricht „Re: xxx“ von „xxx “ um „Freitag, 15. Januar 2016 19:45:47 UTC+01:00“ :
[19:49:29] Filterregeln werden geprüft: (auf alle Nachrichten zutreffen) &quot;&lt;size&gt;&quot; &lt;greater&gt; &quot;0&quot;
[19:49:29] Filterregeln wurden angewandt.
[19:49:29] Filteraktion anwenden: Durch Programm leiten &quot;spamassassin -L&quot;
[19:49:31] Filterregeln werden geprüft: (alle folgenden Bedingungen müssen zutreffen) &quot;X-Spam-Flag&quot; &lt;equals&gt; &quot;YES&quot;
[19:49:31] 1 = &quot;X-Spam-Flag&quot; &lt;equals&gt; &quot;YES&quot; (YES)
[19:49:31] Filterregeln wurden angewandt.
[19:49:31] Filteraktion anwenden: In Ordner verschieben &quot;Lokale Ordner/Papierkorb&quot;
[19:49:31] Filteraktion anwenden: Markieren als &quot;Gelesen&quot;

The problem: [19:49:31] 1 = &quot;X-Spam-Flag&quot; &lt;equals&gt; &quot;YES&quot; (YES)

However, *there is no X-Spam-Flag header the mail*. It seems as if the mail has not been touched by spamassassin at all.

If I send the mail manually through spamassassin it is recognized as ham.

The problem started with KF5.

Reproducible: Sometimes

Steps to Reproduce:
receive emails. from time to time emails are apperently not processed by spamassassin, but marked as spam.

Actual Results:  
the mail is marked as spam

Expected Results:  
processing by spamassassin and correct header-filter-result behaviour.

I&apos;ve lost emails (and was asked why I did not respond), so I set the severity to critical.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571026</commentid>
    <comment_count>1</comment_count>
    <who name="Tom Mittelstädt">tom-kde.bugs</who>
    <bug_when>2016-01-21 08:51:39 +0000</bug_when>
    <thetext>I changed the spamassassin ruleset to use &quot;spamc&quot; together with the daemonized version of spamassassin. What a performance boost! The time to scan one mail decreased from &gt;10s to &lt;1s.
Maybe this fixes the problem, too, that mails are not processed at all (maybe because of a timeout?)

However, kmail should not sort out mails where no spamassassin header is set at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571465</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Mittelstädt">tom-kde.bugs</who>
    <bug_when>2016-01-23 09:05:32 +0000</bug_when>
    <thetext>The problem is still present, however now there a logs.

Fri Jan 22 17:38:42 2016 [1168] info: spamd: connection from ip6-localhost [::1]:39820 to port 783, fd 5
Fri Jan 22 17:38:43 2016 [1168] info: spamd: creating default_prefs: /home/monster/.spamassassin/user_prefs
Fri Jan 22 17:38:43 2016 [1168] info: spamd: failed to create readable default_prefs: /home/monster/.spamassassin/user_prefs
Fri Jan 22 17:38:43 2016 [1168] info: spamd: processing message (unknown) for monster:888
Fri Jan 22 17:38:43 2016 [1168] info: spamd: identified spam (7.9/5.0) for monster:888 in 0.3 seconds, 1 bytes.
Fri Jan 22 17:38:43 2016 [1168] info: spamd: result: Y 7 - EMPTY_MESSAGE,MISSING_DATE,MISSING_FROM,MISSING_HEADERS,MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE,NO_RECEIVED,NO_RELAYS scantime=0.3,size=1,user=monster,uid=888,required_score=5.0,rhost=ip6-localhost,raddr=::1,rport=39820,mid=(unknown),autolearn=no autolearn_force=no
Fri Jan 22 17:38:43 2016 [987] info: prefork: child states: II</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571473</commentid>
    <comment_count>3</comment_count>
    <who name="Tom Mittelstädt">tom-kde.bugs</who>
    <bug_when>2016-01-23 09:27:22 +0000</bug_when>
    <thetext>To sum up kmails behavior:

- There is an incoming email (OK)
- kmail sends it through spamassassin/spamc (OK)
- spamassassin&apos;s own log says:
EMPTY_MESSAGE,MISSING_DATE,MISSING_FROM,MISSING_HEADERS,MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE,NO_RECEIVED,NO_RELAYS 
- kmail detects the spam flag in spamassassin&apos;s report (OK)
- kmail moves the email eg to trash. (OK)

The problem:

- The incoming mail was not empty. It is a normal email.
- Obviously kmail sends an empty file through spamassassin/spamc.
- The empty file is recognized as spam.
- Spamassassin generates its report, and kmail uses that X-Spam-Flag header for further filtering.

Interesting fact: The mail is not replaced with spamassassins report. It stays untouched, but is moved to trash.

So it seems as if the &quot;pipe this email through a program&quot; filter does not work reliably.
Maybe a race condition?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571478</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Mittelstädt">tom-kde.bugs</who>
    <bug_when>2016-01-23 09:41:06 +0000</bug_when>
    <thetext>maybe related: https://bugs.kde.org/show_bug.cgi?id=255388</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2163256</commentid>
    <comment_count>5</comment_count>
    <who name="Justin Zobel">justin.zobel</who>
    <bug_when>2022-10-19 22:11:05 +0000</bug_when>
    <thetext>Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to &quot;CONFIRMED&quot; when replying. Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168294</commentid>
    <comment_count>6</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-11-03 05:07:12 +0000</bug_when>
    <thetext>Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED &gt; WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174768</commentid>
    <comment_count>7</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-11-18 05:17:27 +0000</bug_when>
    <thetext>This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED &gt; WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>