Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 54 / 6fc85b3eb50bcb13e65162d10a67e4cad3d21d
1 Return-Path: <bsniffen@akamai.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id D0EBE431FC4\r
6         for <notmuch@notmuchmail.org>; Mon,  1 Dec 2014 11:35:07 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id ow9PktyI2ADc for <notmuch@notmuchmail.org>;\r
16         Mon,  1 Dec 2014 11:35:03 -0800 (PST)\r
17 X-Greylist: delayed 397 seconds by postgrey-1.32 at olra;\r
18         Mon, 01 Dec 2014 11:35:02 PST\r
19 Received: from prod-mail-xrelay02.akamai.com (prod-mail-xrelay02.akamai.com\r
20         [72.246.2.14])\r
21         by olra.theworths.org (Postfix) with ESMTP id 1CE59431FC0\r
22         for <notmuch@notmuchmail.org>; Mon,  1 Dec 2014 11:35:02 -0800 (PST)\r
23 Received: from prod-mail-xrelay02.akamai.com (localhost [127.0.0.1])\r
24         by postfix.imss70 (Postfix) with ESMTP id 891D928501\r
25         for <notmuch@notmuchmail.org>; Mon,  1 Dec 2014 19:28:25 +0000 (GMT)\r
26 Received: from prod-mail-relay07.akamai.com (prod-mail-relay07.akamai.com\r
27         [172.17.121.112])\r
28         by prod-mail-xrelay02.akamai.com (Postfix) with ESMTP id 746ED28500\r
29         for <notmuch@notmuchmail.org>; Mon,  1 Dec 2014 19:28:25 +0000 (GMT)\r
30 Received: from email.msg.corp.akamai.com (usma1ex-cas3.msg.corp.akamai.com\r
31         [172.27.123.32])\r
32         by prod-mail-relay07.akamai.com (Postfix) with ESMTP id 6DF3280047\r
33         for <notmuch@notmuchmail.org>; Mon,  1 Dec 2014 19:28:25 +0000 (GMT)\r
34 Received: from USMA1EX-CAS3.msg.corp.akamai.com (172.27.123.32) by\r
35         usma1ex-dag1mb3.msg.corp.akamai.com (172.27.123.103) with Microsoft\r
36         SMTP Server (TLS) id 15.0.913.22; Mon, 1 Dec 2014 14:28:24 -0500\r
37 Received: from Tereva.local (172.19.45.175) by\r
38         USMA1EX-CAS3.msg.corp.akamai.com (172.27.123.32) with Microsoft SMTP\r
39         Server (TLS) id 15.0.913.22 via Frontend Transport;\r
40         Mon, 1 Dec 2014 14:28:24 -0500\r
41 From: Brian Sniffen <bsniffen@akamai.com>\r
42 To: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>\r
43 Subject: Exchange mutilation of multipart/encrypted\r
44 User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1\r
45         (x86_64-apple-darwin14.0.0)\r
46 Date: Mon, 1 Dec 2014 14:28:24 -0500\r
47 Message-ID: <m2iohvf9uv.fsf@usma1mc-0csx92.kendall.corp.akamai.com>\r
48 MIME-Version: 1.0\r
49 Content-Type: text/plain\r
50 X-Mailman-Approved-At: Tue, 02 Dec 2014 01:16:51 -0800\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Mon, 01 Dec 2014 19:35:08 -0000\r
64 \r
65 My employer uses an Exchange server in place of an MTA.  It mutilates\r
66 multipart/encrypted messages, so that when I receive a PGP/MIME message\r
67 the Emacs-notmuch interface shows me:\r
68 \r
69     [ multipart/mixed ]\r
70     [ text/plain ]\r
71     [ ATT00002: application/pgp-encrypted ]\r
72     [ msg.asc: application/octet-stream ]\r
73 \r
74 When I used Gnus heavily, I wrote a little program to un-mutilate\r
75 PGP/MIME mail:\r
76 \r
77 ~~~\r
78 (defun repair-multipart-encrypted (article)\r
79   "Switch a multipart/mixed header to multipart/encrypted.\r
80 This helps cope with broken Exchange servers."\r
81   (interactive (list (gnus-summary-article-number)))\r
82   (gnus-with-article article\r
83     (message-narrow-to-head)\r
84     (goto-char (point-min))\r
85     (search-forward "Content-Type")\r
86     (search-forward "mixed")\r
87     (replace-match "encrypted; protocol=\"application/pgp-encrypted\"" t t)\r
88     (widen))\r
89   (let (gnus-mark-article-hook)\r
90     (gnus-summary-select-article t t nil article)))\r
91 ~~~\r
92 \r
93 I'd love to have a way to tell Emacs-notmuch to treat a part as of a\r
94 different type, and provide parameters.  Alternately, I'd be happy to\r
95 edit the file on disk and have it re-indexed---but that seems likely to\r
96 cause me regret.  Any advice?  I see\r
97 `notmuch-show-insert-bodypart-internal` and expect to call that\r
98 with a forced content-type.\r
99 \r
100 Thanks,\r
101 Brian\r
102 \r
103 -- \r
104 Brian Sniffen\r
105 "I reserve the right to evolve my views, and state that views I previously\r
106  expressed may have been somehere along the spectrum from insufficiently\r
107  nuanced through ill-informed to dead wrong."\r