unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: notmuch@notmuchmail.org,
	Rafael Avila de Espindola <rafael.espindola@gmail.com>
Subject: Re: [gmailieer] fast fetch and two-way tag synchronization between notmuch and GMail
Date: Mon, 27 Mar 2017 05:52:08 +0000	[thread overview]
Message-ID: <1490591813.ujxyjti2et.astroid@strange.none> (raw)
In-Reply-To: <878tnrla97.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-ti ckle-me>

Rafael Avila de Espindola writes on mars 27, 2017 4:32:
> I currently have a mbsync + notmuch setup and I am just about to give
> this a try.
>
> One question is what the notmuch setup should look like. I assume I
> should create a new config file pointing to the directory where the
> emails will be written to. Do I have to run notmuch setup to create the
> db?
>

Yes, it is a good idea to just back up your entire notmuch db and set up
a new one to test gmailieer with.

gmailieer respects $NOTMUCH_CONFIG and reads it to figure out which
'new' tags to add (no need to use inbox or unread here, that will only
create confusion - I only use 'new' to do tagging).

Assuming you want to set up a separate notmuch database to test you do
the following:

first:
    get a client secret API key for gmailieer [0], you only need this
  during setup or if gmailieer needs to be re-authenticated. so store it
  somewhere safe, say: ~/.secret/client_secret.json. ideally this should
  be unnecessary [1].

# setting up a separate notmuch db
$ mkdir ~/test_mail/  # our new mail root
$ cd ~/test_mail
$ export NOTMUCH_CONFIG=$(pwd)/.notmuch-config
$ mkdir mail          # new mail database root
$ notmuch setup
  * specify ~/test_mail/mail as mail database
  * specify only 'new' as new tag
$ notmuch new         # create db
$ cd mail

NOTE: As long as you are using a non-standard notmuch config location make
sure that environment variable is set when using gmailieer.

# setting up gmailieer
$ mkdir gmail
  * this will be the gmailieer local repository.
  * it should be a sub-dir of the root mail db.
  * you can keep other mail (from other accounts) outside this
    gmailieer local repository.
$ cd gmail
$ gmi auth -c ~/.secret/client_secret.json
  * authenticate gmailieer, choose the correct account, say:
    charlie.root@gmail.com
$ gmi init -a charlie.root@gmail.com # gmailieer should now be set up
$ gmi pull # does the initial pull, fetching all you messages - this
           # could take some time.

When you want to synchronize your account you do:
$ gmi sync    # which effectively does gmi push; gmi pull

this will also update the notmuch database so it should not be necessary
to run 'notmuch new' afterwards.

Regards, Gaute

[0] https://console.developers.google.com/flows/enableapi?apiid=gmail
[1] https://github.com/gauteh/gmailieer/issues/1


  parent reply	other threads:[~2017-03-27  5:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 10:55 [gmailieer] fast fetch and two-way tag synchronization between notmuch and GMail Gaute Hope
2017-03-13 13:13 ` David Bremner
2017-03-14 15:51 ` Rafael Avila de Espindola
     [not found]   ` <87k27r26xd.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-ti ckle-me>
2017-03-14 21:15     ` Gaute Hope
2017-03-27  2:32       ` Rafael Avila de Espindola
     [not found]         ` <878tnrla97.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-ti ckle-me>
2017-03-27  5:52           ` Gaute Hope [this message]
2017-03-27 13:23             ` Rafael Espíndola
2017-03-27 13:41               ` Gaute Hope
2017-04-03 14:35 ` Rafael Avila de Espindola
     [not found]   ` <8760ily2wg.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-ti ckle-me>
2017-04-03 14:51     ` Gaute Hope

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490591813.ujxyjti2et.astroid@strange.none \
    --to=eg@gaute.vetsj.com \
    --cc=notmuch@notmuchmail.org \
    --cc=rafael.espindola@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).