问题原文
原帖链接 · StevieD · CC BY-SA 4.0
Currently, a user's Maildir/ is not created for them until they log into the system for the first time. Is there a dovecot script I can run to make this happen before they log in to the machine? I know about /etc/skel but I'm not sure this is appropriate to use for this situation. I'd prefer to have dovect set up the correct files.
已采纳解答
原帖链接 · anx · CC BY-SA 4.0
dovecot ships a maildirmake utility for use in scripts, and doveadm mailbox does work with the -A flag to affect all users. For the former, you need to pay attention to file ownership and permissions, for the latter you need to ensure that your passdb driver gets an appropriate user list (or else you would create Maildirs for system users not intended to ever receive mail!).
I am not aware of a way to have the folders marked for autocreation also created on access via doveadm, but if its just the INBOX folder, either should work for you.
That being said, I believe there is little reason to manually create folders. If mail arrives, dovecot will create the destination mailbox (though, if sieve processes the mail, this may have to be explicitely specified). If a user logs in, all configured folders will be created according to their autocreate flag. Why would a user need to have these folders before accessing IMAP or receiving mail?
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
