Hi Jerry,

You are right ... This is what happens when you drag and drop an e-mail
in thunderbid from folder A to B :

 1 : Client receive a mail in folder A . The mail is identified by the
pair ( mailbox path + uid ). Mailbox path ( or mailbox Id ) is folder
specific. Uid is a long, per mailbox generated. It makes no sens alone.
Let say we have ( A : 36 ).

 2 : You perform the drag and drop

 3 : Thunderbird issue a UID COPY command.

 4 : So you have the exact same mail in B, let say ( B : 42 ).

 5 : James dispatch a Added event for ( B : 42 ) ( Here we don't know
where this mail came from )

 6 : Your client perform a UID EXPUNGE command on ( A : 36 ).

 7 : ( A : 36 ) is deleted

 8 : You have de delete event for ( A : 36 ) ( Here we don't know where
this mail came from )

Note that the events I quoted you triggers IDLE operation, and
thunderbird gets aware of what is happening. Then it reads ( B : 42 )
and displays it.

Well, to sum up :

 - You do not have global e-mail identifier that survives copy.
 - You can not base such a feature on event

So what can you do ?

If I were you, I would do this :

 1 : to choose a MAILBOX implementation ( the one your client want to
use ? ),
  2 : generate an value on mapper's add operation  ( either a long (if
you want it sorted) or a UUID. )

 3 : Provides a custom message implementation with an accessor on this
value.

 3.5 : Every where in your mapper you need to use this new message type.

 4 : Upon message mapper copy calls, you cast the copied message into
your message type, and copy the field without modiffying it.

 5 : Here we are ( not that this value may not be unic as message can
get copied but not deleted ). You can just build it, and replaces the
old jar for your MAILBOX implementation with the new one, and restart
your James server ( yes it works ). Note : update the db schemas before
restarting James ;-)

Note that you do not need more : such a feature can not be accessed over
IMAP, but you can read it using an other application. So your are
commpelled to access it threw your mail's storage ( you said it was no
problem ... )

Don't worry, such a feature is not that hard to implement.

Drawbacks : you may have to merge it with other James releases. ( Or get
it accepted in the project ? ).


Hope it helps,

Benoit


Le 13/03/2015 16:50, Jerry Malcolm a écrit :
> This is somewhat an IMAP question.  But also a JAMES implementation
> question.  My client has a massive amount of mail that must be kept and
> accessed.  They use Thunderbird and Outlook to do the normal mail
> handling stuff.  No problems at all on the client side.  But on the back
> end, I need to sort and organize and keep track of emails and be able to
> pull them up using a web interface on demand, completely independent of
> folders that they may currently be in.  In other words, I need to keep
> track of 'email x' and be able to find it at a later time no matter how
> many times the user moves it from folder to folder.
> 
> I believe I understand the philosophy of IMAP for the client is to find
> a folder, display the contents, refresh periodically and add/remove mail
> from its records for that folder as contents change.  Basically if the
> user moves a mail item from one folder to another, the first folder
> recognizes it's no longer there, and is done with it.  The other folder
> subsequently realizes it has a new email item and displays it.  But
> there is no knowledge that this is the same email.  Have I got it pretty
> much correct?
> 
> So... I realize I may be stretching/bending the intent of IMAP.  But
> that doesn't diminish the fact that I have the requirement.  I've dug
> through all of the database table schemas for JAMES and have a pretty
> good handle on how mail is stored and tracked internally. But I may have
> missed something.  So my main question is.... is there a way for me to
> permanently track an email item and be able to locate it at some point
> down the road even if it's been moved around folders several times? 
> Basically, is there a global unique ID for every email stored?  BTW....
> I'm not bound by having to use only IMAP.  I have no problem at all
> back-dooring to the JAMES database and writing code to use SQL to track
> through the database tables to find the email.  I just don't think there
> is anything unique/unchangeable that will allow me to permanently track
> a particular email.
> 
> Am I totally off the wall in considering something like this?  Seems a
> complete waste to have to duplicate a hundred gigs of mail data for my
> own archive when JAMES has a perfectly good copy of everything.
> 
> Suggestions?
> 
> Thanks.
> 
> Jerry
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
> For additional commands, e-mail: server-user-h...@james.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to