* gmail syncing sort of working
@ 2011-08-18 2:31 Alex Botero-Lowry
2011-08-18 7:33 ` Sebastian Spaeth
2011-09-05 15:12 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Alex Botero-Lowry @ 2011-08-18 2:31 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
I finally got around to working on it and over the last two days have gotten
two-way gmail syncing with labels working.
The list of caveats is much longer than the list of details:
1) only tested with 100 messages, which is hard coded
2) doesn't update UIDs of messages on disk, though it mostly avoids
situations where that would be an issue
3) Can only do a full, scan every file sync, but it assumes that message
content is immutable so only adds new messages
4) Doesn't support syncing new/deleted messages from notmuch -> gmail (not
sure this is worth the trouble)
5) Quoting issues, i'm sure.
The basic approach is to get the difference between a the last sync and the
current notmuch state, sync the diff of labels to gmail, than we request
UID, X-GM-MSGID, Message-ID, and X-GM-LABELS from gmail for every message,
if it lacks a message-id we build a notmuch-sha1- one, hopefully that
approach won't change, we then write new messages to disk by using the
filename GMID=...,UID=.... to store that information, and then sync the
labels (with a mapping for special labels like sent, etc), then we look for
messages that have changed in gmail but not changed locally, and sync their
labels.
I'm sure it won't work for you, but you might try it. :)
source is at http://alexbl.net/~alexbl/imapsync.py
p.s. I also ran into an issue with the notmuch python bindings where I had
to wrap every c_void_p in POINTER() or it would segfault for any method that
tried to use a pointer. Also the sed command that tries to build notmuch.sym
doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
work on linux anymore. :) I wonder if using ctags might actually work for
that.
alex
[-- Attachment #2: Type: text/html, Size: 2026 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gmail syncing sort of working
2011-08-18 2:31 gmail syncing sort of working Alex Botero-Lowry
@ 2011-08-18 7:33 ` Sebastian Spaeth
2011-09-05 15:12 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Spaeth @ 2011-08-18 7:33 UTC (permalink / raw)
To: Alex Botero-Lowry, notmuch
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On Wed, 17 Aug 2011 19:31:36 -0700, Alex Botero-Lowry <alex.boterolowry@gmail.com> wrote:
> p.s. I also ran into an issue with the notmuch python bindings where I had
> to wrap every c_void_p in POINTER() or it would segfault for any method that
> tried to use a pointer. Also the sed command that tries to build notmuch.sym
> doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
> work on linux anymore. :) I wonder if using ctags might actually work for
> that.
Can someone with experience on python's ctypes comment on that? I read
the terse documentation and tutorial on ctypes, and it doesn't say that
one shouldn't be able to use c_void_p as a pointer, and it doesn't
really say how using POINTER could change things (it seems to create a
new pointer type, but I fail to see why that should help?)
That having said, if you provide a patch, I'll be applying it if it
fixes things.
Sebastian
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gmail syncing sort of working
2011-08-18 2:31 gmail syncing sort of working Alex Botero-Lowry
2011-08-18 7:33 ` Sebastian Spaeth
@ 2011-09-05 15:12 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2011-09-05 15:12 UTC (permalink / raw)
To: Alex Botero-Lowry, notmuch
On Wed, 17 Aug 2011 19:31:36 -0700, Alex Botero-Lowry <alex.boterolowry@gmail.com> wrote:
> p.s. I also ran into an issue with the notmuch python bindings where I had
> to wrap every c_void_p in POINTER() or it would segfault for any method that
> tried to use a pointer. Also the sed command that tries to build notmuch.sym
> doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
> work on linux anymore. :) I wonder if using ctags might actually work for
> that.
Please test current git master on freebsd for issues with building
notmuch.sym, there are several BSD oriented fixes lately.
I don't know ctags well, but I would be surprised if it can do the hairy
stuff with exceptions that we seem to need.
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-05 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 2:31 gmail syncing sort of working Alex Botero-Lowry
2011-08-18 7:33 ` Sebastian Spaeth
2011-09-05 15:12 ` David Bremner
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).