Abu Gid | 1 Mar 08:43 2007
Picon

Re: quota - dict permission denied



On 3/1/07, Timo Sirainen <tss <at> 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 --


Joseba Torre | 1 Mar 08:52 2007
Picon
Picon

Re: fs quota - what I am doing wrong?

Hi

El Lunes, 26 de Febrero de 2007 15:06, Václav Hůla escribió:
>
> root <at> zen:/var/log# grep ax mail.err |tail -n 4
> Feb 26 15:02:27 zen dovecot: IMAP(ax): quotactl(Q_GETQUOTA, /dev/sda8)
> failed: Invalid argument
> Feb 26 15:02:27 zen dovecot: IMAP(ax): Dovecot was compiled with Linux
> quota v2 support, try changing it (--with-linux-quota configure option)
> Feb 26 15:03:28 zen dovecot: IMAP(ax): quotactl(Q_GETQUOTA, /dev/sda8)
> failed: Invalid argument
> Feb 26 15:03:28 zen dovecot: IMAP(ax): Dovecot was compiled with Linux
> quota v2 support, try changing it (--with-linux-quota configure option)
>
> In sheer desperation I compiled dovecot with v1 quotas, but that fails
> too. Can anyone point me into right direction?

May be a silly idea, but have you forced quota v2 support? I had a similar 
problem -I can't remeber if exactly the same, though-, and solved it 
with --with-linux-quota=2. Try it.

Aaaaaaaaaagur.
--

-- 
Joseba Torre. CIDIR Bizkaia.

Václav Hůla | 1 Mar 10:05 2007
Picon

Re: fs quota - what I am doing wrong?

Timo Sirainen napsal(a):
> On Mon, 2007-02-26 at 15:06 +0100, Václav Hůla wrote:
>> Feb 26 15:02:27 zen dovecot: IMAP(ax): quotactl(Q_GETQUOTA, /dev/sda8) 
>> failed: Invalid argument
>> Feb 26 15:02:27 zen dovecot: IMAP(ax): Dovecot was compiled with Linux 
>> quota v2 support, try changing it (--with-linux-quota configure option)
> 
> Maybe the quota headers aren't matching what the kernel is running. I've
> no idea really, the fs quota code either seems to work or it doesn't..
> 
> You could try checking with strace what's the difference between
> Dovecot's quotactl() call and "quota" command's quotactl() call.

The difference:

quota command:
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbffff218) = 0

dovecot:
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, {0, 135145272, 
1075193885, 1075193885, 135145168, 135099456, 3221217528, 134953542}) = 
-1 EINVAL (Invalid argument)

I found quotactl in 3 places in /usr/include:

/usr/include/linux/quota.h
long quotactl __P ((unsigned int, const char *, int, caddr_t));

/usr/include/sys/quota.h
extern int quotactl (int __cmd, const char *__special, int __id,
                      caddr_t __addr) __THROW;

/usr/include/linux/security.h
int (*quotactl) (int cmds, int type, int id, struct super_block * sb);

To me it looks that dovecot uses the linux/security one, but sadly I 
have no idea why or how to stop it.

Hula
--

-- 
Václav Hůla,
správce unixových serverů
Přírodovědecká fakulta
Univerzita Karlova v Praze

FreeStyle | 1 Mar 10:38 2007

How to Prevent IMAP Folders being moved, deleted or renamed

Hello I use exim/dovecot combination for mail delivery and pickup and I'm wondering how I can prevent users from moving, deleting or renaming particular IMAP folders. I use the MailDir mailbox format.


The reason for doing this is that I have some special exim filters which deliver mail to specified directories. I don't want users to be able to change these folders because it will mess up the filtering.


Also my mail client (Thunderbird) doesn't check the filter folders automatically is there an option in dovecot that lets you send notification to clients when new messages arrive in certain folders.


more info: http://kb.mozillazine.org/How_do_I_check_for_new_messages_in_other_folders

Timo Sirainen | 1 Mar 11:06 2007
Picon
Picon

Re: fs quota - what I am doing wrong?

On Thu, 2007-03-01 at 10:05 +0100, Václav Hůla wrote:
> quota command:
> quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbffff218) = 0
> 
> dovecot:
> quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, {0, 135145272, 
> 1075193885, 1075193885, 135145168, 135099456, 3221217528, 134953542}) = 
> -1 EINVAL (Invalid argument)
..
> /usr/include/sys/quota.h
> extern int quotactl (int __cmd, const char *__special, int __id,
>                       caddr_t __addr) __THROW;

Actually Dovecot's quotactl() call looks correct to me. Q_GETFMT is
something different. Did you give user parameter to quota command while
straceing it?
Timo Sirainen | 1 Mar 11:09 2007
Picon
Picon

Re: How to Prevent IMAP Folders being moved, deleted or renamed

On Thu, 2007-03-01 at 09:38 +0000, FreeStyle wrote:
> Hello I use exim/dovecot combination for mail delivery and pickup and
> I'm wondering how I can prevent users from moving, deleting or
> renaming particular IMAP folders. I use the MailDir mailbox format.

I think ACL plugin with global ACL rules would do that. Give the owner
all the permissions except "delete". http://wiki.dovecot.org/ACL

Timo Sirainen | 1 Mar 11:13 2007
Picon
Picon

Re: quota - dict permission denied

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.
Charles Bueche | 1 Mar 11:15 2007
Picon

Thunderbird : open() failed with index file /home/XYZ/mail/.imap/Trash/dovecot.index: Not a directory

Hi,

almost everything is in the subject.

Server : Solaris 9 /SPARC, Dovecot 1.0.rc22

Client :
   Mac OS X 10.4.8 (8L2127)
   Kernel-Version:	Darwin 8.8.1
   Thunderbird is: german Version 1.5.0.9 (20061207)

With OS X Mail.app, message deletion works. With Thunderbird, a  
warning popup appear on the desktop. English translation is about  
"command failed, internal error occurred". The server log shows :

> Mar  1 10:50:35 ZZZ dovecot: [ID 107833 mail.error] IMAP(XYZ): open 
> () failed with index file /home/XYZ/mail/.imap/Trash/dovecot.index:  
> Not a directory

After checking, I see "Trash plugin was more or less broken with  
multiple namespaces and with multiple trash mailboxes" in rc24  
release notes. Would an update to rc24 fix my user's issue ?

Hints welcome,
Charles

--

-- 
Charles Bueche <charles <at> bueche.ch>
sand, snow, wave, wind and net -surfer
A-Cat SUI 192

Václav Hůla | 1 Mar 11:25 2007
Picon

Re: fs quota - what I am doing wrong?

Timo Sirainen napsal(a):
> On Thu, 2007-03-01 at 10:05 +0100, Václav Hůla wrote:
>> quota command:
>> quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbffff218) = 0
>>
>> dovecot:
>> quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, {0, 135145272, 
>> 1075193885, 1075193885, 135145168, 135099456, 3221217528, 134953542}) = 
>> -1 EINVAL (Invalid argument)
> ..
>> /usr/include/sys/quota.h
>> extern int quotactl (int __cmd, const char *__special, int __id,
>>                       caddr_t __addr) __THROW;
> 
> Actually Dovecot's quotactl() call looks correct to me. Q_GETFMT is
> something different. Did you give user parameter to quota command while
> straceing it?

Yes but it does not make much difference:

ax <at> zen:~$ strace /usr/bin/quota 2>&1 |grep quotactl
quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address)
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbfffe778) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbfffe6f0) = 0
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbfffe778) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbfffe6f0) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, 0xbfffe5f0) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 506, 0xbfffe5f0) = 0

ax <at> zen:~$ strace /usr/bin/quota ax 2>&1 |grep quotactl
quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address)
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbfffe078) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbfffdff0) = 0
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbfffe078) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbfffdff0) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, 0xbfffdef0) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 506, 0xbfffdef0) = 0

root <at> zen:~# strace /usr/bin/quota 2>&1 |grep quotactl
quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address)
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbffff398) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbffff310) = 0
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbffff398) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbffff310) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 0, 0xbffff210) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 0, 0xbffff210) = 0

root <at> zen:~# strace /usr/bin/quota ax 2>&1 |grep quotactl
quotactl(Q_XGETQSTAT|USRQUOTA, NULL, 0, NULL) = -1 EFAULT (Bad address)
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda8", 0, 0xbfffec18) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda8", 0, 0xbfffeb90) = 0
quotactl(Q_GETFMT|USRQUOTA, "/dev/sda7", 0, 0xbfffec18) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/sda7", 0, 0xbfffeb90) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda8", 506, 0xbfffea90) = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda7", 506, 0xbfffea90) = 0

for full strace of last command see 
http://www.natur.cuni.cz/~ax/strace.quota.user

Hula
--

-- 
Václav Hůla,
správce unixových serverů
Přírodovědecká fakulta
Univerzita Karlova v Praze

Abu Gid | 1 Mar 11:26 2007
Picon

Re: quota - dict permission denied



On 3/1/07, Timo Sirainen <tss <at> 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 --



Gmane