Hi,
Ok I found out how to do it..
The autocreatequota does not work if you build the mailbox using cyradm.
The correct way to invoke setquota in cyradm is this way
open (MBOX,">$filename");
print MBOX "eval cyradm connect imap localhost\n";
print MBOX "eval imap authenticate -pwcommand {{ list \"$adm_user\" \"$adm_passwd\"
}}\n";
print MBOX "eval imap setquota \"user.$username\" \"storage\" \"20480\"\n";
close (MBOX);
where the size is set to 20Mb
However there is a question that now pops to mind...
Every time a quota is set, a file in created under /var/imap/quota/$username
If the number of users is large i.e. over 30k users, you will have
problems under linux, since you can not create more that 30k
directories/files under one directory. I am assuming similar limits exists
in other operating systems.. So for now, I scan all account using du -sk
and any account over 20Mb gets a quota inforcement, otherwise I will run
out of quota files..
Has anyone faced this problem?? Any ideas??
And I know I should not ask this here, but is there a proven
commercial replacement or companion for Cyrus to scale it? We have over
300k accounts now, and problems are showing on a steady pace.
Thanks in advance..
Adonis
On Tue, 21 Nov 2000, Adonis El Fakih wrote:
> Date: Tue, 21 Nov 2000 02:17:08 -0500 (EST)
> From: Adonis El Fakih <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Inforcing quota limits
>
> Hi,
>
> We are using cyrus-imapd-v1.5.19 with sendmail, and we want to inforce a
> quota limit of 20Mb. Can someone help me get the right configuratioin
> going??
>
> This is what I have so far...
> in sendmail.cf
> Mcyrus, P=/usr/cyrus/bin/deliver, F=lsDFMoqSPn9A5@, S=10, R=20/40, T=X-Unix,
> U=cyrus:mail,
> A=deliver -e -m $h -- $u
>
> in imapd.conf
> autocreatequota: should we use
>
> 20480 assuming it is in kb or 20971520 if it is in bytes??
>
> We create a mailbox using this command
> eval imap createmailbox user.$username
>
> However I am not sure if we should use if the autocreatequota is set...
> eval imap setquota user.$username nnn
>
> Any help will be appretiated..
> Thanks in advance
>
> Adonis
>
--
Adonis El Fakih - President, CEO
Engineering Graphical Solutions, Inc. (EGS)
70 Boston Road, Suite A301, Chelmsford MA 01824 USA
Fax (978) 244-0544 - [EMAIL PROTECTED]