unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* gmail label support patch available for oflineimap
@ 2012-11-26 12:23 Rainer M Krug
  2012-11-26 14:44 ` David Bremner
  0 siblings, 1 reply; 26+ messages in thread
From: Rainer M Krug @ 2012-11-26 12:23 UTC (permalink / raw)
  To: notmuch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

there is a patch available for synching gmail labels to X-Keywords in the message (full thread see
http://article.gmane.org/gmane.mail.imap.offlineimap.general/5943 ).

Would notmuch be able to translate these X-Keywords into tags, so that one could use notmuch and
it's tags as gmail uses the labels?

Cheers,

Rainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCzX0oACgkQoYgNqgF2egqfnwCfbWG9pwy77eYFrqJ68R+TiNNu
7dQAn0ZgLphHw7SqV7jzqJFk9qpa3Bzm
=Nuwb
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-26 12:23 gmail label support patch available for oflineimap Rainer M Krug
@ 2012-11-26 14:44 ` David Bremner
  2012-11-26 15:13   ` Rainer M Krug
  0 siblings, 1 reply; 26+ messages in thread
From: David Bremner @ 2012-11-26 14:44 UTC (permalink / raw)
  To: Rainer M Krug, notmuch

Rainer M Krug <R.M.Krug@gmail.com> writes:

> there is a patch available for synching gmail labels to X-Keywords in
> the message (full thread see
> http://article.gmane.org/gmane.mail.imap.offlineimap.general/5943 ).
>
> Would notmuch be able to translate these X-Keywords into tags, so that
> one could use notmuch and it's tags as gmail uses the labels?

Reading tags from X-Keywords would be a Simple Matter of Programming
(TM), although you'd have to be sure you could trust that header as
injected by you and not some evil adversary.  There would also be some
questions about forwarding such messages (e.g. should the X-Labels be
stripped when forwarding).  

I expect there would be some resistance to writing X-Labels back to
message files, since having read-only message files is more or less a
design goal. 

In summary, it could probably be done, but I'm not sure it would be a
better approach than interfacing directly with gmail via their extended
IMAP interface.  Personally, if I was interested in solving this
problem, I'd be more interested in a solution that didn't wed me to
offline imap, if the two solutions were in the same rough ballpark of
effort. The direct method would also not modify mail messages. Still,
others might feel differently.

The notion of storing labels in messages has been mooted before as a
general synching solution. That might make it more interesting to me.

d

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-26 14:44 ` David Bremner
@ 2012-11-26 15:13   ` Rainer M Krug
  2012-11-26 17:49     ` David Bremner
  0 siblings, 1 reply; 26+ messages in thread
From: Rainer M Krug @ 2012-11-26 15:13 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/11/12 15:44, David Bremner wrote:
> Rainer M Krug <R.M.Krug@gmail.com> writes:
> 
>> there is a patch available for synching gmail labels to X-Keywords in the message (full
>> thread see http://article.gmane.org/gmane.mail.imap.offlineimap.general/5943 ).
>> 
>> Would notmuch be able to translate these X-Keywords into tags, so that one could use notmuch
>> and it's tags as gmail uses the labels?
> 
> Reading tags from X-Keywords would be a Simple Matter of Programming (TM), although you'd have
> to be sure you could trust that header as injected by you and not some evil adversary.  There
> would also be some questions about forwarding such messages (e.g. should the X-Labels be 
> stripped when forwarding).

Good points - haven't considered them yet.

> 
> I expect there would be some resistance to writing X-Labels back to message files, since having
> read-only message files is more or less a design goal.

That I definitely agree and  don't like that much.

> 
> In summary, it could probably be done, but I'm not sure it would be a better approach than
> interfacing directly with gmail via their extended IMAP interface.  Personally, if I was
> interested in solving this problem, I'd be more interested in a solution that didn't wed me to 
> offline imap, if the two solutions were in the same rough ballpark of effort. The direct method
> would also not modify mail messages. Still, others might feel differently.

But wouldn't this go above notmuch as an email tagging and indexing tool? OK - from emacs one can
send emails and it is a fully fledged email client, but it does *only interact* with the maildir
and it's tag database. Adding a layer to communicate with a remote server (gmail in this case)
would defy the purpose of having notmuch. In my opinion, Synching from gmail to local maildir
should be done by another tool, and this synching includes the synching of the gmail labels.

Cheers,

Rainer

> 
> The notion of storing labels in messages has been mooted before as a general synching solution.
> That might make it more interesting to me.
> 
> d
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCzhxoACgkQoYgNqgF2egoNXQCfSZk7f+gzZKWabFVs3y5hyI62
tKQAmwVHaOI2pv8PIHCK1DDUX4FmMhi1
=p5xm
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-26 15:13   ` Rainer M Krug
@ 2012-11-26 17:49     ` David Bremner
  2012-11-27  9:21       ` Rainer M Krug
  0 siblings, 1 reply; 26+ messages in thread
From: David Bremner @ 2012-11-26 17:49 UTC (permalink / raw)
  To: Rainer; +Cc: notmuch

Rainer M Krug <r.m.krug@gmail.com> writes:

> Adding a layer to communicate with a remote server (gmail in this
> case) would defy the purpose of having notmuch. In my opinion,
> Synching from gmail to local maildir should be done by another tool,
> and this synching includes the synching of the gmail labels.

Well, the labels need to be synched with the notmuch database so the
choice is between "extend notmuch + use offline imap" or "extend notmuch
in a different way".  It's true that re-inventing (a specialized version
of) offline imap seems less than ideal.

In the wild speculation department, since the feature is still in
development on the the offlineimap side, maybe offlineimap can be
convinced to work with a kind of sidecar file containing tag
information.  I think people have speculated about serializing the
notmuch database in (something like) that way before.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-26 17:49     ` David Bremner
@ 2012-11-27  9:21       ` Rainer M Krug
  2012-11-27 17:00         ` Michal Nazarewicz
  0 siblings, 1 reply; 26+ messages in thread
From: Rainer M Krug @ 2012-11-27  9:21 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch, Rainer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/11/12 18:49, David Bremner wrote:
> Rainer M Krug <r.m.krug@gmail.com> writes:
> 
>> Adding a layer to communicate with a remote server (gmail in this case) would defy the
>> purpose of having notmuch. In my opinion, Synching from gmail to local maildir should be done
>> by another tool, and this synching includes the synching of the gmail labels.
> 
> Well, the labels need to be synched with the notmuch database so the choice is between "extend
> notmuch + use offline imap" or "extend notmuch in a different way".  It's true that
> re-inventing (a specialized version of) offline imap seems less than ideal.

So from your point of view - what would be the best / most consistent approach with gmail? Sync
All Mail folder (and Inbox) with offlineimap and sync the label information via notmuch? Would
definitely seem to make sense, as it deals with labels on the gmail side which is nothing
different to tags in notmuch.
But then this would have to be a kind of tag-sync with gmail.

> 
> In the wild speculation department, since the feature is still in development on the the
> offlineimap side, maybe offlineimap can be convinced to work with a kind of sidecar file
> containing tag information.  I think people have speculated about serializing the notmuch
> database in (something like) that way before.

As I understand it, the person who implemented it as a patch uses mu / mue and there it works with
the X-headers approach, so I think he will stick with it.

But I definitely share your concerns about modifying the emails itself.

Cheers,

Rainer

> 
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC0hicACgkQoYgNqgF2egp06ACfVkaNUmqbwSuXBjrpS3GpDDgn
AwsAoId8pSGsy05CaYee83OLZcnkpYIU
=QgrG
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27  9:21       ` Rainer M Krug
@ 2012-11-27 17:00         ` Michal Nazarewicz
  2012-11-27 19:07           ` Rainer M Krug
  0 siblings, 1 reply; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-27 17:00 UTC (permalink / raw)
  To: Rainer M Krug, David Bremner; +Cc: notmuch, Rainer

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

On Tue, Nov 27 2012, Rainer M Krug wrote:
> So from your point of view - what would be the best / most consistent
> approach with gmail? Sync All Mail folder (and Inbox) with offlineimap
> and sync the label information via notmuch? Would definitely seem to
> make sense, as it deals with labels on the gmail side which is nothing
> different to tags in notmuch.

So why do we need the offlineimap step here? In the scenario you've
described, notmuch needs to speak IMAP, than why can't it just download
the mail all together.

> But I definitely share your concerns about modifying the emails itself.

Big deal.  Email headers are modified all the time by various pieces of
software.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27 17:00         ` Michal Nazarewicz
@ 2012-11-27 19:07           ` Rainer M Krug
  2012-11-27 19:24             ` Michal Nazarewicz
  0 siblings, 1 reply; 26+ messages in thread
From: Rainer M Krug @ 2012-11-27 19:07 UTC (permalink / raw)
  To: Michal Nazarewicz; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

On 27 November 2012 18:00, Michal Nazarewicz <mina86@mina86.com> wrote:

> On Tue, Nov 27 2012, Rainer M Krug wrote:
> > So from your point of view - what would be the best / most consistent
> > approach with gmail? Sync All Mail folder (and Inbox) with offlineimap
> > and sync the label information via notmuch? Would definitely seem to
> > make sense, as it deals with labels on the gmail side which is nothing
> > different to tags in notmuch.
>
> So why do we need the offlineimap step here? In the scenario you've
> described, notmuch needs to speak IMAP, than why can't it just download
> the mail all together.
>

Yes - offlineimap is not needed actually, but I personally I see notmuch as
an indexing / tagging program for a mailabox in maildir format, which means
local. So all changes are done locally, and not bad on an imap server (or
synching tags with an imap server). This would be the job for offlineimap.
But actually I don't care which program is doing it.


>
> > But I definitely share your concerns about modifying the emails itself.
>
> Big deal.  Email headers are modified all the time by various pieces of
> software.
>

Well - it is ust my feeling that the lesser changes are done to the email
and its headers, the better.

Cheers,

Rainer



>
> --
> Best regards,                                         _     _
> .o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
> ..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
> ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
>
>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax (F):       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

[-- Attachment #2: Type: text/html, Size: 3105 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27 19:07           ` Rainer M Krug
@ 2012-11-27 19:24             ` Michal Nazarewicz
  2012-11-27 19:32               ` Rainer M Krug
  2012-11-28 11:11               ` Tomi Ollila
  0 siblings, 2 replies; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-27 19:24 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

On Tue, Nov 27 2012, Rainer M Krug wrote:
> Yes - offlineimap is not needed actually, but I personally I see
> notmuch as an indexing / tagging program for a mailabox in maildir
> format, which means local. So all changes are done locally, and not
> bad on an imap server (or synching tags with an imap server). This
> would be the job for offlineimap.  But actually I don't care which
> program is doing it.

I'm actually completely lost now, since I've realised you're also OP,
and it was my understanding that you proposed to use offlineimap to get
the tags, save them in the X-something header, and make notmuch index
those.  But now you're saying that offlineimap is not needed?  I must be
missing something.

> Well - it is ust my feeling that the lesser changes are done to the
> email and its headers, the better.

Sure, but I don't think it's such a big issue, as it may be presented.
If there was some better, not much more difficult, option, than sure,
but otherwise, I think it's a good solution.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27 19:24             ` Michal Nazarewicz
@ 2012-11-27 19:32               ` Rainer M Krug
  2012-11-27 20:01                 ` Michal Nazarewicz
  2012-11-28 11:11               ` Tomi Ollila
  1 sibling, 1 reply; 26+ messages in thread
From: Rainer M Krug @ 2012-11-27 19:32 UTC (permalink / raw)
  To: Michal Nazarewicz; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 2549 bytes --]

On 27 November 2012 20:24, Michal Nazarewicz <mina86@mina86.com> wrote:

> On Tue, Nov 27 2012, Rainer M Krug wrote:
> > Yes - offlineimap is not needed actually, but I personally I see
> > notmuch as an indexing / tagging program for a mailabox in maildir
> > format, which means local. So all changes are done locally, and not
> > bad on an imap server (or synching tags with an imap server). This
> > would be the job for offlineimap.  But actually I don't care which
> > program is doing it.
>
> I'm actually completely lost now, since I've realised you're also OP,
> and it was my understanding that you proposed to use offlineimap to get
> the tags, save them in the X-something header, and make notmuch index
> those.  But now you're saying that offlineimap is not needed?  I must be
> missing something.
>

I saw on the offlineimap mailing list, that somebody is using this approach
(x-header) to sync the gmail labels and to use them in his email client -
so I thought, why not read them as tags into notmuch and sync tgs back, so
one would have a sync between notmuch tags and gmail labels. But there was
some objections and it was questioned why offlineimap for this, and not
notmuch - and frankly, I don't hava any preferences. If it is i[plemented
in offlineimap and notmuch uses it, fine with me. If offlineimap stays as
it is and notmuch reads the labels directly, absolutely no problem. I am
merely intersted in the outcome - sync of notmuch tags with gmail labels -
whatever the path is.


> > Well - it is ust my feeling that the lesser changes are done to the
> > email and its headers, the better.
>
> Sure, but I don't think it's such a big issue, as it may be presented.
> If there was some better, not much more difficult, option, than sure,
> but otherwise, I think it's a good solution.
>


>
> --
> Best regards,                                         _     _
> .o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
> ..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
> ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
>
>
>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax (F):       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

[-- Attachment #2: Type: text/html, Size: 3708 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27 19:32               ` Rainer M Krug
@ 2012-11-27 20:01                 ` Michal Nazarewicz
  2012-11-28  7:32                   ` Rainer M Krug
  0 siblings, 1 reply; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-27 20:01 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

On Tue, Nov 27 2012, Rainer M Krug wrote:
> I saw on the offlineimap mailing list, that somebody is using this approach
> (x-header) to sync the gmail labels and to use them in his email client -
> so I thought, why not read them as tags into notmuch and sync tgs back, so
> one would have a sync between notmuch tags and gmail labels. But there was
> some objections and it was questioned why offlineimap for this, and not
> notmuch - and frankly, I don't hava any preferences. If it is i[plemented
> in offlineimap and notmuch uses it, fine with me. If offlineimap stays as
> it is and notmuch reads the labels directly, absolutely no problem. I am
> merely intersted in the outcome - sync of notmuch tags with gmail labels -
> whatever the path is.

Ah, OK.

I just want to say that having notmuch communicate with Gmail is
terrible idea, since this would mean duplicating of jobs that
offlineimap and notmuch do.

I could see some *other* tool, besides notmuch and offlineimap, which
connects to Gmail to fetch the tags, but that would again duplicate
a lot of the code from offlineimap.

I think that communicating with the server should be left to
offlineimap (or whatever other method one uses), and indexing should be
left to notmuch.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27 20:01                 ` Michal Nazarewicz
@ 2012-11-28  7:32                   ` Rainer M Krug
  2012-11-28 10:10                     ` Felipe Contreras
  0 siblings, 1 reply; 26+ messages in thread
From: Rainer M Krug @ 2012-11-28  7:32 UTC (permalink / raw)
  To: Michal Nazarewicz; +Cc: notmuch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/11/12 21:01, Michal Nazarewicz wrote:
> On Tue, Nov 27 2012, Rainer M Krug wrote:
>> I saw on the offlineimap mailing list, that somebody is using this approach (x-header) to
>> sync the gmail labels and to use them in his email client - so I thought, why not read them
>> as tags into notmuch and sync tgs back, so one would have a sync between notmuch tags and
>> gmail labels. But there was some objections and it was questioned why offlineimap for this,
>> and not notmuch - and frankly, I don't hava any preferences. If it is i[plemented in
>> offlineimap and notmuch uses it, fine with me. If offlineimap stays as it is and notmuch
>> reads the labels directly, absolutely no problem. I am merely intersted in the outcome - sync
>> of notmuch tags with gmail labels - whatever the path is.
> 
> Ah, OK.
> 
> I just want to say that having notmuch communicate with Gmail is terrible idea, since this
> would mean duplicating of jobs that offlineimap and notmuch do.

My sentiments, notmuch is doing realy good what it is doing, and adding gmail / other server
communication is not the best idea.

> 
> I could see some *other* tool, besides notmuch and offlineimap, which connects to Gmail to
> fetch the tags, but that would again duplicate a lot of the code from offlineimap.

I also agree here - offlineimap already has a repository type Gmail, and if gmails imap
extensions, particularly
https://developers.google.com/google-apps/gmail/imap_extensions#access_to_gmail_labels_x-gm-labels
is used, it should be not to difficult to read the labels and to store them in e.g. a sqlite
database for each message id. This could then be written back as well, and only the [GMAIL] folder
would have to be synchronised, i.e. no duplication.

> 
> I think that communicating with the server should be left to offlineimap (or whatever other
> method one uses), and indexing should be left to notmuch.

agree here as well. Will approach the offlineimap comuity about this again.

Cheers,

Rainer


> 
> 
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC1vf4ACgkQoYgNqgF2egpYwACeOAMKZHIZURAOmbUqN6D86BQy
zCUAn2NfekMjnJ1KCqdRjgs01BQlxn44
=VynC
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28  7:32                   ` Rainer M Krug
@ 2012-11-28 10:10                     ` Felipe Contreras
  2012-11-28 11:29                       ` Jani Nikula
  2012-11-28 12:53                       ` Michal Nazarewicz
  0 siblings, 2 replies; 26+ messages in thread
From: Felipe Contreras @ 2012-11-28 10:10 UTC (permalink / raw)
  To: Rainer; +Cc: notmuch

On Wed, Nov 28, 2012 at 8:32 AM, Rainer M Krug <r.m.krug@gmail.com> wrote:

>> I just want to say that having notmuch communicate with Gmail is terrible idea, since this
>> would mean duplicating of jobs that offlineimap and notmuch do.
>
> My sentiments, notmuch is doing realy good what it is doing, and adding gmail / other server
> communication is not the best idea.

And I disagree.

>> I could see some *other* tool, besides notmuch and offlineimap, which connects to Gmail to
>> fetch the tags, but that would again duplicate a lot of the code from offlineimap.
>
> I also agree here - offlineimap already has a repository type Gmail, and if gmails imap
> extensions, particularly
> https://developers.google.com/google-apps/gmail/imap_extensions#access_to_gmail_labels_x-gm-labels
> is used, it should be not to difficult to read the labels and to store them in e.g. a sqlite
> database for each message id. This could then be written back as well, and only the [GMAIL] folder
> would have to be synchronised, i.e. no duplication.

Not everybody uses offlineimap.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-27 19:24             ` Michal Nazarewicz
  2012-11-27 19:32               ` Rainer M Krug
@ 2012-11-28 11:11               ` Tomi Ollila
  2012-11-28 12:56                 ` Michal Nazarewicz
  1 sibling, 1 reply; 26+ messages in thread
From: Tomi Ollila @ 2012-11-28 11:11 UTC (permalink / raw)
  To: Michal Nazarewicz, Rainer M Krug; +Cc: notmuch

On Tue, Nov 27 2012, Michal Nazarewicz wrote:

> On Tue, Nov 27 2012, Rainer M Krug wrote:

...

>> Well - it is ust my feeling that the lesser changes are done to the
>> email and its headers, the better.
>
> Sure, but I don't think it's such a big issue, as it may be presented.
> If there was some better, not much more difficult, option, than sure,
> but otherwise, I think it's a good solution.

I could not find it in the docs (looked wiki mainly) but one of the 
principles notmuch currently operates that the *contents* of the email
files it reads are not ever modified. i.e. the email files are read-only
from notmuch (cli) point of view.

I don't think this is going to change in pure notmuch cli...

I personally find this feature specially handy as I store my emails
to files named by the md5sum of the file content -- I can check integrity
by the files easily if those are never modified. 

Example poll "log" at the end of this mail to show my usage
in action...

Tomi

> -- 
> Best regards,                                         _     _
> .o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
> ..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
> ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--_____

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

$ mm new
+ ./nottoomuch/mbox-to-md5names.sh movemail
Using MDA /home/too/mail/nottoomuch/maildeliver-md5names.sh
Using formail /usr/bin/formail
Using movemail /data/uswa/x86_64-linux/a/emacs/24.2/libexec/emacs/24.2/x86_64-unknown-linux-gnu/movemail
Using mail file /var/spool/mail/too
Working directory: /home/too/mail
2012-11-28 (Wed) 10:11:31: Added 'received/d2/6aacb8723e1416afaa18b02f21532f'
2012-11-28 (Wed) 10:11:31: Added 'received/9e/686b18691ea4ee0adaf9bf6445ac48'
2012-11-28 (Wed) 10:11:31: Added 'received/f5/14c94c806d91608e4b5eba51794848'
Mbox content backupped in 'wip/mbox-50b5c733,SIda'
+ notmuch new --verbose
1/0: /home/too/mail/mails/received/9e/686b18691ea4ee0adaf9bf6445ac48
2/0: /home/too/mail/mails/received/d2/6aacb8723e1416afaa18b02f21532f
3/0: /home/too/mail/mails/received/f5/14c94c806d91608e4b5eba51794848
4/0: /home/too/mail/mails/sent/cur/1354089625.21484_505843_2.guru.guru-group.fi:2,S
5/0: /home/too/mail/mails/sent/cur/1354089659.21484_967518_3.guru.guru-group.fi:2,S
6/0: /home/too/mail/mails/sent/cur/1354089912.21484_891554_4.guru.guru-group.fi:2,S
Processed 6 total files in almost no time.
Added 3 new messages to the database.
0.146s user 0.157s system 54.95% cpu 0.551s total
+ exit

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 10:10                     ` Felipe Contreras
@ 2012-11-28 11:29                       ` Jani Nikula
  2012-11-28 23:33                         ` Felipe Contreras
  2012-11-28 12:53                       ` Michal Nazarewicz
  1 sibling, 1 reply; 26+ messages in thread
From: Jani Nikula @ 2012-11-28 11:29 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: Notmuch Mail, Rainer

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

On Nov 28, 2012 12:10 PM, "Felipe Contreras" <felipe.contreras@gmail.com>
wrote:
>
> On Wed, Nov 28, 2012 at 8:32 AM, Rainer M Krug <r.m.krug@gmail.com> wrote:
>
> >> I just want to say that having notmuch communicate with Gmail is
terrible idea, since this
> >> would mean duplicating of jobs that offlineimap and notmuch do.
> >
> > My sentiments, notmuch is doing realy good what it is doing, and adding
gmail / other server
> > communication is not the best idea.
>
> And I disagree.

Which part do you disagree with, before or after "and", or both? Care to
elaborate, in either case? Any concrete suggestions?

BR,
Jani.

[-- Attachment #2: Type: text/html, Size: 870 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 10:10                     ` Felipe Contreras
  2012-11-28 11:29                       ` Jani Nikula
@ 2012-11-28 12:53                       ` Michal Nazarewicz
  2012-11-28 23:34                         ` Felipe Contreras
  1 sibling, 1 reply; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-28 12:53 UTC (permalink / raw)
  To: Felipe Contreras, Rainer; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On Wed, Nov 28 2012, Felipe Contreras wrote:
> Not everybody uses offlineimap.

Go nag developers of whatever you are using to implement fetching labels
from Gmail.  Or write another tool that does that.  Either way,
communicating with Gmail is not notmuch's job.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 11:11               ` Tomi Ollila
@ 2012-11-28 12:56                 ` Michal Nazarewicz
  2012-11-28 16:45                   ` David Bremner
  0 siblings, 1 reply; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-28 12:56 UTC (permalink / raw)
  To: Tomi Ollila, Rainer M Krug; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

On Wed, Nov 28 2012, Tomi Ollila wrote:
> I could not find it in the docs (looked wiki mainly) but one of the 
> principles notmuch currently operates that the *contents* of the email
> files it reads are not ever modified. i.e. the email files are read-only
> from notmuch (cli) point of view.

This is only a problem if you want to modify the labels in the email and
sync them back to Gmail though, right?

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 12:56                 ` Michal Nazarewicz
@ 2012-11-28 16:45                   ` David Bremner
  2012-11-28 18:39                     ` Michal Nazarewicz
  0 siblings, 1 reply; 26+ messages in thread
From: David Bremner @ 2012-11-28 16:45 UTC (permalink / raw)
  To: Michal Nazarewicz, Tomi Ollila, Rainer M Krug; +Cc: notmuch

Michal Nazarewicz <mina86@mina86.com> writes:

> On Wed, Nov 28 2012, Tomi Ollila wrote:
>> I could not find it in the docs (looked wiki mainly) but one of the 
>> principles notmuch currently operates that the *contents* of the email
>> files it reads are not ever modified. i.e. the email files are read-only
>> from notmuch (cli) point of view.
>
> This is only a problem if you want to modify the labels in the email and
> sync them back to Gmail though, right?

Right. But without that, the whole thing could be scripted pretty easily
I think, just parse the x-labels header and use notmuch-deliver or
something like that.

d

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 16:45                   ` David Bremner
@ 2012-11-28 18:39                     ` Michal Nazarewicz
  2012-11-29  9:06                       ` Rainer M Krug
  0 siblings, 1 reply; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-28 18:39 UTC (permalink / raw)
  To: David Bremner, Tomi Ollila, Rainer M Krug; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

On Wed, Nov 28 2012, David Bremner wrote:
> Right. But without that, the whole thing could be scripted pretty easily
> I think, just parse the x-labels header and use notmuch-deliver or
> something like that.

You're saying to get offlineimap to add the x-labels header and than
have another simple tool which parses that header from the messages,
rather than adding code to notmuch?  Sounds sensible to me.

There were same patches regarding batch tagging so those could be used
nicely for that approach.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 11:29                       ` Jani Nikula
@ 2012-11-28 23:33                         ` Felipe Contreras
  2012-11-29  5:01                           ` Jeremy Nickurak
  2012-11-29 13:26                           ` Michal Nazarewicz
  0 siblings, 2 replies; 26+ messages in thread
From: Felipe Contreras @ 2012-11-28 23:33 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Notmuch Mail, Rainer

On Wed, Nov 28, 2012 at 12:29 PM, Jani Nikula <jani@nikula.org> wrote:
>
> On Nov 28, 2012 12:10 PM, "Felipe Contreras" <felipe.contreras@gmail.com>
> wrote:
>>
>> On Wed, Nov 28, 2012 at 8:32 AM, Rainer M Krug <r.m.krug@gmail.com> wrote:
>>
>> >> I just want to say that having notmuch communicate with Gmail is
>> >> terrible idea, since this
>> >> would mean duplicating of jobs that offlineimap and notmuch do.
>> >
>> > My sentiments, notmuch is doing realy good what it is doing, and adding
>> > gmail / other server
>> > communication is not the best idea.
>>
>> And I disagree.
>
> Which part do you disagree with, before or after "and", or both? Care to
> elaborate, in either case? Any concrete suggestions?

After the "and" of course :)

I think it would be trivial to add Gmail-style folders to notmuch.
Maybe a configuration that maps directories with tags. This in fact
wouldn't even be Gmail specific, and would help the people coming from
procmail, and other ways of organizing mail.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 12:53                       ` Michal Nazarewicz
@ 2012-11-28 23:34                         ` Felipe Contreras
  2012-11-29 13:24                           ` Michal Nazarewicz
  0 siblings, 1 reply; 26+ messages in thread
From: Felipe Contreras @ 2012-11-28 23:34 UTC (permalink / raw)
  To: Michal Nazarewicz; +Cc: notmuch, Rainer

On Wed, Nov 28, 2012 at 1:53 PM, Michal Nazarewicz <mina86@mina86.com> wrote:
> On Wed, Nov 28 2012, Felipe Contreras wrote:
>> Not everybody uses offlineimap.
>
> Go nag developers of whatever you are using to implement fetching labels
> from Gmail.  Or write another tool that does that.

Why do that when I can do it in notmuch?

> Either way, communicating with Gmail is not notmuch's job.

Who said anything like that?

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 23:33                         ` Felipe Contreras
@ 2012-11-29  5:01                           ` Jeremy Nickurak
  2012-11-29  7:18                             ` Felipe Contreras
  2012-11-29 13:26                           ` Michal Nazarewicz
  1 sibling, 1 reply; 26+ messages in thread
From: Jeremy Nickurak @ 2012-11-29  5:01 UTC (permalink / raw)
  To: Notmuch Mail

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

Doing this on a directory basis is a non-starter for me. The reason that
Notmuch and gmail are a natural fit is that they both operate on
labels/tags instead of folders.

[-- Attachment #2: Type: text/html, Size: 239 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-29  5:01                           ` Jeremy Nickurak
@ 2012-11-29  7:18                             ` Felipe Contreras
  2012-11-29  9:02                               ` Rainer M Krug
  0 siblings, 1 reply; 26+ messages in thread
From: Felipe Contreras @ 2012-11-29  7:18 UTC (permalink / raw)
  To: Jeremy Nickurak; +Cc: Notmuch Mail

On Thu, Nov 29, 2012 at 6:01 AM, Jeremy Nickurak
<not-much@trk.nickurak.ca> wrote:
> Doing this on a directory basis is a non-starter for me. The reason that
> Notmuch and gmail are a natural fit is that they both operate on labels/tags
> instead of folders.

There's no simpler way if you are using IMAP and Maildir, and there
are no better alternatives.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-29  7:18                             ` Felipe Contreras
@ 2012-11-29  9:02                               ` Rainer M Krug
  0 siblings, 0 replies; 26+ messages in thread
From: Rainer M Krug @ 2012-11-29  9:02 UTC (permalink / raw)
  To: notmuch; +Cc: Jeremy Nickurak, Notmuch Mail

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/11/12 08:18, Felipe Contreras wrote:
> On Thu, Nov 29, 2012 at 6:01 AM, Jeremy Nickurak 
> <not-much@trk.nickurak.ca> wrote:
>> Doing this on a directory basis is a non-starter for me. The reason that Notmuch and gmail
>> are a natural fit is that they both operate on labels/tags instead of folders.
> 
> There's no simpler way if you are using IMAP and Maildir, and there are no better
> alternatives.
> 
I only mention emails with no labels (i.e. only in "All Mail") and emails which have labels. To
get the first emails, you have to sync "All Emails", which leads to duplicate (or even more)
emails when they have two or more labels - not ideal, as it eats up HDD space (you could argue
"cheap") and bandwidth when synching (not cheap everywhere...).

Cheers,

Rainer

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC3JKQACgkQoYgNqgF2egrYKQCfbkiIdRsBYB3YhWMZnitzieaa
ELwAn29RxwZ7pbTkDYlo7RvWGZtuC/Mc
=OAmy
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 18:39                     ` Michal Nazarewicz
@ 2012-11-29  9:06                       ` Rainer M Krug
  0 siblings, 0 replies; 26+ messages in thread
From: Rainer M Krug @ 2012-11-29  9:06 UTC (permalink / raw)
  To: notmuch
  Cc: David Bremner, Tomi Ollila, Rainer M Krug,
	public-notmuch-gxuj+Tv9EO5zyzON3hdc1g

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/11/12 19:39, Michal Nazarewicz wrote:
> On Wed, Nov 28 2012, David Bremner wrote:
>> Right. But without that, the whole thing could be scripted pretty easily I think, just parse
>> the x-labels header and use notmuch-deliver or something like that.
> 
> You're saying to get offlineimap to add the x-labels header and than have another simple tool
> which parses that header from the messages, rather than adding code to notmuch?  Sounds
> sensible to me.
> 
> There were same patches regarding batch tagging so those could be used nicely for that
> approach.
> 
True - and nice for archiving emails. But I think the sync would be tremendiously useful. And as
in another email noted by Jeremy Nickurak, gmail and notmuch are a perfect match as they both
operate on labels / tags, and not on folders. This is in contrast to mu, for which the gmail
labels are just another search term and not differentiated from any other terms.

Cheers,

Rainer



> 
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC3JbAACgkQoYgNqgF2egqLfQCfY75jMOk2VZZ7/1Qzfjt0+xPs
L5QAn0nhmuJ8ta1tlNYvxR+KHwp2szvb
=uLII
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 23:34                         ` Felipe Contreras
@ 2012-11-29 13:24                           ` Michal Nazarewicz
  0 siblings, 0 replies; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-29 13:24 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: notmuch, Rainer

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

> On Wed, Nov 28, 2012 at 1:53 PM, Michal Nazarewicz <mina86@mina86.com> wrote:
>> Go nag developers of whatever you are using to implement fetching labels
>> from Gmail.  Or write another tool that does that.

On Thu, Nov 29 2012, Felipe Contreras <felipe.contreras@gmail.com> wrote:
> Why do that when I can do it in notmuch?

Because you cannot.  Notmuch does not talk with the server.

>> Either way, communicating with Gmail is not notmuch's job.

> Who said anything like that?

So what are you saying?

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: gmail label support patch available for oflineimap
  2012-11-28 23:33                         ` Felipe Contreras
  2012-11-29  5:01                           ` Jeremy Nickurak
@ 2012-11-29 13:26                           ` Michal Nazarewicz
  1 sibling, 0 replies; 26+ messages in thread
From: Michal Nazarewicz @ 2012-11-29 13:26 UTC (permalink / raw)
  To: Felipe Contreras, Jani Nikula; +Cc: Notmuch Mail, Rainer

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

On Thu, Nov 29 2012, Felipe Contreras wrote:
> I think it would be trivial to add Gmail-style folders to notmuch.
> Maybe a configuration that maps directories with tags. This in fact
> wouldn't even be Gmail specific, and would help the people coming from
> procmail, and other ways of organizing mail.

The issue is not of how notmuch indexes stuff.  The issue is with how
notmuch is made aware of Gmail labels.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2012-11-29 13:26 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 12:23 gmail label support patch available for oflineimap Rainer M Krug
2012-11-26 14:44 ` David Bremner
2012-11-26 15:13   ` Rainer M Krug
2012-11-26 17:49     ` David Bremner
2012-11-27  9:21       ` Rainer M Krug
2012-11-27 17:00         ` Michal Nazarewicz
2012-11-27 19:07           ` Rainer M Krug
2012-11-27 19:24             ` Michal Nazarewicz
2012-11-27 19:32               ` Rainer M Krug
2012-11-27 20:01                 ` Michal Nazarewicz
2012-11-28  7:32                   ` Rainer M Krug
2012-11-28 10:10                     ` Felipe Contreras
2012-11-28 11:29                       ` Jani Nikula
2012-11-28 23:33                         ` Felipe Contreras
2012-11-29  5:01                           ` Jeremy Nickurak
2012-11-29  7:18                             ` Felipe Contreras
2012-11-29  9:02                               ` Rainer M Krug
2012-11-29 13:26                           ` Michal Nazarewicz
2012-11-28 12:53                       ` Michal Nazarewicz
2012-11-28 23:34                         ` Felipe Contreras
2012-11-29 13:24                           ` Michal Nazarewicz
2012-11-28 11:11               ` Tomi Ollila
2012-11-28 12:56                 ` Michal Nazarewicz
2012-11-28 16:45                   ` David Bremner
2012-11-28 18:39                     ` Michal Nazarewicz
2012-11-29  9:06                       ` Rainer M Krug

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).