maildir boxes directory mode upon creation

vadim vadim at ideco.ru
Wed Aug 23 17:04:09 EEST 2017


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 at 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 at ideco.ru
Технические вопросы: support at ideco.ru

Сайт: http://ideco.ru
Форум: http://forum.ideco.ru

-------------- next part --------------
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
auth_verbose_passwords = yes
listen = 169.254.252.252
mail_debug = yes
mail_location = maildir:/var/mail/%u
maildir_very_dirty_syncs = yes
namespace {
  inbox = yes
  location = 
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix = INBOX.
  separator = .
}
passdb {
  args = /usr/bin/dovecot-firebird-auth-handler.sh
  driver = checkpassword
}
protocols = imap pop3
service auth {
  group = 
  user = 
}
service imap-login {
  inet_listener imap-roundcube-ext {
    address = 127.0.0.1
    port = 145
  }
  inet_listener imap-roundcube-loc {
    address = 127.0.0.1
    port = 144
  }
  inet_listener imap {
    address = 0.0.0.0
    port = 143
  }
  inet_listener imaps {
    port = 0
  }
}
service pop3-login {
  inet_listener pop3 {
    address = 0.0.0.0
    port = 110
  }
  inet_listener pop3s {
    address = 0.0.0.0
    port = 995
  }
}
ssl_cert = </tmp/dovecot_loc_cert.pem
ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
ssl_key =  # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
userdb {
  args = uid=imap gid=mail
  driver = static
}


More information about the dovecot mailing list