Re: Problem with share mailbox

2024-02-05 Thread frederic . fondriest
if i set /var/lib/dovecot with 775 the file is created with user vmail/dovecot 
and is populated... damn why this directory get wrong permission ?!?
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread adminkram

Check directory access perms, it needs to create a lockfile there.

On 2/5/24 11:11, frederic.fondri...@gmail.com wrote:

2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Iterating prefix shared/shared-boxes/
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Iteration finished, got 0 rows
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Starting transaction
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Setting 'shared/shared-boxes/user/yyy/xxx' to '1'
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): Dict 
transaction finished
2024-02-05 11:05:15 imap(xxx)<14156>: Error: acl: dict commit 
failed: dict-file: file_dotlock_open(/var/lib/dovecot/shared-mailboxes.db) failed: 
Permission denied
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: acl vfile: 
reading file /home/vmail/xxx/Maildir/dovecot-acl
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: Mailbox INBOX: 
Mailbox opened

==> permission denied but file is :
root@servmail:/var/lib/dovecot# ls -lh
total 4,0K
-rw-r--r-- 1 root root 113  5 févr. 09:43 instances
-rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxes.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread Aki Tuomi via dovecot

> On 05/02/2024 12:11 EET frederic.fondri...@gmail.com wrote:
> 
>  
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Iterating prefix shared/shared-boxes/
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Iteration finished, got 0 rows
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Starting transaction
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Setting 'shared/shared-boxes/user/yyy/xxx' to '1'
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Dict transaction finished
> 2024-02-05 11:05:15 imap(xxx)<14156>: Error: acl: dict 
> commit failed: dict-file: 
> file_dotlock_open(/var/lib/dovecot/shared-mailboxes.db) failed: Permission 
> denied
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: acl vfile: 
> reading file /home/vmail/xxx/Maildir/dovecot-acl
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: Mailbox INBOX: 
> Mailbox opened
> 
> ==> permission denied but file is :
> root@servmail:/var/lib/dovecot# ls -lh
> total 4,0K
> -rw-r--r-- 1 root root 113  5 févr. 09:43 instances
> -rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxe

Dovecot needs write access to the directory too.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread frederic . fondriest
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Iterating prefix shared/shared-boxes/
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Iteration finished, got 0 rows
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Starting transaction
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
Setting 'shared/shared-boxes/user/yyy/xxx' to '1'
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): Dict 
transaction finished
2024-02-05 11:05:15 imap(xxx)<14156>: Error: acl: dict commit 
failed: dict-file: file_dotlock_open(/var/lib/dovecot/shared-mailboxes.db) 
failed: Permission denied
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: acl vfile: 
reading file /home/vmail/xxx/Maildir/dovecot-acl
2024-02-05 11:05:15 imap(xxx)<14156>: Debug: Mailbox INBOX: 
Mailbox opened

==> permission denied but file is :
root@servmail:/var/lib/dovecot# ls -lh
total 4,0K
-rw-r--r-- 1 root root 113  5 févr. 09:43 instances
-rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxes.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread Aki Tuomi via dovecot

> On 05/02/2024 11:21 EET frederic.fondri...@gmail.com wrote:
> 
>  
> no problem still here :
> 2024-02-05 09:44:12 imap(x)<13848>: Debug: dict(file): 
> dict created (uri=file:/var/lib/dovecot/shared-mailboxes.db, 
> base_dir=/var/run/dovecot)
> 2024-02-05 09:44:12 imap(x)<13848>: Debug: 
> open(/proc/self/io) failed: Permission denied
> 
> root@servmail:/var/lib/dovecot# ls -lh
> total 4,0K
> -rw-r--r-- 1 root root 113  5 févr. 09:43 instances
> -rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxes.db
> ___

I don't instantly see any problem, did you share a folder or what is the output 
from? You can ignore the /proc/self/io debug message.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread frederic . fondriest
no problem still here :
2024-02-05 09:44:12 imap(x)<13848>: Debug: dict(file): 
dict created (uri=file:/var/lib/dovecot/shared-mailboxes.db, 
base_dir=/var/run/dovecot)
2024-02-05 09:44:12 imap(x)<13848>: Debug: 
open(/proc/self/io) failed: Permission denied

root@servmail:/var/lib/dovecot# ls -lh
total 4,0K
-rw-r--r-- 1 root root 113  5 févr. 09:43 instances
-rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxes.db
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread Aki Tuomi via dovecot

> On 05/02/2024 10:36 EET Frédéric FONDRIEST  
> wrote:
> 
>  
> Hi all,
> we get some problems with sharing mailbox between users.
> when we share something the dovecot-acl file is updated, but the
> shared-mailboxes.db file is not created nor updated.
> Even if we create the file and set permission to 777...
> 

Dovecot systemd unit sets PrivateTmp=yes, so /tmp is not persisted.

Use /var/lib/dovecot/shared-mailboxes.db instead.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Problem with share mailbox

2024-02-05 Thread Frédéric FONDRIEST
Hi all,
we get some problems with sharing mailbox between users.
when we share something the dovecot-acl file is updated, but the shared-
mailboxes.db file is not created nor updated.
Even if we create the file and set permission to 777...

strangely the debug log gives  :

2024-02-05 09:29:04 imap(xx)<13741>: Debug: dict(file):
dict created (uri=file:/tmp/shared-mailboxes.db, base_dir=/var/run/dovecot)
2024-02-05 09:29:04 imap(xx)<13741>: Debug: open(/proc/
self/io) failed: Permission denied

we don't understand why we get this kind of message. we search on this mailing
list without any clean explaination. we expect a bug somewhere..

any ideas ?

system is : debian 12 dovecot 2.3.19.1 (9b53102964)


# 2.3.19.1 (9b53102964): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.19 (4eae2f79)
# OS: Linux 6.1.0-17-amd64 x86_64 Debian 12.4
auth_master_user_separator = *
auth_mechanisms = plain login
auth_username_format = %n
base_dir = /var/run/dovecot
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_debug = yes
mail_gid = 5000
mail_home = /home/vmail/%u
mail_location = /home/vmail/%u/Maildir
mail_plugins = acl mail_log acl mail_log
mail_privileged_group = mail
mail_uid = 5000
namespace {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u:INDEXPVT=~/Maildir/
shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
passdb {
  args = /etc/dovecot/master-users
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap-passdb.conf
  driver = ldap
  name = ldap
}
plugin {
  acl = vfile
  acl_shared_dict = file:/tmp/shared-mailboxes.db
  acl_user = %u
  master_user = %u
}
protocols = imap lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service lmtp {
  inet_listener lmtp {
    address = *
    port = 24
  }
  user = vmail
}
ssl_cert = ___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org