Subject: Disk quota exceeded problems...

From: Steve Joseph Herber <[email-masked]>
Date: Fri, 7 Nov 1997 14:49:13 -0500 (EST)

Hi,

I am running IMAP/POP3 servers using your version 4.38 sources on a Sun
Solaris 2.4 system.  I am also using disk quotas on the user accounts.

I have had problems in the past where a user who exceeds disk quota and
makes a POP3 connection generating many pages of console output with
messages of the form....

timestamp & hostname ipop3d[PID]: Retrying after disk error user=someone
host=somePPPport mbx=path/INBOX: Disk quota exceeded.

...over and over until the process is killed off.  Is this fixed in any of
your later releases or doesn't the IMAP/POP3 servers support disk quotas?

Thanks.

Steve Herber                    Internet: [email-masked]
Systems Programming Manager     or        [email-masked]
Bowling Green State University  Bowling Green, OH

---

From: Mark Crispin <[email-masked]>
Date: Fri, 7 Nov 1997 19:52:08 -0800 (PST)

> Solaris 2.4 system.  I am also using disk quotas on the user accounts.

I have no idea what "version 4.38" is.  That is certainly not one of my
version numbers.  Is it possible that you are running Bill Yeager's server,
which is a Solaris-specific variant of my server?  If so, you need to contact
SUN and/or Bill Yeager for technical support.

> your later releases or doesn't the IMAP/POP3 servers support disk quotas?

This indicates that a disk quota exceeded condition happened when rewriting
the mailbox file, *after* it has already started overwriting the file (and
thus it is no longer able to back down since the file is clobbered).  The
server waits a bit, then tries again, in hope that some nice admin will see
what's going on and give it enough disk to finish writing the file, as opposed
to killing it and leaving the poor user with a clobbered file.

In my code, this situation should never happen.  The UNIX mailbox local file
code (which is the only possible case in which a disk quota error could
happen, since it's the only case where a mailbox can grow) calculates the size
of the file after rewriting, and appends nuls to the end of the file to grow
it to the needed size.  It does the rewrite only if it can grow the file to
that size, then it overwrites with the new data in place.  If it can't grow
the file, then it undoes the partial nuls and gives a quota error without
retrying (since the file hasn't been damaged).

It is important to know here whether you are running my code or Bill's code,
since the local mailbox file handling is where most of Bill's changes are.  If
it is Bill's code, then Bill needs to know about it.

If it's my code, this is supposed to be impossible (see above) and I want very
much to understand what happened and why.

---

From: Steve Joseph Herber <[email-masked]>
Date: Mon, 10 Nov 1997 12:14:44 -0500 (EST)

>From [email-masked] Mon Nov 10 12:08:59 1997 
>Date: Sun, 09 Nov 1997 21:00:28 -0800 (PST)  
>From: William Yeager<[email-masked]>
>To: Mark Crispin <[email-masked]> 
>Cc: Steve Joseph Herber <[email-masked]>, 
> Bill Yeager <[email-masked]>, [email-masked] 
>Subject: re: Disk quota exceeded problems... 
> 
>>Is it possible that you are running Bill Yeager's server, 
>>which is a Solaris-specific variant of my server?  If so, you need to
>>contact SUN and/or Bill Yeager for technical support.  
>Not mime. We have 1.0, 2.0 and tomorrow 3.1.  
> 
>Bill

The code is the imap-4.1.BETA sources downloaded from U Washington.  I
grepped through the sources for a version number because I know you have
released several version of this code under this tar filename and I was
just trying to be more specific.  I'm sorry if it just added to the
confusion.

> much to understand what happened and why.

Is there anything else I can provide to get some additional information to
you Mark?

---

From: Mark Crispin <[email-masked]>
Date: Mon, 10 Nov 1997 10:41:30 -0800 (PST)

I just thought of a way that this could happen.

By any chance, are you applying quota control over /tmp?  You shouldn't!!!

---

From: Steve Joseph Herber <[email-masked]>
Date: Mon, 10 Nov 1997 14:06:43 -0500 (EST)

> By any chance, are you applying quota control over /tmp?  You shouldn't!!!

No but we do support quotas on /home, /var and /usr.  Here is the output
of the mount command on our server and a typical users quota setup...

woody.wcnet.org# mount
/ on /dev/dsk/c0t3d0s0 read/write/setuid on Mon Nov 10 09:13:59 1997
/proc on /proc read/write/setuid on Mon Nov 10 09:13:59 1997
/dev/fd on fd read/write/setuid on Mon Nov 10 09:13:59 1997
/var on /dev/dsk/c1t0d0s6 read/write/setuid on Mon Nov 10 09:13:59 1997
/opt on /dev/dsk/c1t0d0s5 setuid/read/write on Mon Nov 10 09:53:39 1997
/var/spool/news on /dev/md/dsk/d1 setuid/read/write on Mon Nov 10 09:53:39
/home on /dev/md/dsk/d0 setuid/read/write/quota on Mon Nov 10 09:53:39
/cdrom/im17_cd on /vol/dev/dsk/c0t6/im17_cd read only on Mon Nov 10
woody.wcnet.org# quota -v connkent
Disk quotas for connkent (uid 570):
Filesystem     usage  quota  limit    timeleft  files  quota  limit
/home            902   4000   8000                 31    300    350            
woody.wcnet.org#

---

From: Mark Crispin <[email-masked]>
Date: Mon, 10 Nov 1997 11:15:11 -0800 (PST)

On Mon, 10 Nov 1997 14:06:43 -0500 (EST), Steve Joseph Herber wrote:
> No but we do support quotas on /home, /var and /usr.

Usually, /tmp and /usr/tmp is part of /var.  Let me rephrase the question: can
the user write data onto the temporary directories without it counting against
the user's disk quota?

By the way, I'm curious; do you really limit your users to $.20 worth of disk
space?

---

From: Steve Joseph Herber <[email-masked]>
Date: Mon, 10 Nov 1997 15:24:06 -0500 (EST)

> the user write data onto the temporary directories without it counting against

No the only place quotas will affect the users is in their /home
partition.

> By the way, I'm curious; do you really limit your users to $.20 worth of disk

Is $.40 better?  We tried to set a quota high enough to allow most work to
be processed.  It is basicly there to prevent a user from inadvertantly
loading up the disk fully by themselves.

Don't you enforce ANY quotas U Washington?