From: William Morgan <wmorgan-sup@masanjin.net>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] Query for largest msg_id?
Date: Sun, 15 May 2011 15:01:41 +0000 [thread overview]
Message-ID: <1305471101-sup-6655@masanjin.net> (raw)
In-Reply-To: <BANLkTi=bSNyp+8XFCRpYGojuM8Ub5PjB2A@mail.gmail.com>
Reformatted excerpts from Horacio Sanson's message of 2011-05-10:
> Is there a way to query Heliotrope what is the largest msg_id
> currently in the index?
Sort of---it's a hack, but if you search for e.g. "a OR -a" you'll get
every message in the index, and the first result will be the message
with the highest id thanks to Whistlepig's search semantics.
> I am trying to improve the imap-dumper.rb so
> it does not download all my emails every time but only the new ones.
Sounds great. Unfortunately the Heliotrope message id and the IMAP
message id / message uid are completely different things, and
maintaining a cross-session mapping of them is impossible for generic
IMAP servers, because the uid of every message can change every time you
connect to an IMAP server---see the section on IMAP's 'uidvalidity'
variable. So you'll have to rescan the inbox every time and rebuild the
mapping. Welcome to hell.
> Also while looking at the code I see that messages are stored in the
> index using the msg_id as parsed by RMail. There is no further
> association with the source or mailbox from where the messages were
> downloaded. This I think may cause collisions if we use one Heliotrope
> server with more than one email account. Not sure what is the
> probability of two messages from two different IMAP servers having the
> same msg_id but nothing in the standard rules out that possibility.
This is yet another id: the Message-Id header of the email. This is only
needed to build up the thread structure and should otherwise be ignored.
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next prev parent reply other threads:[~2011-05-15 14:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 15:17 Horacio Sanson
2011-05-15 15:01 ` William Morgan [this message]
2011-05-16 15:02 ` Horacio Sanson
2011-05-17 14:59 ` Horacio Sanson
2011-05-17 15:15 ` Horacio Sanson
2011-05-18 5:05 ` William Morgan
2011-05-20 15:38 ` Horacio Sanson
2011-05-22 22:00 ` William Morgan
2011-05-23 21:22 ` Hamish
2011-05-24 3:16 ` Horacio Sanson
2011-05-18 4:59 ` William Morgan
2011-05-18 20:09 ` Sascha Silbe
2011-05-19 3:14 ` Alvaro Herrera
2011-05-22 22:05 ` William Morgan
2011-05-23 7:52 ` Gaudenz Steinlin
2011-05-23 16:14 ` William Morgan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1305471101-sup-6655@masanjin.net \
--to=wmorgan-sup@masanjin.net \
--cc=sup-devel@rubyforge.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox