Change default mode for attachment files
Hi
I migrated my dovecot server from Maildir to mdbox with saving attachments to external files and enabled SIS a few days ago.
Everything works fine except one issue. I have both virtual and system users. Dovecot saves attachments with mode 0600. So I catch such errors for system users: dovecot: lda(wasya): Error: fs-sis: Couldn't read hash file /var/mail/attachments/2e/dc/hashes/2edc6009bc9b6ba38febb581df03986dcaf134d9: Permission denied
I want to fix this issue by changing default file mode to 0660 via group policy.
I found such feature in the changelog (v2.1.rc2 2012-01-06): lib-fs: Added "mode" parameter to "posix" backend to specify mode for created files/dirs.
Unfortunately I can't find any information about this feature in the dovecot documentation.
Can I use it to setup mode 0660 for attachments in the dovecot configuration?
uname -a Linux diplo.trueconf.ru 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
dovecot --version 2.2.27 (c0f36b0)
10-mail.conf dovecot configuration:
mail_access_groups = vmail mail_location = mdbox:~/mdbox mdbox_preallocate_space = yes mdbox_rotate_interval = 1 weeks mdbox_rotate_size = 5 M
mail_attachment_dir = /var/mail/attachments mail_attachment_min_size = 32k mail_attachment_fs = sis posix mail_attachment_hash = %{sha1}
Thank you
participants (1)
-
Олег Кривоносов