Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D0EBE431FC4 for ; Mon, 1 Dec 2014 11:35:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ow9PktyI2ADc for ; Mon, 1 Dec 2014 11:35:03 -0800 (PST) X-Greylist: delayed 397 seconds by postgrey-1.32 at olra; Mon, 01 Dec 2014 11:35:02 PST Received: from prod-mail-xrelay02.akamai.com (prod-mail-xrelay02.akamai.com [72.246.2.14]) by olra.theworths.org (Postfix) with ESMTP id 1CE59431FC0 for ; Mon, 1 Dec 2014 11:35:02 -0800 (PST) Received: from prod-mail-xrelay02.akamai.com (localhost [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 891D928501 for ; Mon, 1 Dec 2014 19:28:25 +0000 (GMT) Received: from prod-mail-relay07.akamai.com (prod-mail-relay07.akamai.com [172.17.121.112]) by prod-mail-xrelay02.akamai.com (Postfix) with ESMTP id 746ED28500 for ; Mon, 1 Dec 2014 19:28:25 +0000 (GMT) Received: from email.msg.corp.akamai.com (usma1ex-cas3.msg.corp.akamai.com [172.27.123.32]) by prod-mail-relay07.akamai.com (Postfix) with ESMTP id 6DF3280047 for ; Mon, 1 Dec 2014 19:28:25 +0000 (GMT) Received: from USMA1EX-CAS3.msg.corp.akamai.com (172.27.123.32) by usma1ex-dag1mb3.msg.corp.akamai.com (172.27.123.103) with Microsoft SMTP Server (TLS) id 15.0.913.22; Mon, 1 Dec 2014 14:28:24 -0500 Received: from Tereva.local (172.19.45.175) by USMA1EX-CAS3.msg.corp.akamai.com (172.27.123.32) with Microsoft SMTP Server (TLS) id 15.0.913.22 via Frontend Transport; Mon, 1 Dec 2014 14:28:24 -0500 From: Brian Sniffen To: "notmuch@notmuchmail.org" Subject: Exchange mutilation of multipart/encrypted User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-apple-darwin14.0.0) Date: Mon, 1 Dec 2014 14:28:24 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Mailman-Approved-At: Tue, 02 Dec 2014 01:16:51 -0800 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2014 19:35:08 -0000 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."