"Handle" a detached pgp signature

Don't even ignore it (be sarcastic about it).
This commit is contained in:
Peter J. Holzer 2019-03-04 21:23:03 +01:00
parent 314ccaba48
commit 48fcf768ae
2 changed files with 16 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,8 @@
<div class="partouter">
<div class="partheader">
application/pgp-signature
</div>
<div class="partinner">
(free floating signature - a blank cheque?)
</div>
</div>