Re: [exim] quota in GB

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: B. Johannessen
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] quota in GB
Beber wrote:
> I tryed to put quota for users over 3 GB and I got serveral exim
> errors :
> 2006-10-24 13:06:19 1GcJhb-0006Bp-BN == xxxx@??? R=localuser T=ham_delivery defer (-1): quota value 5242880000 is too large (overflow) in ham_delivery transport
> What is the limit ? How to bypass it ?


This is not something I'm intimately familiar with, but I was reviewing
the Exim maildir quota code just yesterday so I may be able to shed some
light on this. Someone please correct me if I'm wrong!

As far as I can tell, Exim uses off_t when working with quotas[1]. So
the limit is controlled by the range of off_t. To find the size of
off_t, you can use the following program:

#include <sys/types.h>
#include <stdio.h>

int main(void) {
         printf("%i\n", sizeof(off_t));
         return 0;
}


This returns 4 on both my IBM T42[2] laptop running Linux and my
Sun-Fire-V210[3] running Solaris 10. This gives you a maximum value of
2^31-1 (2147483647, or 2G) if off_t is signed and 2^32-1 (4294967296 or
4G) if it is unsigned.

I'll buy a beer for the first person to find me an authoritative
reference on the signedness of off_t :-)

On both the above architectures I was able to extend sizeof(off_t) to 8
by defining _FILE_OFFSET_BITS to 64[4] before including sys/types.h, but
it's quite likely you'll have to do a fair bit more to have Exim work
with bigger quotas.

If you have an IMAP server accessing the mailbox, this will also need to
support such quotas. For example, I've seen Courier have a nervous
breakdown when asked to handle quotas larger the 2G on 32bit Linux.


    Bob


[1]: exim-4.63/src/transports/tf_maildir.c line 252
[2]: uname -m: i686
[3]: uname -m: sun4u
[4]: #define _FILE_OFFSET_BITS 64