unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Exchange mutilation of multipart/encrypted
@ 2014-12-01 19:28 Brian Sniffen
  0 siblings, 0 replies; only message in thread
From: Brian Sniffen @ 2014-12-01 19:28 UTC (permalink / raw)
  To: notmuch@notmuchmail.org

My employer uses an Exchange server in place of an MTA.  It mutilates
multipart/encrypted messages, so that when I receive a PGP/MIME message
the Emacs-notmuch interface shows me:

    [ multipart/mixed ]
    [ text/plain ]
    [ ATT00002: application/pgp-encrypted ]
    [ msg.asc: application/octet-stream ]

When I used Gnus heavily, I wrote a little program to un-mutilate
PGP/MIME mail:

~~~
(defun repair-multipart-encrypted (article)
  "Switch a multipart/mixed header to multipart/encrypted.
This helps cope with broken Exchange servers."
  (interactive (list (gnus-summary-article-number)))
  (gnus-with-article article
    (message-narrow-to-head)
    (goto-char (point-min))
    (search-forward "Content-Type")
    (search-forward "mixed")
    (replace-match "encrypted; protocol=\"application/pgp-encrypted\"" t t)
    (widen))
  (let (gnus-mark-article-hook)
    (gnus-summary-select-article t t nil article)))
~~~

I'd love to have a way to tell Emacs-notmuch to treat a part as of a
different type, and provide parameters.  Alternately, I'd be happy to
edit the file on disk and have it re-indexed---but that seems likely to
cause me regret.  Any advice?  I see
`notmuch-show-insert-bodypart-internal` and expect to call that
with a forced content-type.

Thanks,
Brian

-- 
Brian Sniffen
"I reserve the right to evolve my views, and state that views I previously
 expressed may have been somehere along the spectrum from insufficiently
 nuanced through ill-informed to dead wrong."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-01 19:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-01 19:28 Exchange mutilation of multipart/encrypted Brian Sniffen

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).