Re: For gmail how do you setup notmuch mail ?...
authorJani Nikula <jani@nikula.org>
Sat, 4 Feb 2012 12:35:05 +0000 (14:35 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:04 +0000 (09:44 -0800)
f9/c29095d1015326cabb9a5ddfc6076dceb451df [new file with mode: 0644]

diff --git a/f9/c29095d1015326cabb9a5ddfc6076dceb451df b/f9/c29095d1015326cabb9a5ddfc6076dceb451df
new file mode 100644 (file)
index 0000000..ee62ebc
--- /dev/null
@@ -0,0 +1,139 @@
+Return-Path: <jani@nikula.org>\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 4B982431FAF\r
+       for <notmuch@notmuchmail.org>; Sat,  4 Feb 2012 04:35:14 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 d7bP1EjaiBbS for <notmuch@notmuchmail.org>;\r
+       Sat,  4 Feb 2012 04:35:12 -0800 (PST)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 65AA9431FAE\r
+       for <notmuch@notmuchmail.org>; Sat,  4 Feb 2012 04:35:12 -0800 (PST)\r
+Received: by lahd3 with SMTP id d3so2505502lah.26\r
+       for <notmuch@notmuchmail.org>; Sat, 04 Feb 2012 04:35:09 -0800 (PST)\r
+Received: by 10.112.36.65 with SMTP id o1mr2904518lbj.32.1328358909423;\r
+       Sat, 04 Feb 2012 04:35:09 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+       [84.248.80.253])\r
+       by mx.google.com with ESMTPS id k13sm7456921lbu.16.2012.02.04.04.35.07\r
+       (version=SSLv3 cipher=OTHER); Sat, 04 Feb 2012 04:35:08 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Edmondson <dme@dme.org>, don.saklad@gmail.com,\r
+       notmuch@notmuchmail.org\r
+Subject: Re: For gmail how do you setup notmuch mail ?...\r
+In-Reply-To: <cun8vkj5597.fsf@hotblack-desiato.hh.sledj.net>\r
+References:\r
+ <CAMeP1WZrJgMO1Vc33Qsphh4SXGBV9Cm9Y3ZH8JSY5dxNhDXVYA@mail.gmail.com>\r
+       <cun8vkj5597.fsf@hotblack-desiato.hh.sledj.net>\r
+User-Agent: Notmuch/0.11+139~g4340989 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+Date: Sat, 04 Feb 2012 14:35:05 +0200\r
+Message-ID: <871uqag4jq.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Sat, 04 Feb 2012 12:35:14 -0000\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 <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
+> 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', 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