Dovecot/Pigeonhole:如何為新使用者指定新建立的 ./sieve 目錄的預設目錄權限?

Dovecot/Pigeonhole:如何為新使用者指定新建立的 ./sieve 目錄的預設目錄權限?

我正在運行 Dovecot 2.3.20,並啟用了 Sieve 支援。我正在為多個託管虛擬網域使用虛擬郵箱。擁有(應擁有)檔案系統上的目錄和郵件檔案的系統帳戶和群組是vmail:vmail

我想要所有目錄,包括。儲存特定於使用者的 sieve 腳本的目錄,可供群組讀取和執行。然而,如果新使用者第一次存取其郵件帳戶,Dovecot 會在使用者的郵件主目錄中建立具有權限的 sieve 目錄2700,即該群組vmail沒有讀取權限。我該如何改變這一點?

背景

相關的鴿舍設置是

home=/var/spool/mail/vmail/%d/%{ldap:uid}
mail_location = sdbox:~/Maildir
sieve = file:~/sieve;active=~/.dovecot.sieve

頂層目錄的權限如下

server ~ # ls -lhad /var/spool/mail/vmail/
drwxr-s--- 4 vmail vmail 60 22. Dec 18:43 /var/spool/mail/vmail/

如果我為 LDAP 新增帳戶且相關目錄尚不存在,Dovecot 將建立以下目錄結構

server ~ # ls -lhR /var/spool/mail/vmail/my-test.tld
/var/spool/mail/vmail/my-test.tld:
insgesamt 0
drwxr-s--- 4 vmail vmail 56 16. Jan 00:45 john.doe

/var/spool/mail/vmail/my-test.tld/john.doe:
insgesamt 0
drwxr-s--- 3 vmail vmail 164 14. Jan 18:37 Maildir
drwx--S--- 3 vmail vmail  35 14. Jan 18:48 sieve     # <-- this should be drwxr-s---, too

/var/spool/mail/vmail/my-test.tld/john.doe/Maildir
insgesamt 0

/var/spool/mail/vmail/my-test.tld/john.doe/sieve
insgesamt 0

答案1

您可以使用umask 有一個非常好的文章和範例這裡

相關內容