Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm in the process of writing a mail server stack and it's a fairly critical design decision as to whether a unique message can appear in more than one message box. Simple cases are easy to make a decision on (e.g. a message obviously cannot exist in the "Inbox" and the "Trash" mailbox) but a more subtle situation like being in the "Work" mailbox and the "Trash" mailbox is a little trickier.

So:

  • Is it easier to assume clients won't notice if a unique message appears in more than one mailbox, and throw a hissy fit.
  • Or use tagging and only have the message exist in the major mailboxes and use tagging to identify other attributes. In clients that don't support tags (quite a lot), fake the message's uniqueness (not difficult on server end) and display the tags as if they we're their own mailbox
  • Or is it cardinal sin to have a message in multiple mailboxes in the first place.

I'm specifically looking for the broadest possible client friendly solution as I'm making a client independent server.

Unique message = Unique Identifier on the server (alpha numeric usually), all other headers and body components could by freak coincidence, or by hitting send twice in quick succession be duplicated.

If I was to fake the Identifier it would only be to face the client, it would be linked back to the original again on the server for any edits.

Edited for clarity

share|improve this question
1  
Your question only makes sense in the context of a given e-mail client. Which one do you want an answer for? –  JohnFx Jun 7 '11 at 23:38
1  
Depends on your definition of a unique message. If I change my "version" in my mailbox does it become a new message or does everyone see he change? Having the option would be nice, but could get confusing. –  JeffO Jun 7 '11 at 23:39
    
@JohnFx @Jeff O I've update the question for some clarity. Thanks. –  Paystey Jun 7 '11 at 23:50
    
Dogbert the Zen master? –  Andrew Heath Jun 8 '11 at 1:38
    
@JohnFx: not so much a specific client, I'd say, but a specific commuunication protocol between the mail server and the client. –  reinierpost Jun 14 '11 at 12:13
add comment

1 Answer

up vote 3 down vote accepted

So you're wondering if any major imap client that might talk to your server would barf upon seeing the same message-id in multiple folders? Or if they support some tag framework that you can use instead of or in addition to folders? You can check the top clients to be sure: http://www.campaignmonitor.com/stats/email-clients/

But analytically, to clarify what you mean by mailboxes, imap has keywords (your "tags") and it has server-side folders.
A quick test shows that I can have one message saved in multiple server-side imap folders. That message necessarily has just its one message id, so it sounds like you'll have no problem, because all imap clients must be able to support this. For keywords, naturally you will have more than one per message.

The design decision, apparently, should be Yes: a message can appear in multiple mailboxes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.