#806717 kmail: Please do not fix headers of filtered multipart messages. It breaks PGP signatures.

Package:
kmail
Source:
kmail
Description:
full featured graphical email client
Submitter:
Mikko Tuumanen
Date:
2015-11-30 13:09:10 UTC
Severity:
normal
#806717#5
Date:
2015-11-30 12:32:51 UTC
From:
To:
Dear Maintainer,

I use bogofilter to filter spam and read multipart PGP signed emails with kmail.

The original email contains:

But when the email is filtered though bogofilter, kmail changes it to:

RFC 3156 says that headers (in this case content-trasfer-encoding and
content-type) are also signed. Kmail changes the signed part of the
email and of course then complains that the signature is invalid.

It seems that kmail only changes the headers if the messages is
is filtered. In my case Settings -> Configure Filters -> Bogofilter Check
shows that messages are filtered through "bogofilter -p -e". Bogofilter is not
the problem here. The headers are changed when kmail reads the message back.
This can be verified by replacing the bogofilter command with a shell script
that saves original and bogofiltered copies to files before giving the
result back to kmail.

#806717#10
Date:
2015-11-30 13:04:28 UTC
From:
To:
A workaround for pgp signed messages in the bogofilter case:

Settings -> Configure Filters -> Bogofilter Check -> Add Anywhere in
Headers, does not contain, application/pgp-signature

This way signed messaged are not filtered and not broken.