Bug 345005 - Filters do not work on the body of the message if the message is in base64
Summary: Filters do not work on the body of the message if the message is in base64
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Filter Agent (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 10:42 UTC by Constantine
Modified: 2022-11-29 05:17 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
email with the Base64 encoded text: "The file 4207_66496070.zip has been infected with the virus JS/Nemucod.SMK9!tr, and has been removed." (3.94 KB, application/mbox)
2016-09-21 09:59 UTC, Marco Gamberoni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Constantine 2015-03-10 10:42:52 UTC
Filters do not work on the body of the message if the message is in base64.


Reproducible: Always

Steps to Reproduce:
1. Create filter (Body messages)
2. 
3.

Actual Results:  
Not work filters
Comment 1 Laurent Montel 2015-04-03 05:33:20 UTC
Could you give me an exemple ?
Attach a email as mbox here.
Give exact filter that you used please.
Comment 2 graham 2016-01-28 18:09:30 UTC
I'm able to replicate this easily.  Most common message that _doesn't_ filter properly for me and which has a Base64 encoded body, are PayPal payment notifications.

They used to arrive with:
  Content-Transfer-Encoding: quoted-printable
  Content-Type; text/plain; charset="windows-1252"

and those ones would filter just fine.

The new ones now arrive with:
  Content-Transfer-Encoding: base64
  Content-Type: text/plain; charset=UTF-8

and do *not* match at all with the "Body of Message" filtering rule.

My first guess would be that its trying to match/filter based on the raw message body, instead of the decoded message body.
Comment 3 graham 2016-01-28 18:10:55 UTC
Bug 311633 sounds similar to this, if not a duplicate.
Comment 4 Marco Gamberoni 2016-09-21 09:59:27 UTC
Created attachment 101206 [details]
email with the Base64 encoded text: "The file 4207_66496070.zip has been infected with the virus JS/Nemucod.SMK9!tr, and has been removed."

Attaching an example email where a filter intendet to move to Spam if body contains "Nemucod" fails.
This is the filter definition copied from .config/akonadi_mailfilter_agentrc):
[Filter #0]
Applicability=2
AutomaticName=true
ConfigureShortcut=true
ConfigureToolbar=false
Enabled=true
StopProcessingHere=true
ToolbarName=<<body>>: Nemucod
accounts-set=akonadi_imap_resource_0
action-args-0=224
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=Nemucod
fieldA=<body>
funcA=contains
identifier=CBlqQTvFEp7ZHSUb
name=<<body>>: Nemucod
operator=and
rules=1

This is from the filter log viewer:
[11:41:08] Esecuzione regole di filtro: (verifica tutti i criteri seguenti) "<body>" <contains> "Nemucod"
[11:41:08] 0 = "<body>" <contains> "Nemucod"
Comment 5 Justin Zobel 2022-10-30 00:37:51 UTC
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 "REPORTED" when replying. Thank you!
Comment 6 Bug Janitor Service 2022-11-14 05:14:42 UTC
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 > 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!
Comment 7 Bug Janitor Service 2022-11-29 05:17:54 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > 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!