Hi all, I have configured Dovecot as a POP/IMAP-Server in front of a Postfix-Server. Every thing works without one thing: LDAP-quotas The main-quota-rule works: quota_rule: *:storage=8M Only the LDAP-quota won't be used by Dovecot: user_attrs = msRADIUSFramedIPAddress=quota_rule=*:storage=%$k I have to use the special LDAP-field "msRADIUSFramedIPAddress" because my W2003 domain controller don't have a regular quota field. This LDAP-field is the only "free integer" LDAP-field. Could anyone please give me a hint? Greetings Paul #dovecot -n # 1.2.3: /etc/dovecot.conf # OS: Linux 2.6.18-128.4.1.el5 x86_64 CentOS release 5.3 (Final) ext3 log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.log protocols: pop3 pop3s imap imaps listen(default): 123.456.789.71 listen(imap): 123.456.789.71 listen(pop3): 123.456.789.72 ssl_listen(default): ssl_listen(imap): ssl_listen(pop3): 123.456.789.72:995 ssl_ca_file: /etc/pki/dovecot/certs/pop_core_uk/trustcenter_intermediate.crt ssl_cert_file: /etc/pki/dovecot/certs/pop_core_uk/server.crt ssl_key_file: /etc/pki/dovecot/private/pop_core_uk/server.key 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: maildir:/home/vmail/%Lu/Maildir/ 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_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 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh lda: debug: yes postmaster_address: postmster at core.uk hostname: smtp.core.uk mail_plugins: quota quota_full_tempfail: yes log_path: /var/log/dovecot-deliver.log log_timestamp: %b %d %H:%M:%S rejection_reason: Ihre Nachricht an <%t> wurde automatisiert abgewiesen:%n%r auth default: mechanisms: plain login username_translation: @_._ verbose: yes debug: yes debug_passwords: yes passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: passwd userdb: driver: static args: uid=500 gid=500 home=/home/vmail/%Lu allow_all_users=yes 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: postfix plugin: quota: maildir:User quota quota_rule: *:storage=8M quota_warning: storage=90%% /usr/local/bin/quota-warning.sh 90 quota_warning2: storage=75%% /usr/local/bin/quota-warning.sh 75 dovecot-ldap.conf ----------------- hosts = 123.456.789.123 123.456.789.124 base = OU=one,OU=two,OU=London,OU=GB,OU=User Accounts,DC=three,DC=core,DC=uk ldap_version = 3 auth_bind = yes auth_bind_userdn = %u at core.uk user_filter = (&(objectClass=person)(cn=%u)) user_attrs = msRADIUSFramedIPAddress=quota_rule=*:storage=%$k _____________________________________________________________ Get your FREE TheDoghouseMail email address at http://www.thedoghousemail.com
On Mon, 2009-08-17 at 08:59 -0700, south africa wrote:> user_attrs = msRADIUSFramedIPAddress=quota_rule=*:storage=%$kThis requires using userdb ldap.> userdb: > driver: passwd > userdb: > driver: static > args: uid=500 gid=500 home=/home/vmail/%Lu allow_all_users=yesBut you're using only passwd and static. (And you probably don't really want to use userdb passwd anyway.) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090817/3ee6d51b/attachment-0002.bin>
Hi Timo, thank you for your reply. I take the configuration from http://www.linuxmail.info/postfix-dovecot-ldap-centos-5/ especially the dovecot-configuration for passdb and userdb. As you mentioned in your reply I added the userdb ldap with a symbolic link on the original dovecot-ldap.conf: userdb: driver: ldap args: /etc/dovecot-ldap-userdb.conf but with no success. Any hints? I have another question: Does Dovecot expect a special "field type" for the ldap quota field (for ex. integer)? Greetings Paul --- tss at iki.fi wrote: From: Timo Sirainen <tss at iki.fi> To: southafrica at thedoghousemail.com Cc: dovecot at dovecot.org Subject: Re: [Dovecot] Dovecot and LDAP-Quotas Date: Mon, 17 Aug 2009 12:02:15 -0400 On Mon, 2009-08-17 at 08:59 -0700, south africa wrote:> user_attrs = msRADIUSFramedIPAddress=quota_rule=*:storage=%$kThis requires using userdb ldap.> userdb: > driver: passwd > userdb: > driver: static > args: uid=500 gid=500 home=/home/vmail/%Lu allow_all_users=yesBut you're using only passwd and static. (And you probably don't really want to use userdb passwd anyway.) _____________________________________________________________ Get your FREE TheDoghouseMail email address at http://www.thedoghousemail.com
> Do you have any other userdbs now? What does dovecot-ldap-userdb.conf > now contain? Is it only quota that's now broken or the logins > completely?The dovecot-ldap-userdb.conf is only a symbolic link on the original dovecot-ldap.conf. Only the ldap-quota is broken. The normal ldap-authentification goes like clockwork.>Set auth_debug=yes and log in, what does it say?"login" ------- Aug 25 11:51:18 auth(default): Info: client in: AUTH 1 PLAIN service=pop3 secured lip=123.456.789.72 rip=192.168.1.2 lport=995 rport=1984 Aug 25 11:51:18 auth(default): Info: client out: CONT 1 Aug 25 11:51:18 auth(default): Info: client in: CONT 1 Aug 25 11:51:18 auth(default): Info: client out: OK 1 user=testuser Aug 25 11:51:18 auth(default): Info: master in: REQUEST 1 21237 1 Aug 25 11:51:18 auth(default): Info: master out: USER 1 testuser uid=500 gid=500 home=/home/vmail/testuser Aug 25 11:51:18 pop3-login: Info: Login: user=<testuser>, method=PLAIN, rip=192.168.1.2, lip=123.456.789.72, TLS Aug 25 11:51:18 POP3(testuser): Info: Loading modules from directory: /usr/lib64/dovecot/pop3 Aug 25 11:51:18 POP3(testuser): Info: Module loaded: /usr/lib64/dovecot/pop3/lib10_quota_plugin.so Aug 25 11:51:18 POP3(testuser): Info: Effective uid=500, gid=500, home=/home/vmail/testuser Aug 25 11:51:18 POP3(testuser): Info: Quota root: name=User quota backend=maildir argsAug 25 11:51:18 POP3(testuser): Info: Quota rule: root=User quota mailbox=* bytes=8388608 messages=0 Aug 25 11:51:18 POP3(testuser): Info: Quota warning: bytes=7549747 (90%) messages=0 command=/usr/local/bin/quota-warning.sh 90 Aug 25 11:51:18 POP3(testuser): Info: Quota warning: bytes=6291456 (75%) messages=0 command=/usr/local/bin/quota-warning.sh 75 Aug 25 11:51:18 POP3(testuser): Info: maildir: data=/home/vmail/testuser/Maildir/ Aug 25 11:51:18 POP3(testuser): Info: maildir++: root=/home/vmail/testuser/Maildir, index=, control=, inbox=/home/vmail/testuser/Maildir Aug 25 11:51:18 POP3(testuser): Info: Namespace : Using permissions from /home/vmail/testuser/Maildir: mode=0700 gid=-1 Aug 25 11:51:18 POP3(testuser): Info: Disconnected: Logged out top=0/0, retr=1/2608, del=1/1, size=2591 Aug 25 11:51:18 auth(default): Info: new auth connection: pid=21247 "email delivery" ---------------- Aug 25 11:53:02 auth(default): Info: new auth connection: pid=21248 Aug 25 11:53:02deliver(testuser at core.uk): Info: Loading modules from directory: /usr/lib64/dovecot/lda Aug 25 11:53:02deliver(testuser at core.uk): Info: Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so Aug 25 11:53:02 auth(default): Info: master in: USER 1 testuser at core.uk service=deliver Aug 25 11:53:02 auth(default): Info: master out: USER 1 testuser uid=500 gid=500 home=/home/vmail/testuser Aug 25 11:53:02deliver(testuser at core.uk): Info: auth input: uid=500 Aug 25 11:53:02deliver(testuser at core.uk): Info: auth input: gid=500 Aug 25 11:53:02deliver(testuser at core.uk): Info: auth input: home=/home/vmail/testuser Aug 25 11:53:02deliver(testuser at core.uk): Info: userdb changed username to testuser Aug 25 11:53:02deliver(testuser): Info: Quota root: name=User quota backend=maildir argsAug 25 11:53:02deliver(testuser): Info: Quota rule: root=User quota mailbox=* bytes=8388608 messages=0 Aug 25 11:53:02deliver(testuser): Info: Quota warning: bytes=7549747 (90%) messages=0 command=/usr/local/bin/quota-warning.sh 90 Aug 25 11:53:02deliver(testuser): Info: Quota warning: bytes=6291456 (75%) messages=0 command=/usr/local/bin/quota-warning.sh 75 Aug 25 11:53:02deliver(testuser): Info: maildir: data=/home/vmail/testuser/Maildir/ Aug 25 11:53:02deliver(testuser): Info: maildir++: root=/home/vmail/testuser/Maildir, index=, control=, inbox=/home/vmail/testuser/Maildir Aug 25 11:53:02deliver(testuser): Info: Namespace : Using permissions from /home/vmail/testuser/Maildir: mode=0700 gid=-1 Aug 25 11:53:02deliver(testuser): Info: msgid=<E74BF4D485115048AF3A7D77FA7A75610B00F594 at exc1.three.core.uk>: saved mail to INBOX _____________________________________________________________ Get your FREE TheDoghouseMail email address at http://www.thedoghousemail.com
> It says nothing about LDAP here, which means that unless you filtered > out some lines it's not using LDAP at all for anything. What does your > dovecot -n output show now?dovecot -n # 1.2.3: /etc/dovecot.conf # OS: Linux 2.6.18-128.4.1.el5 x86_64 CentOS release 5.3 (Final) ext3 log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.log protocols: pop3 pop3s imap imaps listen(default): 123.456.789.71 listen(imap): 123.456.789.71 listen(pop3): 123.456.789.72 ssl_listen(default): ssl_listen(imap): ssl_listen(pop3): 123.456.789.72:995 ssl_ca_file: /etc/pki/dovecot/certs/pop_core_uk/trustcenter_intermediate.crt ssl_cert_file: /etc/pki/dovecot/certs/pop_core_uk/server.crt ssl_key_file: /etc/pki/dovecot/private/pop_core_uk/server.key 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: maildir:/home/vmail/%Lu/Maildir/ 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_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 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh lda: debug: yes postmaster_address: postmster at core.uk hostname: smtp.core.uk mail_plugins: quota quota_full_tempfail: yes log_path: /var/log/dovecot-deliver.log log_timestamp: %b %d %H:%M:%S rejection_reason: Ihre Nachricht an <%t> wurde automatisiert abgewiesen:%n%r auth default: mechanisms: plain login username_translation: @_._ verbose: yes debug: yes debug_passwords: yes passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: static args: uid=500 gid=500 home=/home/vmail/%Lu allow_all_users=yes userdb: driver: ldap args: /etc/dovecot-ldap-userdb.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: postfix plugin: quota: maildir:User quota quota_rule: *:storage=8M quota_warning: storage=90%% /usr/local/bin/quota-warning.sh 90 quota_warning2: storage=75%% /usr/local/bin/quota-warning.sh 75 ------------------------------------------------------------------ dovecot-ldap.conf hosts = 123.456.789.123 123.456.789.124 base = OU=one,OU=two,OU=London,OU=GB,OU=User Accounts,DC=three,DC=core,DC=uk ldap_version = 3 auth_bind = yes auth_bind_userdn = %u at three.core.uk user_filter = (&(objectClass=person)(cn=%u)) user_attrs = description=quota_rule=*:storage=%$M ------------------------------------------------------------------ dovecot-ldap-userdb.conf is a symbolic link on dovecot-ldap.conf _____________________________________________________________ Get your FREE TheDoghouseMail email address at http://www.thedoghousemail.com
Hi Timo, I solved the problem. The problem was the right order in dovecot.conf. "userdb ldap" should stand in front of "userdb static". Greetings --- tss at iki.fi wrote: From: Timo Sirainen <tss at iki.fi> To: southafrica at thedoghousemail.com Cc: Dovecot Mailing List <dovecot at dovecot.org> Subject: Re: [Dovecot] Dovecot and LDAP-Quotas Date: Tue, 25 Aug 2009 09:20:52 -0400 On Tue, 2009-08-25 at 04:08 -0700, south africa wrote:> Aug 25 11:51:18 auth(default): Info: client in: AUTH 1 PLAIN service=pop3 secured lip=123.456.789.72 rip=192.168.1.2 lport=995 rport=1984 > Aug 25 11:51:18 auth(default): Info: client out: CONT 1 > Aug 25 11:51:18 auth(default): Info: client in: CONT 1 > Aug 25 11:51:18 auth(default): Info: client out: OK 1 user=testuser > Aug 25 11:51:18 auth(default): Info: master in: REQUEST 1 21237 1 > Aug 25 11:51:18 auth(default): Info: master out: USER 1 testuser uid=500 gid=500 home=/home/vmail/testuserIt says nothing about LDAP here, which means that unless you filtered out some lines it's not using LDAP at all for anything. What does your dovecot -n output show now? _____________________________________________________________ Get your FREE TheDoghouseMail email address at http://www.thedoghousemail.com
Seemingly Similar Threads
- idmap_ad and RFC2370 (inconsistent results)
- Dovecot as a POP3-/POP3SSL-proxy in front of exchange 2003
- Moving messages between servers with different configurations
- Possible bug in authentication cache in dovecot 1.1.alpha4
- Roaming profils cannot sync four files