Koozali.org: home of the SME Server

how to permit manager to access e-mail from users

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: how to permit manager to access e-mail from users
« Reply #15 on: February 02, 2012, 12:27:47 PM »
That sounds interesting... but just for received e-mail... outgoing e-mail wouldn't be stored that way.
But if someone is out sick or on vaca, they probably aren't sending emails?

let us to know if you have good results.
I got distracted and forgot to finish this post:
I tried to figure out how to setup shared email folders using symlinks and permissions and dovecot-shared, but all I did was break my email completely through incorrect application of file and folder rights.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: how to permit manager to access e-mail from users
« Reply #16 on: February 02, 2012, 01:27:34 PM »
But if someone is out sick or on vaca, they probably aren't sending emails?
True! But manager do not have access to any information he/she send previously! So is not a thread... it's just like ear one side of talking!
Quote
I got distracted and forgot to finish this post:
I tried to figure out how to setup shared email folders using symlinks and permissions and dovecot-shared, but all I did was break my email completely through incorrect application of file and folder rights.
Hum... so it's not an option... I'd prefer take my chances with Zarafa! :D
...

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: how to permit manager to access e-mail from users
« Reply #17 on: February 02, 2012, 03:15:49 PM »
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:
Code: [Select]
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':
Code: [Select]
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:
Code: [Select]
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.