[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] disk quotas and mbox append
From: |
Alain Magloire |
Subject: |
Re: [bug-mailutils] disk quotas and mbox append |
Date: |
Tue, 13 Jan 2004 11:15:06 -0500 (EST) |
>
> Dear All,
>
> I have a question about disk quotas.
> How does mailutils/mbox deal with disk quotas? Does anybody have any
> experience with them? Do they work well with Linux quotas on kernel 2.4
> over *NFS* ?
>
> I've looked through the mail archive and cannot find any infos about
> this. I've looked through the code a little but cannot pinpoint what
> exactly happens when, say whilst appending a message to a mailbox, disk
> space runs out due to quotas. Does the mailbox get corrected or
> truncated in some expunge procedure?
> If after writing to the mailbox you get the first "Disk quota exceeded"
> error at close() what is done about this?
>
Usually expunging means removing emails so you should endup having
less email then before.
The expunge is done in steps:
- copy the original mailbox to a temporary place, filtering out the mark for
deletion
- truncate the original mailbox to the new size.
- copy the temp back to the original.
So if the truncate fails, the expunge() code bails out.
Usually the truncate(), if it fails, will live the original file untouch ...
in theory.
So the problem of quotas is when appending/saving emails to a new mailbox.
It this case, you may have a problem. The next write() may fail leaving
things in a bad state.
For "new" emails, this is rather done with sendmail or whatever MTA you have on
your system. We do have a mail.local in mailutils, I did not check if can
handle
the case where a next write() fails.