database error
[notmuch-archives.git] / 75 / b044848eb793e196d3d3c27fd9ff7d28b31cc9
1 Return-Path: <five9a2@gmail.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 96B94431FBC\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 09:02:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id eh7GtbIG1Oyf for <notmuch@notmuchmail.org>;\r
11         Sun, 22 Nov 2009 09:02:08 -0800 (PST)\r
12 Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com\r
13         [209.85.218.224])\r
14         by olra.theworths.org (Postfix) with ESMTP id 40D7A431FAE\r
15         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 09:02:08 -0800 (PST)\r
16 Received: by bwz24 with SMTP id 24so3408774bwz.30\r
17         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 09:02:07 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:sender:from:to:cc:subject\r
20         :in-reply-to:references:date:message-id:mime-version:content-type;\r
21         bh=fq6XDslB1+EEgwws+FgT3WkYKMFix3Ym/uTZIbV3ClM=;\r
22         b=L2F577h1iaZ7dXAOuMWHRGnBIG1sFPVBmkjc8qLf9H1yRvMkzJwyQZLNRCmi8Ro2Nm\r
23         v76Lf4yA/GxYTundejw2VMVfMNbMqTJ3kkDzLJi2oj92hntOzklGAQi19SQG7DVkHD0n\r
24         KisdMXTYFy1VhV30DdlwtwihY7P//GFIdyu4w=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=sender:from:to:cc:subject:in-reply-to:references:date:message-id\r
27         :mime-version:content-type;\r
28         b=pNWLI8DIbMQI9GRKjCn/Xe4o9LMhN5lNrrsWcPI/T/jVzlqsS8+tR8TiaXUfsmLoKR\r
29         OU/mlKKhP8v39e7dj8mXMhH0SxZo+4/91qFV8Xvq7XQa5m0kfz49a4g3M1q3Y8fqz2LI\r
30         P+tIBzqbMmqBGb4bIXErXnTUGEahMV/PW3lRE=\r
31 Received: by 10.204.175.20 with SMTP id v20mr3590876bkz.213.1258909327484;\r
32         Sun, 22 Nov 2009 09:02:07 -0800 (PST)\r
33 Received: from kunyang (vawpc43.ethz.ch [129.132.59.11])\r
34         by mx.google.com with ESMTPS id 13sm4521642fks.45.2009.11.22.09.02.05\r
35         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
36         Sun, 22 Nov 2009 09:02:06 -0800 (PST)\r
37 Sender: Jed Brown <five9a2@gmail.com>\r
38 From: Jed Brown <jed@59A2.org>\r
39 To: Brett Viren <brett.viren@gmail.com>, Jjgod Jiang <gzjjgod@gmail.com>\r
40 In-Reply-To: <46263c600911220641m4d6de6d9u190d41c3feb87bc7@mail.gmail.com>\r
41 References: <ddd65cda0911212044k7501a763sb454be337f72756b@mail.gmail.com>\r
42         <46263c600911220641m4d6de6d9u190d41c3feb87bc7@mail.gmail.com>\r
43 Date: Sun, 22 Nov 2009 18:02:36 +0100\r
44 Message-ID:\r
45  <87zl6ev6fn.fsf@kunyang.i-did-not-set--mail-host-address--so-tickle-me>\r
46 MIME-Version: 1.0\r
47 Content-Type: text/plain; charset=us-ascii\r
48 Cc: notmuch@notmuchmail.org\r
49 Subject: Re: [notmuch] Guide for new users?\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.12\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sun, 22 Nov 2009 17:02:09 -0000\r
63 \r
64 On Sun, 22 Nov 2009 09:41:16 -0500, Brett Viren <brett.viren@gmail.com> wrote:\r
65 > On Sat, Nov 21, 2009 at 11:44 PM, Jjgod Jiang <gzjjgod@gmail.com> wrote:\r
66\r
67 > > 1. What's the most efficient way to sync mails from my gmail\r
68 > > account to a local Maildir? I've tried offlineimap but it\r
69 > > keeps crashing python (!) on my system (python 2.6, Mac OS X\r
70 > > 10.6.2).\r
71\r
72 > OfflineIMAP would have been my suggestion.\r
73 \r
74 Yes, however it will change flags which changes file names and currently\r
75 confuses notmuch.  I synced [Gmail].All Mail with OfflineIMAP and am now\r
76 using Getmail to pull via POP.  In the Gmail settings, activate POP\r
77 starting at the current time.  I'll switch back to OfflineIMAP when\r
78 notmuch is happy with changing file names.\r
79 \r
80 The following should save notmuch + Gmail users some time.\r
81 \r
82 \r
83 ~/.getmail/gmail:\r
84 \r
85 [retriever]\r
86 # Getmail can also do IMAP\r
87 # type = SimpleIMAPSSLRetriever\r
88 # server = imap.gmail.com\r
89 type = SimplePOP3SSLRetriever\r
90 server = pop.gmail.com\r
91 username = yourname@gmail.com\r
92 password = Pa55W0rd\r
93 # Use this with IMAP to only download one copy of each message\r
94 # mailboxes = ('[Gmail]/All Mail',)\r
95 \r
96 [destination]\r
97 type = Maildir\r
98 path = ~/.mail-archive/gmail/pop/\r
99 \r
100 [options]\r
101 # print messages about each action (verbose = 2)\r
102 # Other options:\r
103 # 0 prints only warnings and errors\r
104 # 1 prints messages about retrieving and deleting messages only\r
105 verbose = 2\r
106 message_log = ~/.getmail/gmail.log\r
107 \r
108 \r
109 With getmail, put something like this in your crontab (checks every 2\r
110 minutes)\r
111 \r
112 # MIN HOUR DAY MONTH DAYOFWEEK   COMMAND\r
113 */2 * * * * getmail -r gmail && notmuch new\r
114 \r
115 \r
116 \r
117 \r
118 ~/.offlineimaprc:\r
119 \r
120 [general]\r
121 accounts = GMail\r
122 maxsyncaccounts = 1\r
123 ui = Noninteractive.Basic\r
124 \r
125 [Account GMail]\r
126 localrepository = Local\r
127 remoterepository = Remote\r
128 autorefresh = 1\r
129 quick = 10\r
130 postsynchook = notmuch new\r
131 \r
132 [Repository Local]\r
133 type = Maildir\r
134 localfolders = /home/jed/.mail-archive/gmail/imap\r
135 \r
136 [Repository Remote]\r
137 type = Gmail\r
138 folderfilter = lambda foldername: foldername in ['[Gmail]/All Mail']\r
139 remotehost = imap.gmail.com\r
140 remoteuser = yourname@gmail.com\r
141 remotepass = Pa55W0rd\r
142 ssl = yes\r
143 maxconnections = 2\r
144 \r
145 #Setting realdelete = yes will Really Delete email from the server.\r
146 #Otherwise "deleting" a message will just remove any labels and\r
147 #retain the message in the All Mail folder.\r
148 realdelete = no\r
149 \r
150 \r
151 \r
152 \r
153 Note that with IMAP, your messages in '[Gmail]/All Mail' will be\r
154 delivered to a path with spaces which notmuch handles fine, but you will\r
155 need a patch\r
156 \r
157   <1258771074-25997-1-git-send-email-jed@59A2.org>\r
158 \r
159 for start-process-shell-command, e.g. to apply patches from within emacs via\r
160 \r
161   | git am\r
162 \r
163 \r
164 \r
165 * Sending messages\r
166 \r
167 To send messages from Emacs via Gmail, put something like this in your ~/.emacs\r
168 \r
169 (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) ; Must be set BEFORE loading smtpmail\r
170       smtpmail-auth-credentials (expand-file-name "~/.authinfo")\r
171       smtpmail-default-smtp-server "smtp.gmail.com"\r
172       smtpmail-smtp-server "smtp.gmail.com"\r
173       smtpmail-smtp-service 587\r
174       smtpmail-debug-info t ; change to nil once it works\r
175       smtpmail-debug-verb t)\r
176 (require 'smtpmail)\r
177 (setq message-send-mail-function 'smtpmail-send-it)\r
178 (require 'starttls)\r
179 \r
180 \r
181 you can inline authentication, but especially if you keep ~/.emacs under\r
182 version control, you should put it separately (chmod 600).\r
183 \r
184 ~/.authinfo:\r
185 \r
186 machine smtp.gmail.com login yourname@gmail.com password Pa55W0rd port 587\r
187 \r
188 \r
189 * Git\r
190 Git + Gmail users can use git send-email by putting this in your\r
191 .gitconfig\r
192 \r
193 [sendemail]\r
194         smtpserver = smtp.gmail.com\r
195         smtpserverport = 587\r
196         smtpencryption = tls\r
197         smtpuser = yourname@gmail.com\r
198         smtppass = Pa55W0rd\r
199 \r
200 \r
201 \r
202 I hope this helps.\r
203 \r
204 Jed\r