diff --git a/mbox2web b/mbox2web index 53b6a4c..c100bed 100755 --- a/mbox2web +++ b/mbox2web @@ -88,6 +88,11 @@ def save_part(msg, disposition): "application/ms-tnef": ".ms-tnef", "application/x-bzip2": ".bz2", # more likely tar.bz2, but we can't know without looking into it which we ain't "application/x-shellscript": ".sh", + "application/x-java-vm": ".bin", # The only instances are mis-labelled + "image/png": ".png", + "application/pgp-keys": ".pgp", + "application/x-gunzip": ".gz", # that sort of makes sense, but not really + "image/jpeg": ".jpg", }[content_type] name = msg.get_param("name") or "(data)" @@ -333,6 +338,7 @@ def render_body(msg, extra=None): "message/news": render_message_news, "image/gif": render_image_gif, "multipart/related": render_multipart_related, + "application/x-java-vm": render_application_octet_stream, } content_type = msg.get_content_type() content_disposition = msg.get_content_disposition() diff --git a/templates/attachment_application_pgp-keys.html b/templates/attachment_application_pgp-keys.html new file mode 100644 index 0000000..2778d03 --- /dev/null +++ b/templates/attachment_application_pgp-keys.html @@ -0,0 +1,9 @@ +
+
+ application/pgp-keys +
+
+ {{name}} +
+
+ diff --git a/templates/attachment_application_x-gunzip.html b/templates/attachment_application_x-gunzip.html new file mode 100644 index 0000000..912dcd2 --- /dev/null +++ b/templates/attachment_application_x-gunzip.html @@ -0,0 +1,9 @@ +
+
+ application/x-gzip +
+
+ {{name}} +
+
+ diff --git a/templates/attachment_application_x-java-vm.html b/templates/attachment_application_x-java-vm.html new file mode 100644 index 0000000..4252590 --- /dev/null +++ b/templates/attachment_application_x-java-vm.html @@ -0,0 +1,9 @@ +
+
+ application/x-java-vm +
+
+ {{name}} +
+
+ diff --git a/templates/attachment_image_jpeg.html b/templates/attachment_image_jpeg.html new file mode 100644 index 0000000..61d2de1 --- /dev/null +++ b/templates/attachment_image_jpeg.html @@ -0,0 +1,8 @@ +
1000 +
+ image/png +
+
+ {{name}} +
+
diff --git a/templates/attachment_image_png.html b/templates/attachment_image_png.html new file mode 100644 index 0000000..61d2de1 --- /dev/null +++ b/templates/attachment_image_png.html @@ -0,0 +1,8 @@ +
1000 +
+ image/png +
+
+ {{name}} +
+