Bits and pieces of info on setting up shared email folders using symlinks on SME8beta7:
1) I get errors when creating groups in server-manager, and the new group is not added to /etc/group.
2) After you set permissions on the shared folders, you have to change the primary group for the manager in /etc/passwd
3) Mail is *delivered* by qmail, which still creates all new messages with a umask of 0600, with ownership set to user:user rather than user:primarygroup
Steps I've taken:
- download 'create_dovecot_shares' from
http://www.cpan.org/authors/id/G/GH/GHENRY/create_dovecot_shares-1.07:
cd /usr/local/bin
wget -O create_dovecot_shares http://www.cpan.org/authors/id/G/GH/GHENRY/create_dovecot_shares-1.07
chmod +x create_dovecot_shares
- create 'workgroupa' in server-manager (got an error)
- manually add 'workgroupa' to /etc/group (use
db accounts show workgroupa to get the correct group id number)
- manually change the primary group id number for 'managera' to the value for 'workgroupa' in /etc/passwd (bad idea, I'm sure).
- create the shared folders using 'create_dovecot_shares':
create_dovecot_shares --username=usera,userb,userc --group=workgroupa --share-with=managera --home=/home/e-smith/files/users/ --override
- fix the group and permission settings for existing files for all users:
cd /home/e-smith/files/users
chgrp -R workgroupa usera
chmod -R g+rw usera
chgrp -R workgroupa userb
chmod -R g+rw userb
chgrp -R workgroupa userc
chmod -R g+rw userc
- Kill all running dovecot processes on the server (
ps auxwww |grep dovecot)
Still unresolved:
- new email is still created 'owned' by user:user with permissions of -rw-------
This might be fixable with a cron job that runs through your user folders and re-sets groups and permissions regularly. There may also be a way to do this using qmail, so that new mail is created with the "correct" permissions.
- new folders won't be shared by default
It should be possible to run 'create_dovecot_shares' in a cron job to pick up new folders.
- I suspect there's a "SME Way" to change a user's primary group, rather than adding it manually to /etc/passwd. I have at least confirmed that
signal-event user-modify managera doesn't change the primary group setting in /etc/passwd...
- I don't know if my error creating groups is a general SME8beta7 issue, or if it is specific to my server.