GMail labels sync - what and how?

Rainer M Krug Rainer at krugs.de
Tue Feb 10 10:30:21 GMT 2015


First of all thanks a lot for your very helpful explanations and
clarifications - the whole process is much clearer to me now!

Abdó Roig-Maranges <abdo.roig at gmail.com> writes:

> Hi,
>
>
>> I am looking for some information about the GMail label sync and how I
>> can use the synched labels.
>
> On the man page (under the heading USE CASES) there is an example of such
> configuration.

They don't seem to be installed using homebrew (OS X) - I'll follow this
up.

>
> What this settings will do is sync the gmail labels into a special header
> embedded into the email (it modifies the raw message for that).

Hm.

>
> Then you can use this extra data locally the way you want. Write scripts to
> autotag messages, index your message and search for tags, etc.

OK - understood.

>
> One note of warning though, chose the header for the labels labels right the
> first time. If you need to change it afterwards, you will have to move your
> labels manually to the new header.
>
> This choice depends on how you will use your labels locally. Some email clients
> recognize X-Keywords (the default) some recognize X-Labels, and some simply are
> not aware of it. The X-Gmail-Keywords written in the man page example is not
> recognized by anybody, as far as I know.
>
>
>
>> 0) Generally: What do I have to do to have my GMAil labels synched and how can
>> I use them locally? Is there any information on the offlineimap.org site? Do I
>> have to use the GmailMaildir local backend
>
> To sync them, you need to use GmailMaildir locally, yes, Gmail remotely, and set
> synclabels = yes on the account section. Also configure the labelsheader right
> for your use case. Look at the example on the man page.

OK. But I can't find this example online?

>
>
>> and notmuch to utilise these synced labels?
>
> I'm not sure about notmuch. Notmuch keeps its own tags in the external index,

That's what I like about it - I use it mainly for indexing and searching
my email.

> and some time ago it didn't know about X-Keywords or similar non-standard email
> headers. I was a notmuch user, and moved away for exactly this reason. I wanted
> the labels in the message, not in the index. I use mu4e now. I think mutt picks
> up X-Keywords or X-Label, but I'm not sure, and have no idea about gnus.

No problem.

>
>
>> 1) I use dovecot as my local imap and sync all folders from gmail to
>> dovecot (Even All Mail...). This gives me the possibility to do
>> deletions, moving, tagging and so on from Gnus and have it synched back
>> to GMail.
>
> Well, several simplifications occur to me.
>
> 1. if you use an email client that handles well Maildir folders, you can get rid
>    of your local dovecot.

I thought about that (and I think gnus does) but I rather prefer to have
my emails locally in an "imap format" (in my case handled by dovecot) so
that I can access them from essentially all mail clients - past, present
and future (hopefully).

>
>    Also, if you plan on using labels, an email client that indexes your email,
>    like notmuch or mu4e do, would improve things a lot. If you have tons of
>    email with labels, but have no index, the labels will be quite useless. And
>    for that you need to access the Maildir directly, not through dovecot.
>
> 2. If labels are in place, and your email is indexed, Then you can just sync
>    "All Mail", and navigate your email via searches by label, like you do on
>    gmail. 
>
>
>
>> Can this synching be simplified by synching e.g. only All Mail
>> and have the emails put into multiple local imap folders if they have
>> multiple tags?
>
> The point of the label syncing is to get rid of the folders and use searches by
> label, and this pretty much requires email indexing. If you are happy with the
> "label-as-folders" thing from gmail's IMAP, then the label syncing stuff will
> not give you much.

That's what I thought as well. I am so used to gnus now (and happy with
it), that I don't feel like trying something else out. I will then stick
to the normal gmail - local imap sync of the folders I want to sync and
just keep the duplicate messages. As I archive them to my local imap, I
don't have that many.

Thanks again for your clarifications,

Rainer


>
>
> Abdó Roig.
>
> _______________________________________________
> OfflineIMAP-project mailing list: OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
> OfflineIMAP homepages:
> - https://github.com/OfflineIMAP
> - http://offlineimap.org

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20150210/501f9aa1/attachment-0003.sig>


More information about the OfflineIMAP-project mailing list