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.


  • 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

  • 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, 2011 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, 2011 at 23:39
  • @JohnFx @Jeff O I've update the question for some clarity. Thanks.
    – Paystey
    Jun 7, 2011 at 23:50
  • Dogbert the Zen master?
    – Drew
    Jun 8, 2011 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. Jun 14, 2011 at 12:13

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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