When installing Qmail and Courier-IMAP, everything works fine except when mail is delivered directly to a shared folder; only the owner of the shared Maildir can see the messages.
The reason is that the delivered message has ownership "user.user" and privileges 0600, instead of the ownership and privileges of the shared Maildir. For instance, if the messages are shared with all members of group "shared", the Maildir will be created with ownership "user.shared" and privileges "0770".
Several quick-and-dirty solutions exist, most of them use inbox rules, procmail or some other hack to move messages from a temporary folder into the shared folder. None of them are fast and reliable enough to use in a production environment in our opinion. Which is why we came up with our own solution: