[Dovecot] vpopmail/mysql/quota
Hi All,
I'm new to the list and have a quota question. I am building a new server with dovecot/qmail/vpopmail/mysql and emails are sending and recieving fine when the quota is set to NOQUOTA, but when the quota is changed qmail doesn't deliver any messages. I have read the docs and still need some help understanding the process for dovecot quotas relating to the vpopmail mysql database they are stored in. Thanks for your help.
Marty
# 1.2.8: /usr/local/etc/dovecot.conf # OS: Linux 2.6.18-164.6.1.el5 i686 CentOS release 5.4 (Final) protocols: imap pop3 ssl: no disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login first_valid_uid: 508 last_valid_uid: 508 first_valid_gid: 503 last_valid_gid: 503 mail_uid: 508 mail_gid: 503 mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 lda: postmaster_address: postmaster@teknickel.net auth default: default_realm: teknickel.net verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /home/vpopmail/dovecotsql.conf passdb: driver: vpopmail args: webmail=127.0.0.1 userdb: driver: sql args: /home/vpopmail/dovecotsql.conf userdb: driver: vpopmaildriver = mysql # connect = host=/var/lib/mysql/mysql.sock user=vpopuser password=xxxxxxxx dbname=vpopmail # default_pass_scheme = PLAIN # NOTE: '\' line splitting works only with v1.1+
password_query = SELECT pw_clear_passwd AS password, CONCAT(pw_name, '@', pw_domain) AS user FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d'
user_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, pw_dir as home, 508 AS uid, 503 AS gid, concat('maildir:backend=%q', pw_shell) AS quota_rule FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' args: quota_template=quota_rule=*:backend=%q plugin: quota: maildir
dovecotsql.conf
On Mon, 2009-12-14 at 08:11 -0600, Marty Diesburg wrote:
I'm new to the list and have a quota question. I am building a new server with dovecot/qmail/vpopmail/mysql and emails are sending and recieving fine when the quota is set to NOQUOTA, but when the quota is changed qmail doesn't deliver any messages.
Logs probably would have told you why it failed.
passdb: driver: sql args: /home/vpopmail/dovecotsql.conf passdb: driver: vpopmail args: webmail=127.0.0.1 userdb: driver: sql args: /home/vpopmail/dovecotsql.conf userdb: driver: vpopmaildriver = mysql args: quota_template=quota_rule=*:backend=%q
Something's weird above. You probably should have only passdb sql and userdb sql, nothing else.
user_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, pw_dir as home, 508 AS uid, 503 AS gid, concat('maildir:backend=%q', pw_shell) AS quota_rule
The %q is for userdb vpopmail, not for userdb sql. Just remove it and it should work (assuming pw_shell contains the quota).
Yes, you're right, I was testing the other auth method. I took out all but the two sql entries for passdb and userdb, then re-tested with the same result. It authenticates fine, yet qmail holds delivery. I posted the log entry for the last client attempt after restarting dovecot.
Thanks,
Marty
Dec 15 14:58:19 teknickel dovecot: Dovecot v1.2.8 starting up (core dumps disabled) Dec 15 14:58:19 teknickel dovecot: auth-worker(default): mysql: Connected to /var/lib/mysql/mysql.sock (vpopmail) Dec 15 14:58:20 teknickel dovecot: auth(default): new auth connection: pid=9961 Dec 15 14:58:20 teknickel dovecot: auth(default): new auth connection: pid=9963 Dec 15 14:58:20 teknickel dovecot: auth(default): new auth connection: pid=9964 Dec 15 14:58:20 teknickel dovecot: auth(default): new auth connection: pid=9965 Dec 15 14:58:20 teknickel dovecot: auth(default): new auth connection: pid=9966 Dec 15 14:58:20 teknickel dovecot: auth(default): new auth connection: pid=9962 =110 rport=2896 resp=AG1nZABhbGw0MG5lNw== ', pw_domain) AS user FROM vpopmail WHERE pw_name = 'mgd' AND pw_domain = ' teknickel.net' Dec 15 14:58:42 teknickel dovecot: auth(default): client out: OK 1 user=mgd@teknickel.net Dec 15 14:58:42 teknickel dovecot: auth(default): master in: REQUEST 1 9962 1 e, 508 AS uid, 503 AS gid, concat('maildir:backend=', pw_shell) AS quota_rule FROM vpopmail WHERE pw_name = 'mgd' AND pw_domain = ' teknickel.net' 08 gid=503 quota_rule=maildir:backend=52428800S Dec 15 14:58:42 teknickel dovecot: pop3-login: Login: user=< mgd@teknickel.net>, method=PLAIN, rip=192.168.77.119, lip=192.168.77.254 Dec 15 14:58:42 teknickel dovecot: POP3(mgd@teknickel.net): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0 Dec 15 14:58:43 teknickel dovecot: auth(default): new auth connection: pid=10252
On Tue, Dec 15, 2009 at 1:18 PM, Timo Sirainen tss@iki.fi wrote:
On Mon, 2009-12-14 at 08:11 -0600, Marty Diesburg wrote:
I'm new to the list and have a quota question. I am building a new server with dovecot/qmail/vpopmail/mysql and emails are sending and recieving fine when the quota is set to NOQUOTA, but when the quota is changed qmail doesn't deliver any messages.
Logs probably would have told you why it failed.
passdb: driver: sql args: /home/vpopmail/dovecotsql.conf passdb: driver: vpopmail args: webmail=127.0.0.1 userdb: driver: sql args: /home/vpopmail/dovecotsql.conf userdb: driver: vpopmaildriver = mysql args: quota_template=quota_rule=*:backend=%q
Something's weird above. You probably should have only passdb sql and userdb sql, nothing else.
user_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, pw_dir as home, 508 AS uid, 503 AS gid, concat('maildir:backend=%q', pw_shell) AS quota_rule
The %q is for userdb vpopmail, not for userdb sql. Just remove it and it should work (assuming pw_shell contains the quota).
On Tue, 2009-12-15 at 15:04 -0600, Marty Diesburg wrote:
Yes, you're right, I was testing the other auth method. I took out all but the two sql entries for passdb and userdb, then re-tested with the same result. It authenticates fine, yet qmail holds delivery. I posted the log entry for the last client attempt after restarting dovecot.
Now that actually think of what you said..: What does Dovecot's settings have to do with qmail mail deliveries? Nothing as far as I can think of.
I found the issue was with vpopmail version 5.28 and up. I rolled back to version 5.27 and everything worked fine, quotas and all. Here is a link to a discussion on it. http://www.mail-archive.com/vchkpw@inter7.com/msg27156.html Thanks again for your help.
Marty
On Tue, Dec 15, 2009 at 3:12 PM, Timo Sirainen tss@iki.fi wrote:
On Tue, 2009-12-15 at 15:04 -0600, Marty Diesburg wrote:
Yes, you're right, I was testing the other auth method. I took out all but the two sql entries for passdb and userdb, then re-tested with the same result. It authenticates fine, yet qmail holds delivery. I posted the log entry for the last client attempt after restarting dovecot.
Now that actually think of what you said..: What does Dovecot's settings have to do with qmail mail deliveries? Nothing as far as I can think of.
participants (2)
-
Marty Diesburg
-
Timo Sirainen