How can I handle this:
We have a Email system based on DOVECOT IMAP, different users, different logins.
I want to somehow rsync all sent folders of some users, so one user can check what another user have written for example to customers. The sent emails should copy to the sent folder of each user designated.
The basic idea is that every user should be able to look in his sent folder to see what he or other have written to the customer. What the customer writes and goes to the INBOX should not be synced. Because the customer may address different topics to each user.
So if the customer address to user1 something, user2 does not need to get in copy. But if the user1 address something to the customer it should be synced to the send folder of the 27 users.
I know this uses a lot of disk space.
I want in the end to have the SENT email of user1, user2 ... usern mixed in all sent folders of this users. I do not want to use a shared folder because that is dangerous, one user can by mistake delete the originals.
So we will need to two-way rsync /home/user1/mail/sent/cur with /home/user2/mail/sent/cur and /home/user1/mail/sent/new with /home/user2/mail/sent/new, what means
rsync -rtu --delete /home/user1/mail/sent/cur /home/user2/mail/sent/cur
rsync -rtu --delete /home/user1/mail/sent/new /home/user2/mail/sent/new
The first problem is how to solve it when I have 27 users?
The second problem are the rights. How can I rsync in a way that the Imap rights are in a way that the copied emails should belong to the owner of the mailbox they are synced to? (Dovecot does not change the rights)
The third problem is that the headers should preserve.
UPDATE 1 I do NOT want to create common folders with ACLs and read write access and reconfigure MUAs to use them as sent folder. This my be the more elegant and complicate solution, but I don't want it.
UPDATE 2 A blind BCC solution is suboptimal because it put the sent emails in the other users INBOX and it changes the headers.