Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A3151431FAF for ; Wed, 8 Feb 2012 00:24:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.701 X-Spam-Level: * X-Spam-Status: No, score=1.701 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PAp5C6d0ISE4 for ; Wed, 8 Feb 2012 00:24:53 -0800 (PST) Received: from mail-tul01m020-f181.google.com (mail-tul01m020-f181.google.com [209.85.214.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7BDEE431FAE for ; Wed, 8 Feb 2012 00:24:53 -0800 (PST) Received: by obbup10 with SMTP id up10so539557obb.26 for ; Wed, 08 Feb 2012 00:24:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W/S9DMfSf2B+dGl2VZPBUaW68k36EdocCXA/DHtrn/I=; b=wCCdhKQv7k+0703cXoCVzLCgcSfQDPZJINv/8a5D+RsDylyvIswD/yzPkW3zN84MAp DGHx1VjeXIelEhDPpbXTOJlT3PKUGP2XwdY36nNB3kjGOGnL/VmkGJgaT0ipWZdvG60g Zry+50oicc2NAQ5itVnUlby9vucpz433o7kfg= MIME-Version: 1.0 Received: by 10.50.41.163 with SMTP id g3mr11505811igl.10.1328689491674; Wed, 08 Feb 2012 00:24:51 -0800 (PST) Received: by 10.42.196.133 with HTTP; Wed, 8 Feb 2012 00:24:51 -0800 (PST) In-Reply-To: References: <871uqag4jq.fsf@nikula.org> Date: Wed, 8 Feb 2012 00:24:51 -0800 Message-ID: Subject: Re: For gmail how do you setup notmuch mail ?... From: Alex Botero-Lowry To: Bhaskara Marthi Content-Type: multipart/alternative; boundary=14dae934084b2b06f104b86fa194 Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 08:24:54 -0000 --14dae934084b2b06f104b86fa194 Content-Type: text/plain; charset=ISO-8859-1 I have some code[1] that bidirectionally syncs gmail labels into tags in notmuch, but it's not fast enough to be run continuously. Eventually, and I mean that with the longest possible value, I'll get around to fixing that. If you're interested in trying to fix it I can explain the issues and some ideas I had to fix it. [1] http://alexbl.net/~alexbl/imapsync.py On Wed, Feb 8, 2012 at 12:19 AM, Bhaskara Marthi wrote: > > > On Sat, Feb 4, 2012 at 4:35 AM, Jani Nikula wrote: > >> On Sat, 04 Feb 2012 09:15:16 +0000, David Edmondson wrote: >> > On Sat, 4 Feb 2012 03:39:23 -0500, don warner saklad < >> don.saklad@gmail.com> wrote: >> > > a) For gmail how do you setup notmuch mail ?... >> > > >> > > b) Any workarounds? >> > > >> > > c) Any kludges? >> >> I'll describe my own setup for using notmuch with gmail. I don't pretend >> it will work for everyone, but you might find some bits of it useful. >> >> I don't even try to sync notmuch tags and gmail labels (because I rarely >> use the labels or the web interface anyway), but I do get sync for >> "unread" and "flagged" (gmail and Android "starred"). You'll need >> maildir.synchronize_flags = true in your ~/.notmuch-config for this. >> > > I'm using a similar setup. An inconvenience with the setup is that I have > various filters in gmail that filter, e.g., mailing list mails by skipping > the gmail inbox and applying specific tags. As a result when I look at my > gmail inbox, I don't see these (many) mailing list messages. With > offlineimap+notmuch, however, since it just gets all the messages from > [Gmail]/All Mail, it has no way of distinguishing between these two classes > of messages, and so the notmuch new and unread message lists contain many > messages that I don't want to look at. Ideally, I'd like a view in notmuch > that shows the same messages as the gmail inbox. Is there a way to > accomplish this? > - b > > > >> >> > Many people around here do that using offlineimap, which will >> > synchronise an IMAP server (Gmail in this instance) with various local >> > directories in Maildir format. >> >> I use offlineimap. I run it from the notmuch pre-new hook. This means I >> have to run "notmuch new" to receive new mail. >> >> $ cat ~/.maildir/.notmuch/hooks/pre-new >> #!/bin/sh >> exec /usr/bin/offlineimap >> >> I only sync "All Mail" from gmail. Perhaps there would be some >> optimizations that could be done, but I haven't bothered yet. >> >> $ cat ~/.offlineimaprc >> [general] >> accounts = Gmail >> ui = Noninteractive.Basic >> >> [Account Gmail] >> localrepository = Local >> remoterepository = Remote >> >> [Repository Local] >> type = Maildir >> localfolders = ~/.maildir >> >> [Repository Remote] >> type = IMAP >> ssl = yes >> remotehost = imap.gmail.com >> remoteuser = USER@gmail.com >> expunge = no >> realdelete = no >> >> folderfilter = lambda foldername: foldername in ['[Gmail]/All Mail'] >> nametrans = lambda foldername: re.sub('^\[Gmail\]/All Mail', 'gmail', >> foldername) >> >> > Sending mail via Gmail can be done in various ways. You can set up your >> > local MTA (Postfix, Exim, ...) to deliver mail via Gmail, or have Emacs >> > do the same directly using the smtpmail.el package. >> >> Personally I use msmtp (msmtp and msmtp-mta packages in Debian based >> distros). The msmtp-mta sets up a sendmail-like binary that works out of >> the box in Emacs. Beware that it doesn't have a local queue, it works >> synchronously. >> >> $ cat ~/.msmtprc >> defaults >> logfile ~/.msmtp.log >> tls_trust_file /etc/ssl/certs/ca-certificates.crt >> >> account default >> host smtp.gmail.com >> from USER@gmail.com >> tls on >> tls_starttls off >> auth on >> user USER@gmail.com >> >> Finally, I use goobook to use the gmail contacts as addressbook in >> Emacs. See http://mid.gmane.org/87zkfuh3i0.fsf@nikula.org for that. >> >> >> HTH, >> Jani. >> _______________________________________________ >> notmuch mailing list >> notmuch@notmuchmail.org >> http://notmuchmail.org/mailman/listinfo/notmuch >> > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch > > --14dae934084b2b06f104b86fa194 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have some code[1] that bidirectionally syncs gmail labels into tags in no= tmuch, but it's not fast enough to be run=A0continuously. Eventually, a= nd I mean that with the longest possible value, I'll get around to fixi= ng that. If you're interested in trying to fix it I can explain the iss= ues and some ideas I had to fix it.



On Wed, Feb 8, 2012 at 12:19 AM, Bhaskara Marthi &l= t;bhaskara@gmail.com> w= rote:


On Sat, Feb 4, 2012 at 4:35 AM, Jani Nikula <= jani@nikula.org>= ; wrote:
On Sat, 04 Feb 2012 09:15:16 +0000, David Edmondson <dme@dme.org> wrote:
> On Sat, 4 Feb 2012 03:39:23 -0500, don warner saklad <don.saklad@gmail.com> w= rote:
> > a) For gmail how do you setup notmuch mail ?...
> >
> > b) Any workarounds?
> >
> > c) Any kludges?

I'll describe my own setup for using notmuch with gmail. I don= 9;t pretend
it will work for everyone, but you might find some bits of it useful.

I don't even try to sync notmuch tags and gmail labels (because I rarel= y
use the labels or the web interface anyway), but I do get sync for
"unread" and "flagged" (gmail and Android "starred= "). You'll need
maildir.synchronize_flags =3D true in your ~/.notmuch-config for this.
<= /blockquote>

I'm using a similar setup.=A0 An inconvenien= ce with the setup is that I have various filters in gmail that filter, e.g.= , mailing list mails by skipping the gmail inbox and applying specific tags= .=A0 As a result when I look at my gmail inbox, I don't see these (many= ) mailing list messages.=A0 With offlineimap+notmuch, however, since it jus= t gets all the messages from [Gmail]/All Mail, it has no way of distinguish= ing between these two classes of messages, and so the notmuch new and unrea= d message lists contain many messages that I don't want to look at.=A0 = Ideally, I'd like a view in notmuch that shows the same messages as the= gmail inbox.=A0 Is there a way to accomplish this?<= font color=3D"#888888">
- b

=A0

> Many people around here do that using offlineimap, which will
> synchronise an IMAP server (Gmail in this instance) with various local=
> directories in Maildir format.

I use offlineimap. I run it from the notmuch pre-new hook. This means= I
have to run "notmuch new" to receive new mail.

$ cat ~/.maildir/.notmuch/hooks/pre-new
#!/bin/sh
exec /usr/bin/offlineimap

I only sync "All Mail" from gmail. Perhaps there would be some optimizations that could be done, but I haven't bothered yet.

$ cat ~/.offlineimaprc
[general]
accounts =3D Gmail
ui =3D Noninteractive.Basic

[Account Gmail]
localrepository =3D Local
remoterepository =3D Remote

[Repository Local]
type =3D Maildir
localfolders =3D ~/.maildir

[Repository Remote]
type =3D IMAP
ssl =3D yes
remotehost =3D imap.gma= il.com
remoteuser =3D USER@gma= il.com
expunge =3D no
realdelete =3D no

folderfilter =3D lambda foldername: foldername in ['[Gmail]/All Mail= 9;]
nametrans =3D lambda foldername: re.sub('^\[Gmail\]/All Mail', '= ;gmail', foldername)

> Sending mail via Gmail can be done in various ways. You can set up you= r
> local MTA (Postfix, Exim, ...) to deliver mail via Gmail, or have Emac= s
> do the same directly using the smtpmail.el package.

Personally I use msmtp (msmtp and msmtp-mta packages in Debian based<= br> distros). The msmtp-mta sets up a sendmail-like binary that works out of the box in Emacs. Beware that it doesn't have a local queue, it works synchronously.

$ cat ~/.msmtprc
defaults
logfile ~/.msmtp.log
tls_trust_file /etc/ssl/certs/ca-certificates.crt

account default
host smtp.gmail.com=
from USER@gmail.com=
tls on
tls_starttls off
auth on
user USER@gmail.com=

Finally, I use goobook to use the gmail contacts as addressbook in
Emacs. See http://mid.gmane.org/87zkfuh3i0.fsf@nikula.org for that.

HTH,
Jani.
_______________________________________________
notmuch mailing list
notmuch@notmuc= hmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


--14dae934084b2b06f104b86fa194--