3 Feb
2009
3 Feb
'09
2:12 a.m.
Hi List, I of present dovecot 1.1.10 use it, and test dict quota backend and mysql. However, I am troubled so that it is IMAP4, and behavior when mysql fell is different from POP3. I become the error in Copy of Mail in IMAP4, but do not become the error in DELE of the POP3. Therefore I think that contradiction happens in database and real storage when mysql fell.
I want an error to do it at the time of the DELE command of the POP3 if possible, but how will be it?
Thank you for keeping company at my clumsy English.
# dovecot -n
# 1.1.10: /etc/dovecot.conf # OS: Linux 2.6.18-92.1.22.el5xen i686 CentOS release 5.2 (Final) protocols: imap pop3 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 mail_max_userip_connections(default): 100 mail_max_userip_connections(imap): 100 mail_max_userip_connections(pop3): 10 last_valid_uid: 65000 mail_location: maildir:~/Maildir mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 auth default: cache_size: 10 cache_ttl: 300 passdb: driver: pam userdb: driver: passwd socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: dovecot group: dovecot plugin: quota: dict:user::proxy::quotadict quota_rule: *:storage=1536M quota_rule2: Trash:ignore dict: quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf
mysql status
mysql> SELECT username,current,path FROM quota WHERE username="test"; +----------+---------+----------------+ | username | current | path | +----------+---------+----------------+ | test | 1 | quota/messages | | test | 1460 | quota/storage | +----------+---------+----------------+ 2 rows in set (0.00 sec)
# /etc/init.d/mysqld stop
Connectting my server (IMAP4) syslog
Feb 3 08:38:40 hideck dovecot: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.31.72, lip=192.168.0.1 Feb 3 08:38:46 hideck dovecot: dict: mysql: Connect failed to localhost (dovecot): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) - waiting for 75 seconds before retry Feb 3 08:38:46 hideck dovecot: dict: dict sql lookup failed: Not connected to database Feb 3 08:38:46 hideck dovecot: IMAP(test): Internal quota calculation error Feb 3 08:38:51 hideck dovecot: IMAP(test): Disconnected: Logged out bytes=357/1211
Connect Clients Log(IMAP4)
- OK Dovecot ready. 0114 CAPABILITY
- CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED I18NLEVEL=1 QUOTA AUTH=PLAIN 0114 OK Capability completed. 0115 LOGIN ******** ******** 0115 OK Logged in. 0116 NAMESPACE
- NAMESPACE (("" ".")) NIL NIL 0116 OK Namespace completed. 0117 LIST "" "INBOX"
- LIST (\HasNoChildren) "." "INBOX" 0117 OK List completed. 0118 LIST "" *
- LIST (\HasNoChildren) "." "Trash"
- LIST (\HasNoChildren) "." "Sent"
- LIST (\HasNoChildren) "." "Junk"
- LIST (\HasNoChildren) "." "Draft"
- LIST (\HasNoChildren) "." "INBOX" 0118 OK List completed. 0119 STATUS "INBOX" (MESSAGES UNSEEN UIDNEXT)
- STATUS "INBOX" (MESSAGES 1 UIDNEXT 3 UNSEEN 0) 0119 OK Status completed. 0121 SELECT "INBOX"
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)] Flags permitted.
- 1 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1233565420] UIDs valid
- OK [UIDNEXT 3] Predicted next UID 0121 OK [READ-WRITE] Select completed. 0122 UID SEARCH DELETED
- SEARCH 0122 OK Search completed (0.000 secs). 0123 STATUS "INBOX" (MESSAGES UNSEEN UIDNEXT)
- STATUS "INBOX" (MESSAGES 1 UIDNEXT 3 UNSEEN 0) 0123 OK Status completed. 0124 UID SEARCH NOT DELETED
- SEARCH 2 0124 OK Search completed (0.000 secs). 0125 UID SEARCH UNSEEN
- SEARCH 0125 OK Search completed (0.000 secs). 0126 UID SEARCH ANSWERED
- SEARCH 0126 OK Search completed (0.000 secs). 0127 UID SEARCH FLAGGED
- SEARCH 0127 OK Search completed (0.000 secs). 0128 UID COPY 2 "Trash" 0128 NO Internal error occurred. Refer to server log for more information. [2009-02-03 08:38:46] 0131 CLOSE 0131 OK Close completed. 0130 LOGOUT
- BYE Logging out 0130 OK Logout completed.
Connectting my server (POP3) syslog
Feb 3 08:43:04 hideck dovecot: pop3-login: Login: user=<test>, method=PLAIN, rip=192.168.31.72, lip=192.168.0.1 Feb 3 08:43:05 hideck dovecot: dict: mysql: Connect failed to localhost (dovecot): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) - waiting for 75 seconds before retry Feb 3 08:43:05 hideck dovecot: dict: sql dict: commit failed: Not connected to database Feb 3 08:43:05 hideck dovecot: POP3(test): Disconnected: Logged out top=0/0, retr=1/1505, del=1/1, size=1488
Connect Clients Log(POP3)
+OK Dovecot ready. USER test +OK PASS ******** +OK Logged in. STAT +OK 1 1488 LIST +OK 1 messages: 1 1488 . UIDL +OK 1 000000024986b6ec . RETR 1 +OK 1488 octets DELE 1 +OK Marked to be deleted. QUIT +OK Logging out, messages deleted.
# /etc/init.d/mysqld start
No update mysql data
mysql> SELECT username,current,path FROM quota WHERE username="test"; +----------+---------+----------------+ | username | current | path | +----------+---------+----------------+ | test | 1 | quota/messages | | test | 1460 | quota/storage | +----------+---------+----------------+ 2 rows in set (0.01 sec)
# sudo -u test -H /usr/sbin/dovecot --exec-mail imap
# sudo -u test -H /usr/sbin/dovecot --exec-mail imap
- PREAUTH [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED I18NLEVEL=1 QUOTA] Logged in as test 1 GETQUOTAROOT INBOX
- QUOTAROOT "INBOX" "user"
- QUOTA "user" (STORAGE 1 1572864) 1 OK Getquotaroot completed. 2 logout
- BYE Logging out 2 OK Logout completed.