Greetings *
We are having a problem with POP3 quota warnings, and despite we dig into the documentation, mailing list archives, google... we didn't spot any light
We are running a self-compiled dovecot 1.1.7. The user base is in a Postgres database. We'd like a quota warning message to be injected into the maildir at 80% and 95% of occupation reached.
From the logs, it looks like dovecot is correctly reading the quotas from the DB. Nevertheless, the warning message is never delivered.
We tried many different configurations (e.g.: from using bytes instead of storage to change the quota configuration alltogether, I think we tried every single sensible, applicable solution that we could spot during our searches in the net). Currently, we have the following non-working one:
root@mgo2-popimap-v01:/usr/local/dovecot/etc# ../sbin/dovecot -n # 1.1.7: /usr/local/dovecot_1.1.7/etc/dovecot.conf Warning: fd limit 1024 is lower than what Dovecot can use under full load (more than 16384). Either grow the limit or change login_max_processes_count and max_mail_processes settings # OS: Linux 2.6.24.5-smp i686 Slackware 11.0.0 base_dir: /var/run/dovecot/ protocols: imap pop3 listen(default): mgo2-popimap-v01:143 listen(imap): mgo2-popimap-v01:143 listen(pop3): mgo2-popimap-v01:110 ssl_disable: yes disable_plaintext_auth: no shutdown_clients: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/dovecot/libexec/dovecot/imap-login login_executable(imap): /usr/local/dovecot/libexec/dovecot/imap-login login_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3-login login_greeting: POP/IMAP Server! login_max_processes_count: 4096 max_mail_processes: 8192 first_valid_uid: 4000 first_valid_gid: 4000 mail_location: maildir:%h/Maildir mail_debug: yes mmap_disable: yes mail_nfs_storage: yes mail_nfs_index: yes mail_executable(default): /usr/local/dovecot/libexec/dovecot/imap mail_executable(imap): /usr/local/dovecot/libexec/dovecot/imap mail_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/local/dovecot/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/dovecot/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/dovecot/lib/dovecot/pop3 imap_client_workarounds(default): outlook-idle imap_client_workarounds(imap): outlook-idle imap_client_workarounds(pop3): pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %v-%u pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: passdb: driver: sql args: /usr/local/dovecot/etc/dovecot-sql.conf userdb: driver: sql args: /usr/local/dovecot/etc/dovecot-sql.conf plugin: quota: maildir:User quota quota_rule: ?:storage=100M quota_warning: storage=95%% /usr/local/dovecot/bin/quota-warning.sh 95 %h %n %d quota_warning2: storage=80%% /usr/local/dovecot/bin/quota-warning.sh 80 %h %n %d
root@mgo2-popimap-v01:/usr/local/dovecot/etc# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf driver = pgsql connect = host=172.30.213.10 dbname=postfix user=postfix password=_HIDDEN_PASSWORD_ default_pass_scheme = SHA1 password_query = SELECT username, password FROM postfix.accounts WHERE (username = '%u' OR username = '%u@_HIDDEN_DOMAIN_') AND ( user_status_id = 0 or user_status_id = 2 ); user_query = SELECT maildir AS home, uid, gid, '*:storage=' || max_quota || 'B' AS quota_rule FROM postfix.accounts WHERE (username = '%u' OR username = '%u@_HIDDEN_DOMAIN_') AND ( user_status_id = 2 OR user_status_id = 0 )
The log says:
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Loading modules from directory:
/usr/local/dovecot/lib/dovecot/pop3
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Module loaded:
/usr/local/dovecot/lib/dovecot/pop3/lib10_quota_plugin.so
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Effective uid=10812, gid=5008
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Quota root: name=User quota
backend=maildir args=
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Quota rule: root=User quota mailbox=*
bytes=104857600 (0%) messages=0 (0%)
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Quota warning: bytes=99614720 (95%)
messages=0 (0%) command=/usr/local/dovecot/bin/quota-warning.sh 95
/mnt/maildir/_HIDDEN_DOMAIN_/USER/r/ra/rasrcbldg@_HIDDEN_DOMAIN_
rasrcbldg _HIDDEN_DOMAIN_
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): Quota warning: bytes=83886080 (80%)
messages=0 (0%) command=/usr/local/dovecot/bin/quota-warning.sh 80
/mnt/maildir/_HIDDEN_DOMAIN_/USER/r/ra/rasrcbldg@_HIDDEN_DOMAIN_
rasrcbldg _HIDDEN_DOMAIN_
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): maildir:
data=/mnt/maildir/_HIDDEN_DOMAIN_/USER/r/ra/rasrcbldg@_HIDDEN_DOMAIN_/Maildir
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot:
POP3(rasrcbldg@_HIDDEN_DOMAIN_): maildir++:
root=/mnt/maildir/_HIDDEN_DOMAIN_/USER/r/ra/rasrcbldg@_HIDDEN_DOMAIN_/Maildir,
index=, control=,
inbox=/mnt/maildir/_HIDDEN_DOMAIN_/USER/r/ra/rasrcbldg@_HIDDEN_DOMAIN_/Maildir
Apr 28 10:32:13 mgo2-popimap-v01._HIDDEN_DOMAIN_ dovecot: pop3-login:
Login: user=
Note that having this user's quota the same as the default quota is just an incident, if a user has a quota different from the default, the actual quota it is reported correctly in the logs.
What are we doing wrong?
Thanks for your help
Kind Regards --Marco