[Dovecot] PAM auth and userdb

Matthias Lohmann lohm at lynet.de
Fri Feb 11 18:30:25 EET 2011


Hi all,

I've just setup dovecot 2.0.9 on Solaris 10 - everything works fine so far.


I'm authentication my users with PAM (against /etc/passwd) -> works 


The users get the default quota setting from dovecots config.

Now I like to override the quota settings for some users.

So I created a userdb - but it seems, that its not used ...

What might be wrong?





# 2.0.9: /opt/dovecot2.0.9/etc/dovecot/dovecot.conf
# OS: SunOS 5.10 sun4v  
auth_debug = yes
auth_username_chars = abcdefghijklmnopqrstuvwxyz01234567890.-
auth_verbose = yes
default_login_user = nobody
disable_plaintext_auth = no
first_valid_gid = 215
first_valid_uid = 300
log_path = /var/log/dovecot.log
login_access_sockets = tcpwrap
mail_location = mbox:~/IMAP:INBOX=/var/mail/%u:INDEX=/var/dovecotindexes/%u
mail_plugins = quota
passdb {
  driver = pam
}
plugin {
  quota = dict:User quota::file:/var/dovecotindexes/%u/dovecot-quota
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+100M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
}

[...]

userdb {
  driver = passwd
}
userdb {
  args = username_format=%u /opt/dovecot/etc/users
  driver = passwd-file
}


My userdb contains lines like this

user301::301:220::/usr/users/user301::userdb_quota_rule=*:storage=200M


And here we have some debug output


Feb 11 16:55:24 auth: Debug: passwd-file /opt/dovecot/etc/users: Read 1 users
Feb 11 16:55:24 auth: Debug: pam(user301,2.1.1.2): lookup service=dovecot
Feb 11 16:55:24 auth: Debug: pam(user301,2.1.1.2): #1/1 style=1 msg=Password: 
Feb 11 16:55:24 auth: Debug: client out: OK     1       user=user301
Feb 11 16:55:24 auth: Debug: master in: REQUEST 1627258881      20594   1       90f9d76fc9ac35bcb78212825868522a
Feb 11 16:55:24 auth: Debug: passwd(user301,2.1.1.2): lookup
Feb 11 16:55:24 auth: Debug: master out: USER   1627258881      user301    system_groups_user=user301 uid=301 gid=220 home=/usr/users/user301
Feb 11 16:55:24 pop3-login: Info: Login: user=<user301>, method=PLAIN, rip=2.1.1.2, lip=2.1.1.22, mpid=20607
Feb 11 16:55:25 pop3(user301): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/9, size=71445



Even doveadm gives the wrong quota

root@> /opt/dovecot/bin/doveadm quota get -u user301   
Quota name                        Type    Value   Limit %
User quota                        STORAGE 72288 1048576 6
User quota                        MESSAGE  1258       - 0






Any hints for me?


Thanks in advance.

Kind regards
Matt


More information about the dovecot mailing list