[Dovecot] quota - dict permission denied
when I enabled quota plugin the following error occured :
net_connect_unix(/usr/local/var/run/dovecot/dict-server) failed: Permission denied Any ideas? My config are as follows : .. dict { #quota = mysql:/etc/dovecot-dict-quota.conf quotadict = mysql:/usr/local/etc/dovecot-dict-quota.conf } .. quota = dict:storage=81920:messages=5000 proxy::quotadict
/usr/local/etc/dovecot-dict-quota.conf: connect = host=xxxxx dbname=xxxxx user=xxxxx password=xxxxx table = quota select_field = current where_field = path username_field = username
I can connect to the database thru mysql prompt. dovecot version 1.0 rc5
-- azhar --
when I enabled quota plugin the following error occured :
net_connect_unix(/usr/local/var/run/dovecot/dict-server) failed: Permission denied Any ideas? My config are as follows : .. dict { #quota = mysql:/etc/dovecot- dict-quota.conf quotadict = mysql:/usr/local/etc/dovecot-dict-quota.conf } .. quota = dict:storage=81920:messages=5000 proxy::quotadict
/usr/local/etc/dovecot-dict-quota.conf: connect = host=xxxxx dbname=xxxxx user=xxxxx password=xxxxx table = quota select_field = current where_field = path username_field = username
I can connect to the database thru mysql prompt. dovecot version 1.0 rc5
-- azhar --
On Tue, 2007-02-27 at 18:05 +0800, Abu Gid wrote:
when I enabled quota plugin the following error occured :
net_connect_unix(/usr/local/var/run/dovecot/dict-server) failed: Permission denied Any ideas?
Do /usr/local/var and /usr/local/var/run have a+x permissions?
I can connect to the database thru mysql prompt. dovecot version 1.0 rc5
You should upgrade though. Even if you fix the permission error, dict quota won't work in rc5. Actually I'm not sure if it's 100% working in rc24 yet either.
On 3/1/07, Timo Sirainen tss@iki.fi wrote:
On Tue, 2007-02-27 at 18:05 +0800, Abu Gid wrote:
when I enabled quota plugin the following error occured :
net_connect_unix(/usr/local/var/run/dovecot/dict-server) failed: Permission denied Any ideas?
Do /usr/local/var and /usr/local/var/run have a+x permissions?
I can connect to the database thru mysql prompt. dovecot version 1.0 rc5
You should upgrade though. Even if you fix the permission error, dict quota won't work in rc5. Actually I'm not sure if it's 100% working in rc24 yet either.
Are you working on it? I would appreciate it and yes I will upgrade to the latest rc25. Which rc is the most stable?
-- Azhar --
On Thu, 2007-03-01 at 15:43 +0800, Abu Gid wrote:
You should upgrade though. Even if you fix the permission error, dict quota won't work in rc5. Actually I'm not sure if it's 100% working in rc24 yet either.
Are you working on it?
In my last tests it was working correctly, but someone in this list said he had problems with the quota giving the right value. So I'm mostly just waiting for someone to tell me what the problem is. :)
But are you sure you want to use the dict quota? Maildir++ quota works fine for most people.
I would appreciate it and yes I will upgrade to the latest rc25. Which rc is the most stable?
The latest one always has the known problems fixed. I'll make rc25 today.
On 3/1/07, Timo Sirainen tss@iki.fi wrote:
On Thu, 2007-03-01 at 15:43 +0800, Abu Gid wrote:
You should upgrade though. Even if you fix the permission error, dict quota won't work in rc5. Actually I'm not sure if it's 100% working in rc24 yet either.
Are you working on it?
In my last tests it was working correctly, but someone in this list said he had problems with the quota giving the right value. So I'm mostly just waiting for someone to tell me what the problem is. :)
But are you sure you want to use the dict quota? Maildir++ quota works fine for most people.
I would appreciate it and yes I will upgrade to the latest rc25. Which rc is the most stable?
The latest one always has the known problems fixed. I'll make rc25 today.
I'm using the mbox format. If I am to use the dirsize method ,how do I enforce different quota for different users. Apart from the doc, I cannot find any example of configurations for dirsize. Btw thanks for the fast response.
-- azhar --
On 1.3.2007, at 12.26, Abu Gid wrote:
I'm using the mbox format. If I am to use the dirsize method ,how
do I enforce different quota for different users. Apart from the
doc, I cannot find any example of configurations for dirsize. Btw
thanks for the fast response.
OK, dirsize should be pretty good with mboxes as long as the user
doesn't have hundreds of them.
You'll have to make your userdb return "quota=dirsize:storage=123456"
setting for different users. What userdb do you use? http://
wiki.dovecot.org/Quota shows some examples for SQL/LDAP.
On 3/1/07, Timo Sirainen tss@iki.fi wrote:
On 1.3.2007, at 12.26, Abu Gid wrote:
I'm using the mbox format. If I am to use the dirsize method ,how do I enforce different quota for different users. Apart from the doc, I cannot find any example of configurations for dirsize. Btw thanks for the fast response.
OK, dirsize should be pretty good with mboxes as long as the user doesn't have hundreds of them.
You'll have to make your userdb return "quota=dirsize:storage=123456" setting for different users. What userdb do you use? http:// wiki.dovecot.org/Quota shows some examples for SQL/LDAP.
The problem is I don't use any userdb, only use the passdb_pam. So, do I
have to use userdb to authenticate users? or can I just use any userdb for the quota part only. If that is so how can I set up the db config? search the wiki.dovecot.org/Quota but could not find any config that suit my current config ,that's why I plan to use the dict server. Thanks again.
-- azhar --
On Thu, 2007-03-01 at 20:29 +0800, Abu Gid wrote:
You'll have to make your userdb return "quota=dirsize:storage=123456" setting for different users. What userdb do you use? http:// wiki.dovecot.org/Quota shows some examples for SQL/LDAP.
The problem is I don't use any userdb, only use the passdb_pam.
You do use a userdb. Most likely passwd. Otherwise you couldn't log in at all.
So, do I have to use userdb to authenticate users? or can I just use any userdb for the quota part only. If that is so how can I set up the db config? search the wiki.dovecot.org/Quota but could not find any config that suit my current config ,that's why I plan to use the dict server. Thanks again.
You'll still have the exact same problem with dict, since you'd still have to set the quota from the userdb.
There's an alternative way you could do with http://wiki.dovecot.org/PostLoginScripting, for example (just the simplest script I could think of):
#!/bin/sh
quota=/etc/dovecot-quota/$USER
if [ -f $quota ]; then
export QUOTA=dirsize:storage=cat $quota
fi
exec /usr/local/libexec/dovecot/imap
On 3/1/07, Timo Sirainen tss@iki.fi wrote:
On Thu, 2007-03-01 at 20:29 +0800, Abu Gid wrote:
You'll have to make your userdb return "quota=dirsize:storage=123456" setting for different users. What userdb do you use? http:// wiki.dovecot.org/Quota shows some examples for SQL/LDAP.
The problem is I don't use any userdb, only use the passdb_pam.
You do use a userdb. Most likely passwd. Otherwise you couldn't log in at all.
So, do I have to use userdb to authenticate users? or can I just use any userdb for the quota part only. If that is so how can I set up the db config? search the wiki.dovecot.org/Quota but could not find any config that suit my current config ,that's why I plan to use the dict server. Thanks again.
You'll still have the exact same problem with dict, since you'd still have to set the quota from the userdb.
There's an alternative way you could do with http://wiki.dovecot.org/PostLoginScripting, for example (just the simplest script I could think of):
#!/bin/sh
quota=/etc/dovecot-quota/$USER if [ -f $quota ]; then export QUOTA=dirsize:storage=
cat $quota
fiexec /usr/local/libexec/dovecot/imap
Have done that . What should I put in the plugin {}. Should it be :
quota = dirsize:storage=10240 or quota = $QUOTA
Sorry, I'm a bit of newbie at this. -- azhar --
On 1.3.2007, at 16.29, Abu Gid wrote:
#!/bin/sh
quota=/etc/dovecot-quota/$USER if [ -f $quota ]; then export QUOTA=dirsize:storage=
cat $quota
fiexec /usr/local/libexec/dovecot/imap
Have done that . What should I put in the plugin {}. Should it be : quota = dirsize:storage=10240 or quota = $QUOTA
Nothing. All settings in dovecot.conf are put to environment
variables, so the export QUOTA=.. above will overwrite whatever you
set in dovecot.conf.
participants (2)
-
Abu Gid
-
Timo Sirainen