Bug#806717: kmail: Please do not fix headers of filtered multipart messages. It breaks PGP signatures.
Package: kmail
Version: 4:4.14.1-1
Severity: normal
Dear Maintainer,
I use bogofilter to filter spam and read multipart PGP signed emails with kmail.
The original email contains:
>Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
>X-Mailer: Apple Mail (2.2104)
>
>
>--Apple-Mail=_AC5EEF0D-BB41-44F0-A5BD-612244E530D3
>Content-Transfer-Encoding: 7bit
>Content-Type: text/plain;
> charset=us-ascii
>
>b
>
>--Apple-Mail=_AC5EEF0D-BB41-44F0-A5BD-612244E530D3
>Content-Transfer-Encoding: 7bit
>Content-Disposition: attachment;
> filename=signature.asc
But when the email is filtered though bogofilter, kmail changes it to:
>MIME-Version: 1.0
>X-Mailer: Apple Mail (2.2104)
>X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
>
>
>--Apple-Mail=_AC5EEF0D-BB41-44F0-A5BD-612244E530D3
>Content-Transfer-Encoding: 7bit
>Content-Type: text/plain; charset="us-ascii"
>
>b
>
>--Apple-Mail=_AC5EEF0D-BB41-44F0-A5BD-612244E530D3
>Content-Transfer-Encoding: 7bit
>Content-Disposition: attachment; filename="signature.asc"
>Content-Type: application/pgp-signature; name="signature.asc"
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.
-- System Information:
Debian Release: 8.2
APT prefers stable
APT policy: (990, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages kmail depends on:
ii kde-runtime 4:4.14.2-2
ii kdepim-runtime 4:4.14.2-3
ii kdepimlibs-kio-plugins 4:4.14.2-2+b1
ii libakonadi-calendar4 4:4.14.2-2+b1
ii libakonadi-contact4 4:4.14.2-2+b1
ii libakonadi-kde4 4:4.14.2-2+b1
ii libakonadi-kmime4 4:4.14.2-2+b1
ii libakonadiprotocolinternals1 1.13.0-2+deb8u1
ii libc6 2.19-18+deb8u1
ii libcalendarsupport4 4:4.14.1-1
ii libfollowupreminder4 4:4.14.1-1
ii libgcc1 1:4.9.2-10
ii libgpgme++2 4:4.14.2-2+b1
ii libgrantlee-core0 0.4.0-2
ii libincidenceeditorsng4 4:4.14.1-1
ii libkabc4 4:4.14.2-2+b1
ii libkalarmcal2 4:4.14.2-2+b1
ii libkcalcore4 4:4.14.2-2+b1
ii libkcalutils4 4:4.14.2-2+b1
ii libkcmutils4 4:4.14.2-5
ii libkdecore5 4:4.14.2-5
ii libkdepim4 4:4.14.1-1
ii libkdeui5 4:4.14.2-5
ii libkio5 4:4.14.2-5
ii libkleo4 4:4.14.1-1
ii libkmanagesieve4 4:4.14.1-1
ii libkmime4 4:4.14.2-2+b1
ii libknewstuff3-4 4:4.14.2-5
ii libknotifyconfig4 4:4.14.2-5
ii libkontactinterface4a 4:4.14.2-2+b1
ii libkparts4 4:4.14.2-5
ii libkpgp4 4:4.14.1-1
ii libkpimidentities4 4:4.14.2-2+b1
ii libkpimtextedit4 4:4.14.2-2+b1
ii libkpimutils4 4:4.14.2-2+b1
ii libkprintutils4 4:4.14.2-5
ii libksieveui4 4:4.14.1-1
ii libktnef4 4:4.14.2-2+b1
ii libmailcommon4 4:4.14.1-1
ii libmailimporter4 4:4.14.1-1
ii libmailtransport4 4:4.14.2-2+b1
ii libmessagecomposer4 4:4.14.1-1
ii libmessagecore4 4:4.14.1-1
ii libmessagelist4 4:4.14.1-1
ii libmessageviewer4 4:4.14.1-1
ii libpimcommon4 4:4.14.1-1
ii libqt4-dbus 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1
ii libqt4-network 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1
ii libqt4-xml 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1
ii libqtcore4 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1
ii libqtgui4 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1
ii libqtwebkit4 2.3.4.dfsg-3
ii libsendlater4 4:4.14.1-1
ii libsolid4 4:4.14.2-5
ii libstdc++6 4.9.2-10
ii libtemplateparser4 4:4.14.1-1
ii perl 5.20.2-3+deb8u1
Versions of packages kmail recommends:
ii gnupg-agent 2.0.26-6
ii gnupg2 2.0.26-6
ii pinentry-gtk2 [pinentry-x11] 0.8.3-2
Versions of packages kmail suggests:
ii bogofilter 1.2.4+dfsg1-3
pn clamav | f-prot-installer <none>
ii kaddressbook 4:4.14.1-1
pn kleopatra <none>
ii procmail 3.22-24
-- no debconf information
Reply to: