Bug 46749

Summary: Posix permissions are wrong after changing a users e-mail address
Product: UCS Reporter: Nico Stöckigt <stoeckigt>
Component: Mail - DovecotAssignee: Mail maintainers <mail-maintainers>
Status: RESOLVED WONTFIX QA Contact: Mail maintainers <mail-maintainers>
Severity: normal    
Priority: P5 CC: troeder
Version: UCS 4.3   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.069 Enterprise Customer affected?: Yes
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: 2018032721000434 Bug group (optional):
Max CVSS v3 score:
Bug Depends on: 38458    
Bug Blocks:    

Description Nico Stöckigt univentionstaff 2018-03-27 13:25:50 CEST
When changing the users 'primaryMailAddress' the LDAP attribute is correctly changed, the mailfolder is correctly changed but the ownership changes to 'nobody:nogroup' which results in

 - the quota could not be calculated
 - in some situations no e-mails can be delivered to that mailbox

The ownership allways needs to be 'dovemail:dovemail'
Comment 1 Daniel Tröder univentionstaff 2018-03-27 14:07:14 CEST
Please provide more information about the setup.
I cannot reproduce the problem:

root@m60:~# udm users/user list --filter uid=test1 | grep mailPrimaryAddress
  mailPrimaryAddress: test1mail@uni.dtr
--------------------------------------------------------------------------
root@m60:~# ucr search --verbose mail/dovecot/mailbox/rename
mail/dovecot/mailbox/rename: <empty>
--------------------------------------------------------------------------
root@m60:~# ls -l /var/spool/dovecot/private/uni.dtr/
insgesamt 4
drwx--S--- 4 dovemail dovemail 4096 Mär 27 13:59 test1mail
--------------------------------------------------------------------------
root@m60:~# udm users/user modify --dn uid=test1,cn=users,dc=uni,dc=dtr --set mailPrimaryAddress=test1new@uni.dtr
Object modified: uid=test1,cn=users,dc=uni,dc=dtr
--------------------------------------------------------------------------
root@m60:~# udm users/user list --filter uid=test1 | grep mailPrimaryAddress
  mailPrimaryAddress: test1new@uni.dtr
--------------------------------------------------------------------------
root@m60:~# ls -l /var/spool/dovecot/private/uni.dtr/
insgesamt 8
drwx--S--- 4 dovemail dovemail 4096 Mär 27 13:59 test1mail
drwx--S--- 4 dovemail dovemail 4096 Mär 27 14:01 test1new
--------------------------------------------------------------------------
root@m60:~# ucr set mail/dovecot/mailbox/rename=yes
--------------------------------------------------------------------------
root@m60:~# service univention-directory-listener restart
--------------------------------------------------------------------------
root@m60:~# udm users/user modify --dn uid=test1,cn=users,dc=uni,dc=dtr --set mailPrimaryAddress=test1newer@uni.dtr
Object modified: uid=test1,cn=users,dc=uni,dc=dtr
--------------------------------------------------------------------------
root@m60:~# ls -l /var/spool/dovecot/private/uni.dtr/
insgesamt 8
drwx--S--- 4 dovemail dovemail 4096 Mär 27 13:59 test1mail
drwx--S--- 4 dovemail dovemail 4096 Mär 27 14:01 test1newer
Comment 2 Daniel Tröder univentionstaff 2018-03-27 15:28:37 CEST
When changing the domain:

root@m60:~# ls -l /var/spool/dovecot/private/uni.dtr/
insgesamt 8
drwx--S--- 4 dovemail dovemail 4096 Mär 27 13:59 test1mail
drwx--S--- 4 dovemail dovemail 4096 Mär 27 14:01 test1newer
--------------------------------------------------------------------------
root@m60:~# udm users/user modify --dn uid=test1,cn=users,dc=uni,dc=dtr --set mailPrimaryAddress=test1newer@exam.ple
Object modified: uid=test1,cn=users,dc=uni,dc=dtr
--------------------------------------------------------------------------
root@m60:~# ls -l /var/spool/dovecot/private/exam.ple/
insgesamt 4
drwx--S--- 4 dovemail dovemail 4096 Mär 27 14:01 test1newer
Comment 3 Ingo Steuwer univentionstaff 2021-05-14 15:43:00 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.