File Size Limit in /var/spool/mail

Justin Willmert justin at
Wed Dec 14 15:50:36 UTC 2005

Christofer C. Bell wrote:

>On 12/13/05, Manish Kathuria <manish at> wrote:
>>Is there any limit on the size of the mail spool files in the spool
>>directory /var/spool/mail ? I have a user whose mail file is above 2 GB
>>and procmail cant write any further mails there ? AFAIK, the file size
>>limits are pretty high and in TB now.
>2GB is the maximum filesize and it's due to limitations in the
>operating system's filesystem driver, not any kind of quota.  There
>may be other filesystem options for Linux or options you can feed
>mke3fs that will allow larger files (like enabling "largefiles" on
>vxfs) but I'm not sure what they are.  Anyway, as for your user's
>email, there is nothing that can be done other than deleting some of
>the mail there to make room for more.
>If you want, you can backup the partition that the data is on, create
>a filesystem there that's capable of supporting files larger than 2GB,
>and then restoring the data.  Keep in mind that filesystems that
>support larger files generally have less space available due to the
>filesytem accounting information necessary to support the larger files
>(which is handled much like segment + offset memory in the old DOS PC
>Best of luck!
>"I trust the Democrats to take away my money, which I can afford.  I
>trust the Republicans to take away my freedom, which I cannot."
I'm assuming you're using the mbox format if you have a 2GB mail file. 
With that, I'd suggest thinking of moving to a maildir format. This 
would get around the filesize limit because all of the emails would be 
split into multiple files. There are scripts you can find to read all 
the entries in your spool file and split them into their own files. 
Another advantage would be, if you are using IMAP, this allows you to 
create folders to split up your mail. You'll need to research how the 
maildir format works with POP3 ('cause I've never done it), but I'd 
guess it would work. You may also need to worry about whether there will 
be enough inodes on the drive to accomidate all those files. I don't 
know if that'll be a problem (I don't know much about inodes and all 
that stuff), but I've heard of other people running out of them with too 
many files, so I'm just making you aware of it.

Hopefully that makes sense {^_^},
Justin Willmert

More information about the fedora-list mailing list