Hi Team,
I am trying to setup mailbox sharing. But although user test2 shares
INBOX with test1, it is not visible for user1.
doveadm? acl get -u test2 INBOX
ID???????? Global Rights
user=test1??????? admin create delete expunge insert lookup post read
write write-deleted write-seen
cat /srv/mail/dovecot/lib/shared-mailboxes.db
shared/shared-boxes/user/test1/test2 at example.com
1
Log output:
Feb 16 20:12:42 server dovecot: imap-login: Login:
user=<test1 at example.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1,
mpid=900367, secured, session=<mDkSbyfYotF/AAAB>
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Loading
modules from directory: /usr/lib/dovecot/modules
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib01_acl_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib02_imap_acl_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib15_notify_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib20_fts_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib20_listescape_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib20_push_notification_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib20_zlib_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib21_fts_xapian_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Module
loaded:
/usr/lib/dovecot/modules/lib95_imap_sieve_plugin.so
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug:
Effective
uid=990, gid=986, home=/srv/mail/vmail
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug:
Namespace
inbox: type=private, prefix=, sep=~, inbox=yes, hidden=no, list=yes,
subscriptions=yes
location=maildir:/srv/mail/vmail/example.com/test1/store:LAYOUT=fs:FULLDIRNAME=0_FolderContent:UTF-8:INDEX=/srv/mail/vmail/example.com/test1/index:CONTROL=/srv/mail/vmail/example.com/test1/control:VOLATILEDIR=/srv/mail/vmail/example.com/test1/volatile
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: fs:
root=/srv/mail/vmail/example.com/test1/store,
index=/srv/mail/vmail/example.com/test1/index, indexpvt=,
control=/srv/mail/vmail/example.com/test1/control, inbox=, altFeb 16 20:12:42
server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: acl:
initializing backend with data: vfile
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: Mailbox
INBOX~example.com: Mailbox opened because: SELECT
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Debug: acl
vfile:
file
/srv/mail/vmail/example.com/test1/store/INBOX/example.com/0_FolderContent/dovecot-acl
not found
Feb 16 20:12:42 server dovecot:
imap(test1 at example.com)<900367><mDkSbyfYotF/AAAB>: Logged out
in=136
out=1584 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0
body_count=0 body_bytes=0
Feb 16 20:12:43 server dovecot: imap-login: Login:
user=<test1 at example.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1,
mpid=900369, secured, session=<82gfbyfYuNF/AAAB>
<removed lines>
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug:
Namespace
inbox: type=private, prefix=, sep=~, inbox=yes, hidden=no, list=yes,
subscriptions=yes
location=maildir:/srv/mail/vmail/example.com/test1/store:LAYOUT=fs:FULLDIRNAME=0_FolderContent:UTF-8:INDEX=/srv/mail/vmail/example.com/test1/index:CONTROL=/srv/mail/vmail/example.com/test1/control:VOLATILEDIR=/srv/mail/vmail/example.com/test1/volatile
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: fs:
root=/srv/mail/vmail/example.com/test1/store,
index=/srv/mail/vmail/example.com/test1/index, indexpvt=,
control=/srv/mail/vmail/example.com/test1/control, inbox=, altFeb 16 20:12:43
server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl:
initializing backend with data: vfile
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl:
acl
username = test1 at example.com
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl:
owner = 1
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
Global ACLs disabled
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug:
Namespace :
type=shared, prefix=shared~%u~, sep=~, inbox=no, hidden=no, list=no,
subscriptions=no
location=maildir:/srv/mail/vmail/example.com/%n/store:LAYOUT=fs:FULLDIRNAME=0_FolderContent:UTF-8:INDEXPVT=/srv/mail/vmail/example.com/test1/index_shared/%u:CONTROL=/srv/mail/vmail/example.com/%n/control:VOLATILEDIR=/srv/mail/vmail/example.com/%n/volatile
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: shared:
root=/run/dovecot, index=, indexpvt=, control=, inbox=, altFeb 16 20:12:43
server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: fts:
Indexes
disabled for namespace 'shared~%u~'
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl:
initializing backend with data: vfile
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl:
acl
username = test1 at example.com
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
reading file
/srv/mail/vmail/example.com/test1/store/INBOX/0_FolderContent/dovecot-acl
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
file
/srv/mail/vmail/example.com/test1/store/Drafts/0_FolderContent/dovecot-acl
not found
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
file
/srv/mail/vmail/example.com/test1/store/Junk/0_FolderContent/dovecot-acl
not found
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
file
/srv/mail/vmail/example.com/test1/store/Trash/0_FolderContent/dovecot-acl
not found
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
file
/srv/mail/vmail/example.com/test1/store/Sent/0_FolderContent/dovecot-acl
not found
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug: acl
vfile:
file
/srv/mail/vmail/example.com/test1/store/INBOX/example.com/0_FolderContent/dovecot-acl
not found
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Debug:
Namespace
shared~: Using permissions from : mode=0700 gid=default
Feb 16 20:12:43 server dovecot:
imap(test1 at example.com)<900369><82gfbyfYuNF/AAAB>: Logged out
in=130
out=1518 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0
body_count=0 body_bytes=0
Dovecot -n:
# 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.13 (cdd19fe3)
# OS: Linux 5.10.0-10-amd64 x86_64 Debian 11.2 ext4
# Hostname: server.example.com
auth_default_realm = EXAMPLE.COM
auth_gssapi_hostname = server.example.com
auth_krb5_keytab = /etc/keytab/dovecot.keytab
auth_master_user_separator = *
auth_mechanisms = gssapi gss-spnego plain
auth_realms = EXAMPLE.COM
first_valid_gid = 601
first_valid_uid = 601
hostname = server.example.com
imap_client_workarounds = tb-extra-mailbox-sep
imap_max_line_length = 2 M
login_greeting = Dovecot ready.
mail_debug = yes
mail_gid = 986
mail_location =
maildir:/srv/mail/vmail/example.com/%n/store:LAYOUT=fs:FULLDIRNAME=0_FolderContent:UTF-8:INDEX=/srv/mail/vmail/example.com/%n/index:CONTROL=/srv/mail/vmail/example.com/%n/control:VOLATILEDIR=/srv/mail/vmail/example.com/%n/volatile
mail_plugins = zlib notify push_notification listescape acl
mail_shared_explicit_inbox = yes
mail_uid = 990
namespace {
? hidden = no
? list = no
? location =
maildir:/srv/mail/vmail/example.com/%%n/store:LAYOUT=fs:FULLDIRNAME=0_FolderContent:UTF-8:INDEXPVT=/srv/mail/vmail/example.com/%n/index_shared/%%u:CONTROL=/srv/mail/vmail/example.com/%%n/control:VOLATILEDIR=/srv/mail/vmail/example.com/%%n/volatile
? prefix = shared~%%u~
? separator = ~
? subscriptions = no
? type = shared
}
namespace inbox {
? hidden = no
? inbox = yes
? list = yes
? location ? mailbox Drafts {
??? auto = subscribe
??? special_use = \Drafts
? }
? mailbox Inbox {
??? auto = subscribe
? }
? mailbox Junk {
??? auto = subscribe
??? special_use = \Junk
? }
? mailbox Sent {
??? auto = subscribe
??? special_use = \Sent
? }
? mailbox Trash {
??? auto = subscribe
??? special_use = \Trash
? }
? prefix ? separator = ~
? subscriptions = yes
? type = private
}
passdb {
? args = username_format=%u /etc/dovecot/master-users
? driver = passwd-file
? master = yes
}
passdb {
? args = /etc/dovecot/ldap_user_to_principal.conf.ext
? driver = ldap
? pass = yes
}
passdb {
? args = nopassword=y allow_nets=127.0.0.1/32
? driver = static
}
passdb {
? driver = pam
}
plugin {
? acl = vfile
? acl_defaults_from_inbox = yes
? acl_shared_dict = file:/srv/mail/dovecot/lib/shared-mailboxes.db
? acl_user = %u
? autocreate = Trash
? autocreate2 = Drafts
? autocreate3 = Sent
? autosubscribe = Trash
? autosubscribe2 = Drafts
? autosubscribe3 = Sent
? listescape_char = \
}
postmaster_address = admin at example.com
protocols = " imap lmtp submission"
service auth {
? unix_listener /var/spool/postfix/private/auth {
??? group = postfix
??? mode = 0660
??? user = postfix
? }
}
service imap-login {
? inet_listener imap {
??? port = 0
? }
? inet_listener imap_local {
??? address = 127.0.0.1
??? port = 144
??? ssl = no
? }
? inet_listener imaps {
??? port = 993
??? ssl = yes
? }
? process_min_avail = 1
}
service indexer-worker {
? vsz_limit = 2 G
}
service lmtp {
? unix_listener /var/spool/postfix/private/dovecot-lmtp {
??? group = postfix
??? mode = 0600
??? user = postfix
? }
}
service submission-login {
? inet_listener submission {
??? port = 465
??? ssl = yes
? }
}
ssl = required
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_cipher_list = EECDH+AESGCM:EDH+AESGCM
ssl_client_ca_dir = /etc/ssl/certs
ssl_curve_list = X25519:secp521r1:secp384r1:prime256v1
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
submission_client_workarounds = whitespace-before-path
submission_relay_host = localhost
userdb {
? args = /etc/dovecot/ldap_list_users.conf.ext
? driver = ldap
? result_success = continue
}
userdb {
? args = /etc/dovecot/ldap_user_domain.conf.ext
? driver = ldap
? result_success = continue
}
userdb {
? args = uid=vmail gid=vmail home=/srv/mail/vmail allow_all_users=yes
? driver = static
}
protocol lmtp {
? mail_plugins = zlib notify push_notification listescape acl
}
protocol lda {
? mail_plugins = zlib notify push_notification listescape acl
}
protocol imap {
? mail_max_userip_connections = 50
? mail_plugins = zlib notify push_notification listescape acl imap_acl
}
Is there anything obviously wrong in the config?
I suspect a mismatch between %u and %n somewhere but don't know how to
figure out the culprit.
How can I get more relevant debug log output about namespaces / mailbox
sharing?
Or can I run commands to check validity?
- Kees