[Patch v2 2/9] notmuch-tag.c: convert to use tag-utils
[notmuch-archives.git] / f9 / c29095d1015326cabb9a5ddfc6076dceb451df
1 Return-Path: <jani@nikula.org>\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 4B982431FAF\r
6         for <notmuch@notmuchmail.org>; Sat,  4 Feb 2012 04:35:14 -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: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 d7bP1EjaiBbS for <notmuch@notmuchmail.org>;\r
16         Sat,  4 Feb 2012 04:35:12 -0800 (PST)\r
17 Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
18         [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 65AA9431FAE\r
21         for <notmuch@notmuchmail.org>; Sat,  4 Feb 2012 04:35:12 -0800 (PST)\r
22 Received: by lahd3 with SMTP id d3so2505502lah.26\r
23         for <notmuch@notmuchmail.org>; Sat, 04 Feb 2012 04:35:09 -0800 (PST)\r
24 Received: by 10.112.36.65 with SMTP id o1mr2904518lbj.32.1328358909423;\r
25         Sat, 04 Feb 2012 04:35:09 -0800 (PST)\r
26 Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
27         [84.248.80.253])\r
28         by mx.google.com with ESMTPS id k13sm7456921lbu.16.2012.02.04.04.35.07\r
29         (version=SSLv3 cipher=OTHER); Sat, 04 Feb 2012 04:35:08 -0800 (PST)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: David Edmondson <dme@dme.org>, don.saklad@gmail.com,\r
32         notmuch@notmuchmail.org\r
33 Subject: Re: For gmail how do you setup notmuch mail ?...\r
34 In-Reply-To: <cun8vkj5597.fsf@hotblack-desiato.hh.sledj.net>\r
35 References:\r
36  <CAMeP1WZrJgMO1Vc33Qsphh4SXGBV9Cm9Y3ZH8JSY5dxNhDXVYA@mail.gmail.com>\r
37         <cun8vkj5597.fsf@hotblack-desiato.hh.sledj.net>\r
38 User-Agent: Notmuch/0.11+139~g4340989 (http://notmuchmail.org) Emacs/23.3.1\r
39         (i686-pc-linux-gnu)\r
40 Date: Sat, 04 Feb 2012 14:35:05 +0200\r
41 Message-ID: <871uqag4jq.fsf@nikula.org>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Sat, 04 Feb 2012 12:35:14 -0000\r
57 \r
58 On Sat, 04 Feb 2012 09:15:16 +0000, David Edmondson <dme@dme.org> wrote:\r
59 > On Sat, 4 Feb 2012 03:39:23 -0500, don warner saklad <don.saklad@gmail.com> wrote:\r
60 > > a) For gmail how do you setup notmuch mail ?...\r
61 > > \r
62 > > b) Any workarounds?\r
63 > > \r
64 > > c) Any kludges?\r
65 \r
66 I'll describe my own setup for using notmuch with gmail. I don't pretend\r
67 it will work for everyone, but you might find some bits of it useful.\r
68 \r
69 I don't even try to sync notmuch tags and gmail labels (because I rarely\r
70 use the labels or the web interface anyway), but I do get sync for\r
71 "unread" and "flagged" (gmail and Android "starred"). You'll need\r
72 maildir.synchronize_flags = true in your ~/.notmuch-config for this.\r
73 \r
74 > Many people around here do that using offlineimap, which will\r
75 > synchronise an IMAP server (Gmail in this instance) with various local\r
76 > directories in Maildir format.\r
77 \r
78 I use offlineimap. I run it from the notmuch pre-new hook. This means I\r
79 have to run "notmuch new" to receive new mail.\r
80 \r
81 $ cat ~/.maildir/.notmuch/hooks/pre-new\r
82 #!/bin/sh\r
83 exec /usr/bin/offlineimap\r
84 \r
85 I only sync "All Mail" from gmail. Perhaps there would be some\r
86 optimizations that could be done, but I haven't bothered yet.\r
87 \r
88 $ cat ~/.offlineimaprc\r
89 [general]\r
90 accounts = Gmail\r
91 ui = Noninteractive.Basic\r
92 \r
93 [Account Gmail]\r
94 localrepository = Local\r
95 remoterepository = Remote\r
96 \r
97 [Repository Local]\r
98 type = Maildir\r
99 localfolders = ~/.maildir\r
100 \r
101 [Repository Remote]\r
102 type = IMAP\r
103 ssl = yes\r
104 remotehost = imap.gmail.com\r
105 remoteuser = USER@gmail.com\r
106 expunge = no\r
107 realdelete = no\r
108 \r
109 folderfilter = lambda foldername: foldername in ['[Gmail]/All Mail']\r
110 nametrans = lambda foldername: re.sub('^\[Gmail\]/All Mail', 'gmail', foldername)\r
111 \r
112 > Sending mail via Gmail can be done in various ways. You can set up your\r
113 > local MTA (Postfix, Exim, ...) to deliver mail via Gmail, or have Emacs\r
114 > do the same directly using the smtpmail.el package.\r
115 \r
116 Personally I use msmtp (msmtp and msmtp-mta packages in Debian based\r
117 distros). The msmtp-mta sets up a sendmail-like binary that works out of\r
118 the box in Emacs. Beware that it doesn't have a local queue, it works\r
119 synchronously.\r
120 \r
121 $ cat ~/.msmtprc\r
122 defaults\r
123 logfile ~/.msmtp.log\r
124 tls_trust_file /etc/ssl/certs/ca-certificates.crt\r
125 \r
126 account default\r
127 host smtp.gmail.com\r
128 from USER@gmail.com\r
129 tls on\r
130 tls_starttls off\r
131 auth on\r
132 user USER@gmail.com\r
133 \r
134 Finally, I use goobook to use the gmail contacts as addressbook in\r
135 Emacs. See http://mid.gmane.org/87zkfuh3i0.fsf@nikula.org for that.\r
136 \r
137 \r
138 HTH,\r
139 Jani.\r