-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mutt/neomutt: work around S/MIME issues with application/pgp-encrypted
#50927
Conversation
cc @flokli |
@c0bw3b I figured that, but I orignally thought that it would be best to use the default MIME database distributed with the package. I'll have a deeper look at |
e4bde7e
to
6fc611b
Compare
@c0bw3b I updated the |
No problem. Actually your PR made me wonder where Nixpkgs/NixOS was sourcing its /etc/mime.types and look at other distros. FWIW Arch seem to use On a side note: Debian sources moved to their GitLab on https://salsa.debian.org |
6fc611b
to
8d101a4
Compare
@c0bw3b thanks for the note, I updated the PR accordingly. (I've seen salsa before, but I wasn't sure if this applies for all of their packages ^^) |
The original issue can be reproduced when sending with an unpatched `mutt` or `neomutt` an email with an attachement which as han `.asc` extension. This will be interpreted as `application/pgp-encrypted` which experiences special logic, in the end the attachement will contain "Version: 1"[1][2][3] Right now, there are the following issues in the {,neo}mutt packages: * `mutt.override { smimeSupport = true }` fails to build since the Debian patch results in a 404. Debian moved their packages to `salsa.debian.org`. However we can't use a versioned URL for this as Debian only tracks the Mutt versions that are available in their releases. The patch doesn't touch Mutt's core and is therefore simple to rebase, so sticking to the 1.10.2 patch for now should be sufficient. * The original issue was never fixed in NeoMutt, currently we use the S/MIME database from `pkgs.mime-types` which contains the issue with `application/pgp-encrypted` as well. After some discussion[4] it seems to be the best decision to use the `mailcap` database distributed by Fedora[5] which fixes the issue rather than `mime-types` v9 from 2012. [1] https://bugs.archlinux.org/task/43319 [2] https://bugs.gentoo.org/534658 [3] https://github.com/neomutt/neomutt/blob/neomutt-20180716/sendlib.c#L490-L496 [4] NixOS#50927 (comment) [5] https://pagure.io/mailcap
8d101a4
to
991d4bf
Compare
@GrahamcOfBorg build mutt |
Success on x86_64-linux (full log) Attempted: mutt Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: mutt Partial log (click to expand)
|
@c0bw3b is there anything that keeps us from merging? |
One last check |
Success on x86_64-linux (full log) Attempted: neomutt Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: neomutt Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: neomutt Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: neomutt Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: neomutt Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: neomutt Partial log (click to expand)
|
( so I edited my message to correct a typo and it duplicated ofBorg jobs... that's dangerous :p ) LGTM |
Motivation for this change
The original issue can be reproduced when sending with an unpatched
mutt
orneomutt
an email with an attachement which as han.asc
extension. This will be interpreted as
application/pgp-encrypted
whichexperiences special logic, in the end the attachement will contain
"Version: 1"[1][2][3]
Right now, there are the following issues in the {,neo}mutt packages:
mutt.override { smimeSupport = true }
fails to build since theDebian patch results in a 404. Debian moved their packages to
salsa.debian.org
.However we can't use a versioned URL for this as Debian only tracks
the Mutt versions that are available in their releases. The patch
doesn't touch Mutt's core and is therefore simple to rebase, so
sticking to the 1.10.2 patch for now should be sufficient.
The original issue was never fixed in NeoMutt, currently we use the
S/MIME database from
pkgs.mime-types
which contains the issue withapplication/pgp-encrypted
as well.It seems as it's more reliable to use the default
neomutt
databasefor now which lives in
doc/mime.types
and place it intoPKGDATADIR
($out/share/neomutt).
[1] https://bugs.archlinux.org/task/43319
[2] https://bugs.gentoo.org/534658
[3] https://github.com/neomutt/neomutt/blob/neomutt-20180716/sendlib.c#L490-L496
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)