Dear dovecot-list,
I have questions regarding setting up quota with postfix(Maildir format)+ dovect. My main point of the question is to know how the user password is used in quota in this case. Please see the below configuration info and my questions are in the bottom.
Here are what have been done:
<Postfix side configuration>
/etc/postfix/main.cf:
myhostname = mail.example.com mydomain = example.com myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain home_mailbox = Maildir/
mailbox_command = /usr/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" -d "$USER" <--Add
<Dovecot side configuration> 1. /etc/dovecot/conf.d/10-auth.conf:
#!include auth-system.conf.ext #!include auth-sql.conf.ext #!include auth-ldap.conf.ext !include auth-passwdfile.conf.ext <---Only enabled #!include auth-checkpassword.conf.ext #!include auth-vpopmail.conf.ext #!include auth-static.conf.ext
- /etc/dovecot/conf.d/10-master.conf
service auth { snip/ unix_listener auth-userdb { mode = 0666 <---The permission for userdb 666 #user = #group = snip/
- /etc/dovecot/conf.d/10-mail.conf:
mail_location = maildir:~/Maildir snip/ mail_plugins = $mail_plugins quota <---set the plugin snip/
- /etc/dovecot/conf.d/15-lda.conf:
snip/ postmaster_address = root@example.com <---Add postmaster snip/ protocol lda { mail_plugins = $mail_plugins <--set the plugin }
- /etc/dovecot/conf.d/20-imap.conf:
protocol imap { mail_plugins = $mail_plugins imap_quota <--set the plugin snip/
- /etc/dovecot/conf.d/20-pop3.conf:
snip/ protocol pop3 { mail_plugins = $mail_plugins quota <--set the plugin snip/
- /etc/dovecot/conf.d/90-quota.conf:
plugin { <--set global quota quota = maildir:<User quota> quota_rule = *:storage=100M quota_rule2 = Trash:storage=+100M }
- /etc/dovecot/conf.d/auth-passwdfile.conf.ext:
snip/ passdb { driver = passwd-file args = scheme=CRYPT username_format=%u /etc/dovecot/users <--Path for passwdfile }
userdb { driver = passwd-file args = username_format=%u /etc/dovecot/users } snip/
- /etc/dovecot/users:
test004:{SSHA256}hFxB8tbyZrCCcwZKDaQEiUfojbRovOq8ECU0syPHQTCY0233:18222:18222::/home/test004::userdb_quota_rule=*:storage=1M test005:{SSHA256}hFxB8tbyZrCCcwZKDaQEiUfojbRovOq8ECU0syPHQTCY0233:18223:18223::/home/test005::userdb_quota_rule=*:storage=1M test006:{SSHA256}hFxB8tbyZrCCcwZKDaQEiUfojbRovOq8ECU0syPHQTCY0233:18224:18224::/home/test006::userdb_quota_rule=*:storage=1M
Note:The hashed password is created running the blow command:
# doveadm pw -s ssha256
- /etc/dovecot/dovecot.conf:
snip/ protocols = imap pop3 <--Available protocols snip/
service postfix restart
# service dovcot restart
Question: 1./etc/dovecot/users is supposed to be seen instead of /etc/passwd for authentification of imap and pops in receiving emails, isn't it? 2.If the answer for above question 1 is 'YES', then doesn't it require to get all password in /etc/passwd hashed for each user and place all of them into /etc/dovecot/users? 3.If the answer for above question 1 is 'NO', then what the hashed-password in /etc/dovcot/users such as {SSHA256}hFX... used for?
Excuse me if those are silly questions, but I am not a dovecot person and would very much appreciate it if anyone would kindly give me a hand on this.
Regards, Masaharu Kawada