Re: For gmail how do you setup notmuch mail ?...
authorBhaskara Marthi <bhaskara@gmail.com>
Wed, 8 Feb 2012 08:19:34 +0000 (00:19 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:16 +0000 (09:44 -0800)
52/7961d527c33a81209fe16dcb58fa3dd367ddc9 [new file with mode: 0644]

diff --git a/52/7961d527c33a81209fe16dcb58fa3dd367ddc9 b/52/7961d527c33a81209fe16dcb58fa3dd367ddc9
new file mode 100644 (file)
index 0000000..f71cbcf
--- /dev/null
@@ -0,0 +1,303 @@
+Return-Path: <bhaskara@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CC7F6431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 00:19:37 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.701\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.701 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, HTML_MESSAGE=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id rqcaSlicnb0i for <notmuch@notmuchmail.org>;\r
+       Wed,  8 Feb 2012 00:19:36 -0800 (PST)\r
+Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com\r
+       [209.85.210.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 503FA431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 00:19:36 -0800 (PST)\r
+Received: by dady25 with SMTP id y25so336150dad.26\r
+       for <notmuch@notmuchmail.org>; Wed, 08 Feb 2012 00:19:34 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
+       :cc:content-type;\r
+       bh=M7G88Jv6/DtMFmx8k9YIgM27D7x4Om/6hge2RrBC0go=;\r
+       b=sStG1ugTNtu418TbHpCASLpudSs9xquRtZDZsoTuZki0kJB6lxJoVtQuIbFevk0k/U\r
+       qa3MDQsGnGjh6Lsy3GlDg5TRJvhOihhnCfRFz/VsBf0v+7ux8G0aoelPD9mMyyIhMUSg\r
+       Za8+vlPgPdQ8qYCphZIAiVq+KiDnxOy2UshBo=\r
+MIME-Version: 1.0\r
+Received: by 10.68.219.234 with SMTP id pr10mr59674664pbc.11.1328689174125;\r
+       Wed, 08 Feb 2012 00:19:34 -0800 (PST)\r
+Received: by 10.68.0.138 with HTTP; Wed, 8 Feb 2012 00:19:34 -0800 (PST)\r
+In-Reply-To: <871uqag4jq.fsf@nikula.org>\r
+References:\r
+ <CAMeP1WZrJgMO1Vc33Qsphh4SXGBV9Cm9Y3ZH8JSY5dxNhDXVYA@mail.gmail.com>\r
+       <cun8vkj5597.fsf@hotblack-desiato.hh.sledj.net> <871uqag4jq.fsf@nikula.org>\r
+Date: Wed, 8 Feb 2012 00:19:34 -0800\r
+Message-ID:\r
+ <CADEZsr7ugD2xf2+jRtbx1ygigJcMQDeSxmS_e0hmFXLnA9VDig@mail.gmail.com>\r
+Subject: Re: For gmail how do you setup notmuch mail ?...\r
+From: Bhaskara Marthi <bhaskara@gmail.com>\r
+To: Jani Nikula <jani@nikula.org>\r
+Content-Type: multipart/alternative; boundary=e89a8ff249c33d9ca304b86f8eb3\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 08 Feb 2012 08:19:38 -0000\r
+\r
+--e89a8ff249c33d9ca304b86f8eb3\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+\r
+On Sat, Feb 4, 2012 at 4:35 AM, Jani Nikula <jani@nikula.org> wrote:\r
+\r
+> On Sat, 04 Feb 2012 09:15:16 +0000, David Edmondson <dme@dme.org> wrote:\r
+> > On Sat, 4 Feb 2012 03:39:23 -0500, don warner saklad <\r
+> don.saklad@gmail.com> wrote:\r
+> > > a) For gmail how do you setup notmuch mail ?...\r
+> > >\r
+> > > b) Any workarounds?\r
+> > >\r
+> > > c) Any kludges?\r
+>\r
+> I'll describe my own setup for using notmuch with gmail. I don't pretend\r
+> it will work for everyone, but you might find some bits of it useful.\r
+>\r
+> I don't even try to sync notmuch tags and gmail labels (because I rarely\r
+> use the labels or the web interface anyway), but I do get sync for\r
+> "unread" and "flagged" (gmail and Android "starred"). You'll need\r
+> maildir.synchronize_flags = true in your ~/.notmuch-config for this.\r
+>\r
+\r
+I'm using a similar setup.  An inconvenience with the setup is that I have\r
+various filters in gmail that filter, e.g., mailing list mails by skipping\r
+the gmail inbox and applying specific tags.  As a result when I look at my\r
+gmail inbox, I don't see these (many) mailing list messages.  With\r
+offlineimap+notmuch, however, since it just gets all the messages from\r
+[Gmail]/All Mail, it has no way of distinguishing between these two classes\r
+of messages, and so the notmuch new and unread message lists contain many\r
+messages that I don't want to look at.  Ideally, I'd like a view in notmuch\r
+that shows the same messages as the gmail inbox.  Is there a way to\r
+accomplish this?\r
+- b\r
+\r
+\r
+\r
+>\r
+> > Many people around here do that using offlineimap, which will\r
+> > synchronise an IMAP server (Gmail in this instance) with various local\r
+> > directories in Maildir format.\r
+>\r
+> I use offlineimap. I run it from the notmuch pre-new hook. This means I\r
+> have to run "notmuch new" to receive new mail.\r
+>\r
+> $ cat ~/.maildir/.notmuch/hooks/pre-new\r
+> #!/bin/sh\r
+> exec /usr/bin/offlineimap\r
+>\r
+> I only sync "All Mail" from gmail. Perhaps there would be some\r
+> optimizations that could be done, but I haven't bothered yet.\r
+>\r
+> $ cat ~/.offlineimaprc\r
+> [general]\r
+> accounts = Gmail\r
+> ui = Noninteractive.Basic\r
+>\r
+> [Account Gmail]\r
+> localrepository = Local\r
+> remoterepository = Remote\r
+>\r
+> [Repository Local]\r
+> type = Maildir\r
+> localfolders = ~/.maildir\r
+>\r
+> [Repository Remote]\r
+> type = IMAP\r
+> ssl = yes\r
+> remotehost = imap.gmail.com\r
+> remoteuser = USER@gmail.com\r
+> expunge = no\r
+> realdelete = no\r
+>\r
+> folderfilter = lambda foldername: foldername in ['[Gmail]/All Mail']\r
+> nametrans = lambda foldername: re.sub('^\[Gmail\]/All Mail', 'gmail',\r
+> foldername)\r
+>\r
+> > Sending mail via Gmail can be done in various ways. You can set up your\r
+> > local MTA (Postfix, Exim, ...) to deliver mail via Gmail, or have Emacs\r
+> > do the same directly using the smtpmail.el package.\r
+>\r
+> Personally I use msmtp (msmtp and msmtp-mta packages in Debian based\r
+> distros). The msmtp-mta sets up a sendmail-like binary that works out of\r
+> the box in Emacs. Beware that it doesn't have a local queue, it works\r
+> synchronously.\r
+>\r
+> $ cat ~/.msmtprc\r
+> defaults\r
+> logfile ~/.msmtp.log\r
+> tls_trust_file /etc/ssl/certs/ca-certificates.crt\r
+>\r
+> account default\r
+> host smtp.gmail.com\r
+> from USER@gmail.com\r
+> tls on\r
+> tls_starttls off\r
+> auth on\r
+> user USER@gmail.com\r
+>\r
+> Finally, I use goobook to use the gmail contacts as addressbook in\r
+> Emacs. See http://mid.gmane.org/87zkfuh3i0.fsf@nikula.org for that.\r
+>\r
+>\r
+> HTH,\r
+> Jani.\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+>\r
+\r
+--e89a8ff249c33d9ca304b86f8eb3\r
+Content-Type: text/html; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<br><br><div class=3D"gmail_quote">On Sat, Feb 4, 2012 at 4:35 AM, Jani Nik=\r
+ula <span dir=3D"ltr">&lt;<a href=3D"mailto:jani@nikula.org">jani@nikula.or=\r
+g</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=\r
+n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">\r
+<div class=3D"im">On Sat, 04 Feb 2012 09:15:16 +0000, David Edmondson &lt;<=\r
+a href=3D"mailto:dme@dme.org">dme@dme.org</a>&gt; wrote:<br>\r
+&gt; On Sat, 4 Feb 2012 03:39:23 -0500, don warner saklad &lt;<a href=3D"ma=\r
+ilto:don.saklad@gmail.com">don.saklad@gmail.com</a>&gt; wrote:<br>\r
+&gt; &gt; a) For gmail how do you setup notmuch mail ?...<br>\r
+&gt; &gt;<br>\r
+&gt; &gt; b) Any workarounds?<br>\r
+&gt; &gt;<br>\r
+&gt; &gt; c) Any kludges?<br>\r
+<br>\r
+</div>I&#39;ll describe my own setup for using notmuch with gmail. I don&#3=\r
+9;t pretend<br>\r
+it will work for everyone, but you might find some bits of it useful.<br>\r
+<br>\r
+I don&#39;t even try to sync notmuch tags and gmail labels (because I rarel=\r
+y<br>\r
+use the labels or the web interface anyway), but I do get sync for<br>\r
+&quot;unread&quot; and &quot;flagged&quot; (gmail and Android &quot;starred=\r
+&quot;). You&#39;ll need<br>\r
+maildir.synchronize_flags =3D true in your ~/.notmuch-config for this.<br><=\r
+/blockquote><div><br>I&#39;m using a similar setup.=A0 An inconvenience wit=\r
+h the setup is that I have various filters in gmail that filter, e.g., mail=\r
+ing list mails by skipping the gmail inbox and applying specific tags.=A0 A=\r
+s a result when I look at my gmail inbox, I don&#39;t see these (many) mail=\r
+ing list messages.=A0 With offlineimap+notmuch, however, since it just gets=\r
+ all the messages from [Gmail]/All Mail, it has no way of distinguishing be=\r
+tween these two classes of messages, and so the notmuch new and unread mess=\r
+age lists contain many messages that I don&#39;t want to look at.=A0 Ideall=\r
+y, I&#39;d like a view in notmuch that shows the same messages as the gmail=\r
+ inbox.=A0 Is there a way to accomplish this?<br>\r
+- b<br><br>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0pt 0=\r
+pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">\r
+<div class=3D"im"><br>\r
+&gt; Many people around here do that using offlineimap, which will<br>\r
+&gt; synchronise an IMAP server (Gmail in this instance) with various local=\r
+<br>\r
+&gt; directories in Maildir format.<br>\r
+<br>\r
+</div>I use offlineimap. I run it from the notmuch pre-new hook. This means=\r
+ I<br>\r
+have to run &quot;notmuch new&quot; to receive new mail.<br>\r
+<br>\r
+$ cat ~/.maildir/.notmuch/hooks/pre-new<br>\r
+#!/bin/sh<br>\r
+exec /usr/bin/offlineimap<br>\r
+<br>\r
+I only sync &quot;All Mail&quot; from gmail. Perhaps there would be some<br=\r
+>\r
+optimizations that could be done, but I haven&#39;t bothered yet.<br>\r
+<br>\r
+$ cat ~/.offlineimaprc<br>\r
+[general]<br>\r
+accounts =3D Gmail<br>\r
+ui =3D Noninteractive.Basic<br>\r
+<br>\r
+[Account Gmail]<br>\r
+localrepository =3D Local<br>\r
+remoterepository =3D Remote<br>\r
+<br>\r
+[Repository Local]<br>\r
+type =3D Maildir<br>\r
+localfolders =3D ~/.maildir<br>\r
+<br>\r
+[Repository Remote]<br>\r
+type =3D IMAP<br>\r
+ssl =3D yes<br>\r
+remotehost =3D <a href=3D"http://imap.gmail.com" target=3D"_blank">imap.gma=\r
+il.com</a><br>\r
+remoteuser =3D <a href=3D"mailto:USER@gmail.com">USER@gmail.com</a><br>\r
+expunge =3D no<br>\r
+realdelete =3D no<br>\r
+<br>\r
+folderfilter =3D lambda foldername: foldername in [&#39;[Gmail]/All Mail&#3=\r
+9;]<br>\r
+nametrans =3D lambda foldername: re.sub(&#39;^\[Gmail\]/All Mail&#39;, &#39=\r
+;gmail&#39;, foldername)<br>\r
+<div class=3D"im"><br>\r
+&gt; Sending mail via Gmail can be done in various ways. You can set up you=\r
+r<br>\r
+&gt; local MTA (Postfix, Exim, ...) to deliver mail via Gmail, or have Emac=\r
+s<br>\r
+&gt; do the same directly using the smtpmail.el package.<br>\r
+<br>\r
+</div>Personally I use msmtp (msmtp and msmtp-mta packages in Debian based<=\r
+br>\r
+distros). The msmtp-mta sets up a sendmail-like binary that works out of<br=\r
+>\r
+the box in Emacs. Beware that it doesn&#39;t have a local queue, it works<b=\r
+r>\r
+synchronously.<br>\r
+<br>\r
+$ cat ~/.msmtprc<br>\r
+defaults<br>\r
+logfile ~/.msmtp.log<br>\r
+tls_trust_file /etc/ssl/certs/ca-certificates.crt<br>\r
+<br>\r
+account default<br>\r
+host <a href=3D"http://smtp.gmail.com" target=3D"_blank">smtp.gmail.com</a>=\r
+<br>\r
+from <a href=3D"mailto:USER@gmail.com">USER@gmail.com</a><br>\r
+tls on<br>\r
+tls_starttls off<br>\r
+auth on<br>\r
+user <a href=3D"mailto:USER@gmail.com">USER@gmail.com</a><br>\r
+<br>\r
+Finally, I use goobook to use the gmail contacts as addressbook in<br>\r
+Emacs. See <a href=3D"http://mid.gmane.org/87zkfuh3i0.fsf@nikula.org" targe=\r
+t=3D"_blank">http://mid.gmane.org/87zkfuh3i0.fsf@nikula.org</a> for that.<b=\r
+r>\r
+<br>\r
+<br>\r
+HTH,<br>\r
+Jani.<br>\r
+<div class=3D"HOEnZb"><div class=3D"h5">___________________________________=\r
+____________<br>\r
+notmuch mailing list<br>\r
+<a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a><br>\r
+<a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch" target=3D"_blan=\r
+k">http://notmuchmail.org/mailman/listinfo/notmuch</a><br>\r
+</div></div></blockquote></div><br>\r
+\r
+--e89a8ff249c33d9ca304b86f8eb3--\r