From 48fcf768ae1e7c1be74bb634851597637978d0ea Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 4 Mar 2019 21:23:03 +0100 Subject: [PATCH] "Handle" a detached pgp signature Don't even ignore it (be sarcastic about it). --- mbox2web | 8 ++++++++ templates/body_application_pgp-signature.html | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 templates/body_application_pgp-signature.html diff --git a/mbox2web b/mbox2web index a56593a..414c40a 100755 --- a/mbox2web +++ b/mbox2web @@ -231,6 +231,13 @@ def render_body(msg): } bodyhtml = bodytmpl.render(context) + elif content_type == "application/pgp-signature": + # A PGP signature outside of a multipart/signed - useless + bodytmpl = jenv.get_template("body_application_pgp-signature.html") + context = { + } + bodyhtml = bodytmpl.render(context) + else: raise RuntimeError("Content-type " + content_type + " not implemented yet") @@ -239,6 +246,7 @@ def render_body(msg): def archive(msg): mid = get_message_id(msg) + print("M", mid, file=sys.stderr) encmid = encode_message_id(mid) msgdir = basedir + "/msg/" + encmid os.makedirs(msgdir, exist_ok=True) diff --git a/templates/body_application_pgp-signature.html b/templates/body_application_pgp-signature.html new file mode 100644 index 0000000..c284ede --- /dev/null +++ b/templates/body_application_pgp-signature.html @@ -0,0 +1,8 @@ +
+
+ application/pgp-signature +
+
+ (free floating signature - a blank cheque?) +
+