[Dovecot-de] Probleme beim Setzen von ACL/Shared Folder

Thomas Robers -TuTech Innovation gmbH robers at tutech.de
Di Aug 19 12:16:22 CEST 2014


Am 04.08.2014 um 17:37 schrieb Philipp Faeustlin:
[...]
>>
>> root at mail: doveadm acl set -u userA at tutech.de INBOX userB at tutech.de all
>> doveadm(userA at tutech.de): Fatal: Invalid ID: userB at tutech.de
> 
> doveadm acl set -u userA at tutech.de INBOX user=userB at tutech.de lookup
> read write write-seen write-deleted insert expunge create ...
> 
> Ja steht nur sehr versteckt, hab auch lange gebraucht bis ich es
> gefunden hatte:
> http://wiki2.dovecot.org/ACL
> ACL files -> "Where identifier is one of: ..."
> 
> Ich hab die Rechte auch aus der Tabelle (auf der gleichen Seite)
> kopiert, weil bei mir weder "all" noch "lrw..." funktioniert hat.

Hallo Philipp,

vielen Dank für den Tipp, da mit funktioniert es auch das Setzen
der ACL.

Leider kann ich aber nach dem Setzen der ACL, keine freigegebenen
Ordner abonnieren. Ich habe mittels:

  doveadm mailbox list -u userA "INBOX/*" | while read mailbox; do
  doveadm acl set -u userA "$mailbox" user=userB admin create delete
  expunge insert lookup post read write write-deleted write-seen;
  done

das komplette Postfach von userA für userB freigegeben, aber
Benutzer userB kann nichts bzw nichts sinnvolles abonnieren.

Es gibt die Datei(en) dovecot-acl bzw dovecot-acl-list, aber ein
doveadm acl debug liefert:

  root at mail:~# doveadm acl debug -u userA INBOX
  doveadm(it): Info: Mailbox 'INBOX' is in namespace 'INBOX/'
  doveadm(it): Info: Mailbox path: /export/home/imap/userA
  doveadm(it): Info: All message flags are shared across users in mailbox
  doveadm(it): Info: User userA has rights: lookup read write
  write-seen write-deleted insert post expunge create delete admin
  doveadm(it): Info: Mailbox in user's private namespace
  doveadm(it): Info: Mailbox INBOX is visible in LIST

D.h. der Benutzer userB hat danach keinen Zugriff, aber die Datei
/export/home/imap/it/dovecot-acl hat den Inhalt:

  user=userB akxeilprwts

und ein telnet ergibt:

  * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN]
  Dovecot ready.
  a1 login userB *********
  a1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY
  THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT
  CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES
  WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE COMPRESS=DEFLATE ACL RIGHTS=texk]
  Logged in
  a2 getacl shared/userA
  * ACL shared/userA userB akxeilprwtscd
  a2 OK Getacl completed.
  a3 list "" "shared/userA"
  * LIST (\HasChildren) "/" shared/userA
  a3 OK List completed.
  a4 list "" "shared/userA*"
  * LIST (\HasChildren) "/" shared/userA
  * LIST (\HasNoChildren) "/" shared/userA/Trash
  a4 OK List completed.
  a5 select shared/userA
  * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
  * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
  Flags permitted.
  * 0 EXISTS
  * 0 RECENT
  * OK [UIDVALIDITY 1408436440] UIDs valid
  * OK [UIDNEXT 1] Predicted next UID
  * OK [HIGHESTMODSEQ 1] Highest
  a5 OK [READ-WRITE] Select completed (0.000 secs).

Danach hat userB auf den Eingang und den Ordner Trash Zugriff und diese
lassen sich in Thunderbird z.B. auch abonnieren, allerdings sind dann
beide leer, was nicht der Fall ist (im Posteingang von userA liegen
ca 1400 Nachrichten).

Das Log meint dazu:

  Aug 19 11:22:09 mail dovecot: auth: Debug: userdb out: USER#0111#011it#011home=/export/home/imap
  /userA#011uid=10000#011gid=10000
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: auth input: userA home=/export/home/imap/userA
  uid=10000 gid=10000
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: maildir++: root=/export/home/imap/userA
  /Maildir, index=/export/home/imap/userB/shared/userA, indexpvt=,control=/export/home/imap/userB
  /shared/userA, inbox=/export/home/imap/userA/Maildir, alt=
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl: initializing backend with data: vfile
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl: acl username = userA
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl: owner = 1
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl vfile: Global ACLs disabled
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: maildir++: root=/export/home/imap/userA
  /Maildir, index=/export/home/imap/userB/shared/userA, indexpvt=, control=/export/home/imap/userB
  /shared/userA, inbox=/export/home/imap/userA/Maildir, alt=
  ug 19 11:22:09 mail dovecot: imap(userB): Debug: acl: initializing backend with data: vfile
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl: acl username = userB
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl: owner = 0
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl vfile: Global ACLs disabled
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl vfile: reading file /export/home/imap/userA
  /Maildir/dovecot-acl
  Aug 19 11:22:09 mail dovecot: imap(userB): Debug: acl vfile: file /export/home/imap/userA/Maildir
  /.Trash/dovecot-acl not found
  Aug 19 11:22:10 mail dovecot: auth: Debug: master in: USER#0112#011shared#011service=imap
  Aug 19 11:22:10 mail dovecot: auth: Debug: ldap(shared): user search:
  base=OU=Mailuser,DC=extern,DC=tutech,DC=de scope=subtree filter=(&(objectClass=Person)
  (sAMAccountName=shared)) fields=
  Aug 19 11:22:10 mail dovecot: auth: Debug: ldap(shared): no fields returned by the server
  Aug 19 11:22:10 mail dovecot: auth: ldap(shared): unknown user
  Aug 19 11:22:10 mail dovecot: auth: Debug: userdb out: NOTFOUND#0112
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: auth input:
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: shared: Tried to access mails of nonexistent
  user shared
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: maildir++: root=/var/run/dovecot/user-not-found
  /shared, index=, indexpvt=, control=, inbox=/var/run/dovecot/user-not-found/shared, alt=
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: Namespace :/var/run/dovecot/user-not-found
  /shared doesn't exist yet, using default permissions
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: Namespace : Using permissions from /var/run
  /dovecot/user-not-found/shared: mode=0700 gid=default
  Aug 19 11:22:10 mail dovecot: auth: Debug: master in: USER#0113#011shared#011service=imap
  Aug 19 11:22:10 mail dovecot: auth: Debug: ldap(shared): user search:
  base=OU=Mailuser,DC=extern,DC=tutech,DC=de scope=subtree filter=(&(objectClass=Person)
  (sAMAccountName=shared)) fields=
  Aug 19 11:22:10 mail dovecot: auth: Debug: ldap(shared): no fields returned by the server
  Aug 19 11:22:10 mail dovecot: auth: ldap(shared): unknown user
  Aug 19 11:22:10 mail dovecot: auth: Debug: userdb out: NOTFOUND#0113
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: auth input:
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: shared: Tried to access mails of nonexistent
  user shared
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: maildir++: root=/var/run/dovecot/user-not-found
  /shared, index=, indexpvt=, control=, inbox=/var/run/dovecot/user-not-found/shared, alt=
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: Namespace :/var/run/dovecot/user-not-found
  /shared doesn't exist yet, using default permissions
  Aug 19 11:22:10 mail dovecot: imap(userB): Debug: Namespace : Using permissions from /var/run
  /dovecot/user-not-found/shared: mode=0700 gid=default
  Aug 19 11:22:40 mail dovecot: auth: Debug: auth client connected (pid=21459)

Dovecot versucht einen Benutzer "shared" zu authentifizieren, den es nicht gibt, warum verstehe
ich nicht. Ebenso verstehe ich nicht, dass ich zwar als userB den Posteingang abonnieren
kann, der aber leer ist und den Ordner "Trash", aber keine anderen Ordner?

Authentifiziert werden die Benutzer gegen ein Samba4 AD und dies funkioniert einwandfrei
ebenso wie Dovecot einwandfrei funktioniert bis auf die shared folder.

Kann mir jemand einen Hinweis geben, wo ich nach dem Fehler suchen muss, den ich
bei der Konfiguration mache?

Ich bin für jeden Hinweis dankbar.

Gruß
Thomas Robers


Mehr Informationen über die Mailingliste Dovecot