[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] Query for largest msg_id?



Is there a way to query Heliotrope what is the largest msg_id
currently in the index? I am trying to improve the imap-dumper.rb so
it does not download all my emails every time but only the new ones.
>From rfc4549.txt (see section 4.3.1) I learned that the way to do this
is to FETCH all the messages from [ lastknownmsg_id + 1 : * ]. This
will give the ids of all messages added to the server after the last
sync. Reading the source code I could not find a way to query this
value.

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.


regards
Horacio
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel