Univention Bugzilla – Bug 38458
Dovecot account rename support
Last modified: 2018-03-27 13:25:50 CEST
Listener module should move the home directory, when a mailPrimaryAddress changes. Sieve scripts should live inside the home directory.
The mail home is moved by a listener module (dovecot.py). SIEVE scripts are saved in the mail home, on the same level as the Maildir. If the source dir is missing or the target dir exists already, nothing is done. Commits: 60611, 60645, 60648, 60726
Commit 60742 adds the option to not rename the mailbox if the email address changes. New UCRV "mail/dovecot/mailbox/rename" mirrors the behaviour of mail/cyrus/mailbox/rename.
Tested manually (especially sieve scripts) and automatically → 42_dovecot_rename_mail_primary_address → modification of the primary mail address with all combinations of …/rename and …/delete → 42_dovecot_rename_user → modification of the username
42_dovecot_rename_user currently fails → REOPEN. The pam cache does not get invalidated when a user is renamed (modrdn). Possible fix: --- a/component/dovecot/univention-mail-dovecot/dovecot.py +++ b/component/dovecot/univention-mail-dovecot/dovecot.py @@ -106,6 +106,12 @@ def handler(dn, new, old, command): return elif command == 'a': old = load_old(old) + try: + listener.setuid(0) + listener.run('/usr/bin/doveadm', ["/usr/bin/doveadm", "auth", "cache", "flush"], uid=0) + finally: + listener.unsetuid() + listener.configRegistry.load() dl = DovecotUserListener(listener, name)
Commit 61723 applies proposed patch.
(In reply to Daniel Tröder from comment #5) > Commit 61723 applies proposed patch. → OK → VERIFIED
<http://errata.univention.de/ucs/4.0/237.html>