Hi,
I maintain postfix mailserver with sudo enabled dovecot LDA using multiple uids. I want to enforce quotas per-unix-user (which can have multiple domains with multiple emails set up using postfixadmin), so I have set up a FS quota backend with imap_quota plugin. Unfortunately, the quota appears to work (when i disable chrooting) according to dovecot-info.log, but doesn't send anything over IMAP. I found several topics related to this bug in this mailing list, but without any reply.
All files in Maildir belong to unix-user ofight (1042)
# sudo -u ofight quota Disk quotas for user ofight (uid 1042): Filesystem blocks quota limit files quota limit /dev/mapper/vg-home 2058888 2150400 2365440 35432 537600 591360
Info: Loading modules from directory: /usr/lib64/dovecot/imap Info: Module loaded: /usr/lib64/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib64/dovecot/imap/lib11_imap_quota_plugin.so Info: Effective uid=1042, gid=102, home=/home/vmail/ofight.org/team@ofight.org/ Info: Quota root: name=Kvota backend=fs args=mount=/home Info: Namespace: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail/ofight.org/team@ofight.org/ Info: maildir++: root=/home/vmail/ofight.org/team@ofight.org, index=, control=, inbox=/home/vmail/ofight.org/team@o fight.org Info: fs quota add storage dir = /home/vmail/ofight.org/team@ofight.org Info: fs quota block device = /dev/mapper/vg-home Info: fs quota mount point = /home Info: fs quota mount type = jfs Info: Namespace: type=private, prefix=INBOX., sep=., inbox=no, hidden=yes, list=no, subscriptions=yes Info: maildir: data=/home/vmail/ofight.org/team@ofight.org/ Info: maildir++: root=/home/vmail/ofight.org/team@ofight.org, index=, control=, inbox= Info: Namespace : Using permissions from /home/vmail/ofight.org/team@ofight.org: mode=0700 gid=-1 Info: Disconnected: Logged out bytes=133/834
Part of IMAP conversation captured with wireshark:
getquotaroot "INBOX" QUOTAROOT "INBOX" Ok Getquotaroot completed
Part of strace: read(0, "357 getquotaroot \"INBOX\"\r\n", 1259) = 26 stat("/home/vmail/ofight.org/team@ofight.org/tmp", {st_dev=makedev(253, 2), st_ino=475158, st_mode=S_IFDIR|0700, st_nlink=2, st_uid=1042, st_gid=102, st_b lksize=4096, st_blocks=0, st_size=1, st_atime=2011/01/16-10:07:59, st_mtime=2011/01/16-10:07:59, st_ctime=2011/01/16-10:07:59}) = 0 stat("/home/vmail/ofight.org/team@ofight.org", {st_dev=makedev(253, 2), st_ino=475157, st_mode=S_IFDIR|0700, st_nlink=11, st_uid=1042, st_gid=102, st_blks ize=4096, st_blocks=16, st_size=4096, st_atime=2009/05/18-12:07:57, st_mtime=2011/01/16-11:36:32, st_ctime=2011/01/16-11:36:32}) = 0 stat("/home/vmail/ofight.org/team@ofight.org", {st_dev=makedev(253, 2), st_ino=475157, st_mode=S_IFDIR|0700, st_nlink=11, st_uid=1042, st_gid=102, st_blks ize=4096, st_blocks=16, st_size=4096, st_atime=2009/05/18-12:07:57, st_mtime=2011/01/16-11:36:32, st_ctime=2011/01/16-11:36:32}) = 0 stat("/home/vmail/ofight.org/team@ofight.org/dovecot-shared", 0x3f5aa9cf710) = -1 ENOENT (No such file or directory) stat("/home/vmail/ofight.org/team@ofight.org", {st_dev=makedev(253, 2), st_ino=475157, st_mode=S_IFDIR|0700, st_nlink=11, st_uid=1042, st_gid=102, st_blks ize=4096, st_blocks=16, st_size=4096, st_atime=2009/05/18-12:07:57, st_mtime=2011/01/16-11:36:32, st_ctime=2011/01/16-11:36:32}) = 0 stat("/home/vmail/ofight.org/team@ofight.org", {st_dev=makedev(253, 2), st_ino=475157, st_mode=S_IFDIR|0700, st_nlink=11, st_uid=1042, st_gid=102, st_blks ize=4096, st_blocks=16, st_size=4096, st_atime=2009/05/18-12:07:57, st_mtime=2011/01/16-11:36:32, st_ctime=2011/01/16-11:36:32}) = 0 access("/home/vmail/ofight.org/team@ofight.org/cur", W_OK) = 0 setsockopt(1, SOL_TCP, TCP_CORK, [1], 4) = 0 write(1, "* QUOTAROOT \"INBOX\"\r\n357 OK Getq"..., 53) = 53
# 1.2.16: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-hardened-r31 x86_64 Gentoo Base System release 2.0.0 jfs base_dir: /var/run/dovecot/ log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot-info.log protocols: imap imaps pop3 pop3s managesieve listen: *, [::] ssl_cert_file: /etc/apache2/ssl/server.pem ssl_key_file: /etc/apache2/ssl/server.key disable_plaintext_auth: no shutdown_clients: no login_dir: /var/run/dovecot//login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_executable(managesieve): /usr/libexec/dovecot/managesieve-login login_greeting: Dovecot ready. Welcome to Multihost.cz login_process_per_connection: no login_processes_count: 2 login_max_processes_count: 32 login_max_connections: 128 valid_chroot_dirs: /home/vmail max_mail_processes: 150 first_valid_uid: 102 mail_uid: vmail mail_gid: vmail mail_location: maildir:/home/vmail/%d/%u mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_executable(managesieve): /usr/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 mail_plugin_dir(managesieve): /usr/lib64/dovecot/managesieve imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): namespace: type: private separator: . inbox: yes list: yes subscriptions: yes namespace: type: private separator: . prefix: INBOX. hidden: yes list: no subscriptions: yes lda: postmaster_address: postmaster@multihost.cz mail_plugins: sieve quota quota_full_tempfail: yes auth default: mechanisms: plain login skey cache_size: 256 user: nobody verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: mail master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: mail plugin: quota: fs:Kvota:mount=/home trash: /etc/dovecot/trash.conf sieve_global_path: /etc/dovecot/global.sieve sieve_global_dir: /etc/dovecot/sieve-repo/
Thanks, Lefty