Discussion Locked

Quota exceeded

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have implemented a quota on one of my mail servers. The quota setup limits users to only 5mb (soft=5120 hard=5121) of disk space. But as it approaches 4mb, I cannot access thru it anymore. The popper (qpopper 4.04) doesn't accepts the password anymore. When I trace the log, it says there "-ERR [SYS/TEMP] Unable to copy mail spool file, quota exceeded (122)", but there is still 1mb left on the quota, so it is still not exceeding the said quota. Could anybody help me regarding this.

6 replies

by wittanone

Hello, try this to clear your problem,

/sbin/quotaoff -a
/sbin/quotacheck -ugia
/sbin/quotaon -a

The first command will turn your quotas' off.
The next command will test/check the quotas' one at a time for errors and/or corruption and allowyou a chance to fix them,
The last turns the quotas' back on.
It seems to be working for the customers where I work.

I found this information at: http://www.die.net/doc/linux/man/man8/quotacheck.8.html

by paulo.sedrez

Common mistake.

The problem is that qpopper - and other pop server - try very hard to preserve the original mailbox, so that when they are updating it, they are actually acting on a copy - so, duplicating the disk space requirements.

The solution: use the hard limit to be the double of the soft limit. This will will let room to qpopper work, will still warn you of quota exceeded and let the user a 7 days grace period to clean his/hers mailbox.

--Sedrez

by paulo.sedrez

There is another solution, but you eventually will get another kind of problem.

If you are using qpopper 4, you can specify a diferent directory for the temporary drop file. The daemon will then *copy* the file to that directory, which could be in another partition, with another quota.

The main problem is that this solution will be slower (copy file and back). Eventually, the user will receive e-mail while the popper is still executing; on return, it will not be able to put all mailbox back (because of quota restraints).

If you option is that, you can create a configuration file - let's say, /etc/qpopper.conf - with the line "set temp-dir = /var/spool/poptemp", and add the parameter "-f /etc/qpopper.conf" on the qpopper call (xinetd.conf? xinited.d/qpopper?).

The best solution would be to configure the maildrop program - like procmail, in /etc/procmailrc - to check if the user exceeded its soft quota limit, and in this cases send the file back to queue.

If that is your option, you can use this as base for your /etc/procmailrc:

# Drop privilegies, became user
DROPPRIVS=yes
# Check if quota exceeded
QUOTA_OUT=`/usr/bin/quota | /bin/grep -c `

# if QUOTA_OUT is not 0, requeue the message
:0:
* ! QUOTA_OUT ?? 0
| /bin/kill -TERM $$

--Sedrez

This discussion is closed to new replies.