maildir boxes directory mode upon creation
Hello, list !
Dovecot version is 2.2.27, running on Centos 6.7. Postfix is receiving mail and putting it into mailboxes. Dovecot just serves IMAP/POP3 connections to mailboxes. Virtual users are stored in DB. The problem is in directory mode (and thus file mode) for new mailboxes upon it's creation. If I create new record for new mailbox in DB and send mail to it, Postfix will create mailbox properly: Mode is 660, owner is imap:mail in my setup. If I create new record in DB and log in via IMAP for the first time, Dovecot creates mailbox and mode is 600, owner is imap:mail. Postfix cant put mails in tmp or new dirs in mailboxes created by dovecot with mode 600. I need dovecot to create new mailboxes (and files in it) within 660 mode. I tried to play around with "mail_access_groups" and "mail_privileged_group" wih no positive effect. I tried to change value for every "mode=" parameter in dovecot.conf to 660, but no luck.
According to the documentation "Dovecot copies the permissions from the mailbox root directory". My mail_location is maildir:/var/mail/%u Rights for /var/mail/ (the root mail dir) are:
[root@unknown-external-domain ~]# ls -lha /var/mail/
total 24K
drwxrwx--- 5 postfix mail 4,0K Авг 23 14:27 .
drwxrwxr-x 6 root root 4,0K Июл 29 12:18 ..
drwx------ 6 imap mail 4,0K Авг 23 14:28 Administrator
But, as you can see, Administrator's box was created by dovecot with 600 permissions.
I am unable to enforce dovecot to create mailboxes with 660 permissions. Output of dovecot -n is in the attachment.
Please tell me what's the right way to control mailbox permissions ?
-- С уважением, Бажов Вадим, Инженер отдела технической поддержки, Компания «Айдеко»
Телефоны: +7 (495) 987-32-70; +7 (495) 662-87-34 (тех. поддержка); +7 (343) 220-77-55; Факс: +7 (343) 220-77-85
Электронная почта: Вопросы по приобретению: sales@ideco.ru Технические вопросы: support@ideco.ru
Сайт: http://ideco.ru Форум: http://forum.ideco.ru
- vadim <vadim@ideco.ru> 2017.08.23 16:04:
I am unable to enforce dovecot to create mailboxes with 660 permissions. Output of dovecot -n is in the attachment.
Please tell me what's the right way to control mailbox permissions ?
Hi Vadmin,
inject the mails per LMTP rather than having Postfix save them directly and let Dovecot worry about the permissions:
https://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP
Regards Thomas
I can't do it right now. We have plugins and patches for postfix to check the mail before putting it in maildir.
Now I need just replace Courier mail with Dovecot.
Lately I'll remove self-written patches with sieve plugin for dovecot + LMTP.
But there is no possibility to make it right now, atomically.
On 24.08.2017 13:06, Thomas Leuxner wrote:
- vadim <vadim@ideco.ru> 2017.08.23 16:04:
I am unable to enforce dovecot to create mailboxes with 660 permissions. Output of dovecot -n is in the attachment.
Please tell me what's the right way to control mailbox permissions ? Hi Vadmin,
inject the mails per LMTP rather than having Postfix save them directly and let Dovecot worry about the permissions:
https://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP
Regards Thomas
-- С уважением, Бажов Вадим, Инженер отдела технической поддержки, Компания «Айдеко»
Телефоны: +7 (495) 987-32-70; +7 (495) 662-87-34 (тех. поддержка); +7 (343) 220-77-55; Факс: +7 (343) 220-77-85
Электронная почта: Вопросы по приобретению: sales@ideco.ru Технические вопросы: support@ideco.ru
Сайт: http://ideco.ru Форум: http://forum.ideco.ru
And. as I said, postfix create maildirs with right permissions.
Dovecot make wrong permissions. Deliver mail to mailboxes via Dovecot LMTP will probably cause this wrong permission problem too.
We have to support legacy installations at our customers' servers and need a certain permissions: 660, imap:mail.
How can I do it with Dovecot ?
On 24.08.2017 13:06, Thomas Leuxner wrote:
- vadim <vadim@ideco.ru> 2017.08.23 16:04:
I am unable to enforce dovecot to create mailboxes with 660 permissions. Output of dovecot -n is in the attachment.
Please tell me what's the right way to control mailbox permissions ? Hi Vadmin,
inject the mails per LMTP rather than having Postfix save them directly and let Dovecot worry about the permissions:
https://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP
Regards Thomas
-- С уважением, Бажов Вадим, Инженер отдела технической поддержки, Компания «Айдеко»
Телефоны: +7 (495) 987-32-70; +7 (495) 662-87-34 (тех. поддержка); +7 (343) 220-77-55; Факс: +7 (343) 220-77-85
Электронная почта: Вопросы по приобретению: sales@ideco.ru Технические вопросы: support@ideco.ru
Сайт: http://ideco.ru Форум: http://forum.ideco.ru
participants (2)
-
Thomas Leuxner
-
vadim