Re: IMAP UID uniqueness question

2012-08-21 Thread Joshua Armstrong
On 8/18/2012 5:27 AM, Eric Charles wrote: Hi, We tackle distributed UID generation via https://issues.apache.org/jira/browse/MAILBOX-103 We have a first snapshot implementation (undocumented) with UID generated by a Zookeeper Ensemble in https://svn.apache.org/repos/asf/james/mailbox/trunk/

Re: IMAP UID uniqueness question

2012-08-18 Thread Eric Charles
Hi, We tackle distributed UID generation via https://issues.apache.org/jira/browse/MAILBOX-103 We have a first snapshot implementation (undocumented) with UID generated by a Zookeeper Ensemble in https://svn.apache.org/repos/asf/james/mailbox/trunk/zoo-seq-provider I understand Joshua is u

Re: IMAP UID uniqueness question

2012-08-18 Thread Eric Charles
On 08/17/2012 08:48 PM, tim wrote: ... (i'm not affiliated with Apache James, just thoughts) In fact, replying on this mailing-list, you are part of the community. So, Welcome! :) On Aug 17, 2012, at 10:58 AM, Joshua Armstrong wrote: Hi, James users. My company is using James to handle

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 4:09 PM, tim wrote: interesting. I think replacing that "getId" with either the embedded message-id or hashing something should work then. No? As long as Apache james generating a new uidvalidity number for each instance of james. I'm assuming it is a random number. The client

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
interesting. I think replacing that "getId" with either the embedded message-id or hashing something should work then. No? As long as Apache james generating a new uidvalidity number for each instance of james. I'm assuming it is a random number. The client should see the new uidvalidity and

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 3:57 PM, tim wrote: does it ever change or is it they same always? I wonder if it is a guid random number, if the client's matches it assumes the backing database has not be refreshed. On Aug 17, 2012, at 4:51 PM, Joshua Armstrong wrote: Each mailbox (folder) has a UIDVALIDITY va

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
does it ever change or is it they same always? I wonder if it is a guid random number, if the client's matches it assumes the backing database has not be refreshed. On Aug 17, 2012, at 4:51 PM, Joshua Armstrong wrote: > On 8/17/2012 3:02 PM, tim wrote: >> Do you know if the standard imap client

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 3:02 PM, tim wrote: Do you know if the standard imap client does a get of uids of the message index? http://tools.ietf.org/html/rfc3501 says there is a uid command. if the client does, the hash thing probably should work, even if the messages are in different orders? -tim A

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 3:02 PM, tim wrote: Do you know if the standard imap client does a get of uids of the message index? http://tools.ietf.org/html/rfc3501 says there is a uid command. if the client does, the hash thing probably should work, even if the messages are in different orders? -tim

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 3:02 PM, tim wrote: Do you know if the standard imap client does a get of uids of the message index? http://tools.ietf.org/html/rfc3501 says there is a uid command. if the client does, the hash thing probably should work, even if the messages are in different orders? -tim A

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 3:02 PM, tim wrote: Do you know if the standard imap client does a get of uids of the message index? http://tools.ietf.org/html/rfc3501 says there is a uid command. if the client does, the hash thing probably should work, even if the messages are in different orders? -tim T

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
Do you know if the standard imap client does a get of uids of the message index? http://tools.ietf.org/html/rfc3501 says there is a uid command. if the client does, the hash thing probably should work, even if the messages are in different orders? -tim On Aug 17, 2012, at 3:49 PM, Joshua Arm

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 2:48 PM, tim wrote: are your servers completely separate, or could they share a database? (guid -> imap id) On Aug 17, 2012, at 3:46 PM, tim wrote: It's a possibility. We're exploring options right now and that's one option. I'm not up on the details though of the database

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 2:46 PM, tim wrote: and the imap client probably does a similar: for (int i=messagesIhaveRecieved;i Yes. That's why the first thing an IMAP client when you ask it to "get a folder/mailbox" is download a list of messages from the server. I have tcpdump output confirming that a s

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
are your servers completely separate, or could they share a database? (guid -> imap id) On Aug 17, 2012, at 3:46 PM, tim wrote: > and the imap client probably does a similar: > > for (int i=messagesIhaveRecieved;i { > //blahblahblah > } > > > > > On Aug 17, 2012, at 3:41 PM, tim wrote:

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
and the imap client probably does a similar: for (int i=messagesIhaveRecieved;i ah i see > > On Aug 17, 2012, at 3:34 PM, Joshua Armstrong wrote: > >> On 8/17/2012 2:29 PM, tim wrote: >>> So this: >>> >>>/** >>> * Method createMail creates a new Mail. >>> * >>> * @param message

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
ah i see On Aug 17, 2012, at 3:34 PM, Joshua Armstrong wrote: > On 8/17/2012 2:29 PM, tim wrote: >> So this: >> >> /** >> * Method createMail creates a new Mail. >> * >> * @param message >> * @param recipient >> * @return Mail >> * @throws MessagingException >>

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 2:39 PM, tim wrote: wait, are imap ids integers or uuid strings? -tim integers -- Joshua M. Armstrong Software Engineer Centurion, Inc. - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For add

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
wait, are imap ids integers or uuid strings? -tim On Aug 17, 2012, at 3:30 PM, tim wrote: > Or no, that's a static getId, that can't be right. > > On Aug 17, 2012, at 3:29 PM, tim wrote: > >> So this: >> >>/** >> * Method createMail creates a new Mail. >> * >> * @param messag

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 2:29 PM, tim wrote: So this: /** * Method createMail creates a new Mail. * * @param message * @param recipient * @return Mail * @throws MessagingException */ protected Mail createMail(MimeMessage message, MailAddress recipient) th

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
Or no, that's a static getId, that can't be right. On Aug 17, 2012, at 3:29 PM, tim wrote: > So this: > > /** > * Method createMail creates a new Mail. > * > * @param message > * @param recipient > * @return Mail > * @throws MessagingException > */ > p

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
So this: /** * Method createMail creates a new Mail. * * @param message * @param recipient * @return Mail * @throws MessagingException */ protected Mail createMail(MimeMessage message, MailAddress recipient) throws MessagingException, UnknownHostExcepti

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 2:08 PM, tim wrote: have you found where in the code james is doing the imap storage? i might need to do this as well at some later date. I believe I have, yes. Mainly in the org.apache.james.fetchmail.FolderProcessor class. It imports all the mechanics from javax.mail and

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
have you found where in the code james is doing the imap storage? i might need to do this as well at some later date. On Aug 17, 2012, at 2:51 PM, Joshua Armstrong wrote: > On 8/17/2012 1:48 PM, tim wrote: >> do the UIDs need to be sequential for imap? >> >> could you hash on the messages' uni

Re: IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
On 8/17/2012 1:48 PM, tim wrote: do the UIDs need to be sequential for imap? could you hash on the messages' unique id header, or the message itself? -tim (i'm not affiliated with Apache James, just thoughts) On Aug 17, 2012, at 10:58 AM, Joshua Armstrong wrote: That's what we were thinking

Re: IMAP UID uniqueness question

2012-08-17 Thread tim
do the UIDs need to be sequential for imap? could you hash on the messages' unique id header, or the message itself? -tim (i'm not affiliated with Apache James, just thoughts) On Aug 17, 2012, at 10:58 AM, Joshua Armstrong wrote: > Hi, James users. > > My company is using James to handle voic

IMAP UID uniqueness question

2012-08-17 Thread Joshua Armstrong
Hi, James users. My company is using James to handle voicemail storage and retrieval and would like to have a multiple server scenario where users can access their messages from either server. We wanted to use IMAP to keep mail synchronized between the servers but we're running to a problem w