Zhang Huangbin
2008-May-23 20:39 UTC
[Dovecot] Error while set mailQuota=0 with mbox and LDAP backend
Hi, all. I have OpenLDAP(+qmail.schema), Dovecot, Postfix installed on RHEL 5.1 (x86_64), and they works fine with mbox format. The problem is if i set 'mailQuota=0' in LDAP, postfix can't send mail to recipient user. But it works fine with 'mailQuota != 0', such as '10240'(10M). What's wrong with my mail server setting? How can i solved this issue? Thanks very much. Bellow is the mail log from /var/log/maillog: ---------------- /var/log/maillog ------------- # mail -s "h" postmaster at a.cn < /etc/hosts && tail -0f /var/log/maillog May 23 20:29:35 rh6 postfix/pickup[1608]: 8E8B884949: uid=0 from=<root> May 23 20:29:35 rh6 postfix/cleanup[1896]: 8E8B884949: message-id=<20080524002935.8E8B884949 at rh6.bibby.org> May 23 20:29:35 rh6 postfix/qmgr[1616]: 8E8B884949: from=<root at rh6.bibby.org>, size=467, nrcpt=1 (queue active) May 24 00:29:35 rh6 postfix/smtpd[1901]: connect from localhost.localdomain[127.0.0.1] May 24 00:29:35 rh6 postfix/smtpd[1901]: CFE838494A: client=localhost.localdomain[127.0.0.1] May 23 20:29:35 rh6 postfix/cleanup[1896]: CFE838494A: message-id=<20080524002935.8E8B884949 at rh6.bibby.org> May 23 20:29:35 rh6 postfix/qmgr[1616]: CFE838494A: from=<root at rh6.bibby.org>, size=1076, nrcpt=1 (queue active) May 24 00:29:35 rh6 postfix/smtpd[1901]: disconnect from localhost.localdomain[127.0.0.1] May 24 00:29:35 rh6 postfix/smtp[1898]: 8E8B884949: to=<postmaster at a.cn>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.35, delays=0.07/0/0.01/0.27, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as CFE838494A) May 23 20:29:35 rh6 postfix/qmgr[1616]: 8E8B884949: removed May 23 20:29:35 rh6 postfix/pickup[1608]: E47BA84949: uid=2000 from=<> May 23 20:29:35 rh6 postfix/cleanup[1896]: E47BA84949: message-id=<dovecot-1211588975-866451-0 at rh6.bibby.org> May 23 20:29:35 rh6 postfix/qmgr[1616]: E47BA84949: from=<>, size=2085, nrcpt=1 (queue active) May 23 20:29:35 rh6 postfix/pipe[1902]: CFE838494A: to=<postmaster at a.cn>, relay=dovecot, delay=0.12, delays=0.01/0/0/0.11, dsn=2.0.0, status=sent (delivered via dovecot service) May 23 20:29:35 rh6 postfix/qmgr[1616]: CFE838494A: removed May 24 00:29:36 rh6 postfix/smtpd[1901]: connect from localhost.localdomain[127.0.0.1] May 24 00:29:36 rh6 postfix/smtpd[1901]: 390468494F: client=localhost.localdomain[127.0.0.1] May 23 20:29:36 rh6 postfix/cleanup[1896]: 390468494F: message-id=<dovecot-1211588975-866451-0 at rh6.bibby.org> May 23 20:29:36 rh6 postfix/qmgr[1616]: 390468494F: from=<>, size=2522, nrcpt=1 (queue active) May 24 00:29:36 rh6 postfix/smtpd[1901]: disconnect from localhost.localdomain[127.0.0.1] May 24 00:29:36 rh6 postfix/smtp[1898]: E47BA84949: to=<root at rh6.bibby.org>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.34, delays=0.02/0/0.01/0.31, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 390468494F) May 23 20:29:36 rh6 postfix/qmgr[1616]: E47BA84949: removed May 23 20:29:36 rh6 postfix/local[1951]: 390468494F: to=<root at rh6.bibby.org>, relay=local, delay=0.04, delays=0.01/0/0/0.03, dsn=4.3.0, status=deferred (temporary failure. Command output: Can't open log file /var/log/sieve.log: Permission denied ) ------------ End maillog --------------- Bellow is my dovecot setting(dovecot -n): ----------- dovecot -n -------------- # 1.0.13: /etc/dovecot.conf log_path: /var/log/dovecot.log protocols: pop3 pop3s imap imaps ssl_cert_file: /etc/pki/dovecot/certs/dovecotCert.pem ssl_key_file: /etc/pki/dovecot/private/dovecotKey.pem 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_location: mbox:/%Lh/%Ld/%Ln:INBOX=/%Lh/%Ld/%Ln/inbox:INDEX=MEMORY mbox_write_locks: dotlock fcntl mbox_min_index_size: 10240 mbox_very_dirty_syncs: yes 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/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: mechanisms: plain login user: vmail passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: ldap args: /etc/dovecot-ldap.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: vmail ----------- End dovecot -n -------------- Bellow is /etc/dovecot-ldap.conf: -------------- /etc/dovecot-ldap.conf --------------- hosts = 127.0.0.1:389 ldap_version = 3 auth_bind = yes dn = cn=vmail,dc=osspinc,dc=com dnpass = passwd base = o=%d,o=domains,dc=osspinc,dc=com scope = subtree deref = never user_filter = (&(mail=%u)(objectClass=qmailUser)(accountStatus=active)) pass_filter = (mail=%u) pass_attrs = userPassword=password user_global_uid = 2000 user_global_gid = 2000 default_pass_scheme = CRYPT user_attrs = homeDirectory=home,mailMessageStore=dirsize:mail,mailQuota=quota=dirsize:storage -------------- End /etc/dovecot-ldap.conf --------------- transport entry in Postfix master.cf: ----------- /etc/postfix/master.cf ---------------- dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient} -f ${sender} ----------- End /etc/postfix/master.cf ---------------- -- Best Regards. Zhang Huangbin - Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x: http://rhms.googlecode.com/
Zhang Huangbin
2008-May-23 21:01 UTC
[Dovecot] Error while set mailQuota=0 with mbox and LDAP backend
Zhang Huangbin wrote:> Hi, all. > > I have OpenLDAP(+qmail.schema), Dovecot, Postfix installed on RHEL 5.1 > (x86_64), and they works fine with mbox format. > > The problem is if i set 'mailQuota=0' in LDAP, postfix can't send mail > to recipient user. But it works fine with 'mailQuota != 0', such as > '10240'(10M). > > What's wrong with my mail server setting? How can i solved this issue? > > Thanks very much.Oops, forgot sieve log: deliver(postmaster at a.cn): May 23 21:00:09 Info: msgid=<20080524010007.C79B184944 at rh6.bibby.org>: Rejected: Quota exceeded Thanks again. :) -- Best Regards. Zhang Huangbin - Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x: http://rhms.googlecode.com/
Timo Sirainen
2008-May-25 00:16 UTC
[Dovecot] Error while set mailQuota=0 with mbox and LDAP backend
On Sat, 2008-05-24 at 04:39 +0800, Zhang Huangbin wrote:> The problem is if i set 'mailQuota=0' in LDAP, postfix can't send mail > to recipient user. But it works fine with 'mailQuota != 0', such as > '10240'(10M).0 means the user has 0 bytes quota, not unlimited. Maybe this should be changed.. You could always work around it by just returning a very large value.> homeDirectory=home,mailMessageStore=dirsize:mail,mailQuota=quota=dirsize:storageAlso what is "?mailMessageStore=dirsize:mail"? I don't think it does anything. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080525/d04cdc72/attachment-0002.bin>
Zhang Huangbin
2008-May-25 02:40 UTC
[Dovecot] Error while set mailQuota=0 with mbox and LDAP backend
Timo Sirainen wrote:> On Sat, 2008-05-24 at 04:39 +0800, Zhang Huangbin wrote: > >> The problem is if i set 'mailQuota=0' in LDAP, postfix can't send mail >> to recipient user. But it works fine with 'mailQuota != 0', such as >> '10240'(10M). >> > > 0 means the user has 0 bytes quota, not unlimited. Maybe this should be > changed.. You could always work around it by just returning a very large > value. >Hope to see this change. :)> >> homeDirectory=home,mailMessageStore=dirsize:mail,mailQuota=quota=dirsize:storage >> > > Also what is "?mailMessageStore=dirsize:mail"? I don't think it does > anything. >I will delete 'mailMessageStore' for test. Thanks Timo. :) -- Best Regards. Zhang Huangbin - Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x: http://rhms.googlecode.com/
Zhang Huangbin
2008-May-25 12:13 UTC
[Dovecot] Error while set mailQuota=0 with mbox and LDAP backend
Hi, Timo. Timo Sirainen wrote: > >> homeDirectory=home,mailMessageStore=dirsize:mail,mailQuota=quota=dirsize:storage > > Also what is "?mailMessageStore=dirsize:mail"? I don't think it does > anything. After some test, i think 'mailMessageStore=dirsize:mail' is an optional parameter for LDAP backend. mail_location in dovecot.conf: -------- mail_location = mbox:/%Lh/%Ld/%Ln:INBOX=/%Lh/%Ld/%Ln/inbox:INDEX=/%Lh/%Ld/%Ln/indexes -------- Below is sieve log file without 'mailMessageStore=dirsize:mail': ------------ deliver(www at a.cn): May 25 12:10:09 Info: Loading modules from directory: /usr/lib64/dovecot/lda deliver(www at a.cn): May 25 12:10:09 Info: Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so deliver(www at a.cn): May 25 12:10:09 Info: Module loaded: /usr/lib64/dovecot/lda/lib90_cmusieve_plugin.so deliver(www at a.cn): May 25 12:10:09 Info: auth input: www at a.cn deliver(www at a.cn): May 25 12:10:09 Info: auth input: home=/home/vmail deliver(www at a.cn): May 25 12:10:09 Info: auth input: quota=dirsize:storage=10240 deliver(www at a.cn): May 25 12:10:09 Info: auth input: uid=2000 deliver(www at a.cn): May 25 12:10:09 Info: auth input: gid=2000 deliver(www at a.cn): May 25 12:10:09 Info: mbox: data=//home/vmail/a.cn/www:INBOX=//home/vmail/a.cn/www/inbox:INDEX=//home/vmail/a.cn/www/indexes deliver(www at a.cn): May 25 12:10:09 Info: mbox: root=//home/vmail/a.cn/www, index=//home/vmail/a.cn/www/indexes, inbox=//home/vmail/a.cn/www/inbox deliver(www at a.cn): May 25 12:10:09 Info: dirsize quota limit = 10240kB deliver(www at a.cn): May 25 12:10:09 Info: cmusieve: Using sieve path: /home/vmail/.sieve.rule deliver(www at a.cn): May 25 12:10:09 Info: cmusieve: Executing script /home/vmail/.sieve.rulec deliver(www at a.cn): May 25 12:10:09 Info: msgid=<20080525161008.9CA0D782F1 at rh52.bibby.org>: saved mail to INBOX ------------ And below is sieve log with 'mailMessageStore=dirsize:mail': ------------ deliver(www at a.cn): May 25 12:11:43 Info: Loading modules from directory: /usr/lib64/dovecot/lda deliver(www at a.cn): May 25 12:11:43 Info: Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so deliver(www at a.cn): May 25 12:11:43 Info: Module loaded: /usr/lib64/dovecot/lda/lib90_cmusieve_plugin.so deliver(www at a.cn): May 25 12:11:43 Info: auth input: www at a.cn deliver(www at a.cn): May 25 12:11:43 Info: auth input: home=/home/vmail deliver(www at a.cn): May 25 12:11:43 Info: auth input: dirsize:mail=a.cn/www deliver(www at a.cn): May 25 12:11:43 Info: auth input: quota=dirsize:storage=10240 deliver(www at a.cn): May 25 12:11:43 Info: auth input: uid=2000 deliver(www at a.cn): May 25 12:11:43 Info: auth input: gid=2000 deliver(www at a.cn): May 25 12:11:43 Info: mbox: data=//home/vmail/a.cn/www:INBOX=//home/vmail/a.cn/www/inbox:INDEX=//home/vmail/a.cn/www/indexes deliver(www at a.cn): May 25 12:11:43 Info: mbox: root=//home/vmail/a.cn/www, index=//home/vmail/a.cn/www/indexes, inbox=//home/vmail/a.cn/www/inbox deliver(www at a.cn): May 25 12:11:43 Info: dirsize quota limit = 10240kB deliver(www at a.cn): May 25 12:11:43 Info: cmusieve: Using sieve path: /home/vmail/.sieve.rule deliver(www at a.cn): May 25 12:11:43 Info: cmusieve: Executing script /home/vmail/.sieve.rulec deliver(www at a.cn): May 25 12:11:43 Info: msgid=<20080525161142.F2FE2782F1 at rh52.bibby.org>: saved mail to INBOX ------------ -- Best Regards. Zhang Huangbin - Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x: http://rhms.googlecode.com/