Users quota's too high

Merv Hosting

New member
Joined
Feb 8, 2004
Messages
19
Location
The Netherlands
Hello,

What I know:
There is DiskUsage/space & domain-DiskUsage/space
There is Bandwidth & domain-Bandwith


What the global problem is:
Although all of my users have only one domain, these quota's are not equal.


Specific problem:
With one user (but I've had it once before) I gave 15 mb diskspace and he got 10mb standard mailspace.
The domain-diskusage is 0.014 (one page) and domain bandwith is 0.17. And the diskusage is 14.9mb and the bandwith is 1.05.
(log usage is 0.03)


Related info:
It is known that the user has a lot of email traffic. On a thew checks I saw it was 8mb, 13mb, 11mb, 5mb.
The first time he ranned over the 15diskspace he automaticaly got an DA-mail + he couldn't use the webmail (trying to delete messages). After he downloaded all the mail, there was no problem.

One time I created a test user with 15mb. I didn't do anything with it. The next day it had also 14,9 mb usage.
(luckaly it was a testuser, so I could delete it)


Questions:
1. Why are the diskusages and bandwiths not the same ?
2. And how can a user get 14.9mb more used diskspace ?
3. And is there a relation with pop and imap (whatever their difference is) ?


Thanks in advance,

Mervyn
 
Hello,

Questions:
1. Why are the diskusages and bandwiths not the same ?
Assuming you're comparing domain usage to the account usage, these numbers will differ because there are many items that don't have any relation to any particular domain. One example is mysql databases. They arn't attached to any domain, so their disk usage is added to the account total instead of the domain total. Also, all bandwidth done through DirectAdmin is added as well.. this is domain independant.

2. And how can a user get 14.9mb more used diskspace ?
When a disk quota is assigned, the limit will cap the users usage of files owned by them in their home directory. (/home/username). Items such as email and mysql databases are not controlled by the system quotas because they are stored on different partitions and are not always own by their user id (mysql). Therefor, DA will just add those disk usages to the total system quota usage at the end of the day. So if a user is using 15/15 meg in their /home/username directory, they can still have some space being used by databases and emails. The numbers are added and emailed to you so that you can consciously make an educated choice as to what you want to do with that user.

3. And is there a relation with pop and imap (whatever their difference is) ?
Pop and Imap accounts are exactly the same, except in the way that they are accessed. They both access the same email file, but vm-pop3d and imapd are different programs that use a different protocol for accessing those files.

John
 
Thanks for your quick answer.

I don't get answer 2 for 100%. Probably my English.
(what does "cap" mean ?)

Are you saying that every file within the /home/username dir is added to a total which is called TotalDiskSpace.
So the amount of mb's come from the following dir's:
- mail (only files like: INBOX.Drafts, INBOX.Sent, and ....Trash (= 1.5K))
- (imap)
- logs (backuped logfiles)
- stats
- And of course the website itself
.
Email and Databases are stored seperately.
But are also added to the users TotalDiskSpace.

If I think you meant this, than the following questions rise:

4. I thought the users emaillimit (with me: 10mb) was seperate of the given max-DiskSpace (with me: 15mb)
(so if a user has 15mb and 3 popaccounts he sees he has 15mb, and has 10mb per account (so 30mb) extra for emailuse only)
--> So, why has a my user, which has 15 + 10mb and a total website+database of 0.14mb and at the moment the system checks for the quota's at 00:10hr the user has 7mb of email on his server, 14,5 mb userTotalDiskSpace ?
One day he actually had 24mb.

5. Why can an Inbox of the user contain over 10mb of email ?

6. I've read that the servermailprogram tries for 7 days to send an email from outside te a user if the users inbox is full or due to an error not available. Is there a waitingroom for those emails, and are the amount of mb's of those emails calculated within the TotalDiskSpace ?

7. If I was wrong and you meant that emailaccounts and databases are NOT counted within the TotalDiskSpace,
Why does my user get that much TotalDiskSpace, if he has no database and only 1 webpagefile (0,14mb)


Thanks,

Mervyn
 
Hello,

A "cap" is the same thing as a limit. (Literally means "lid", like the lid on a bottle preventing your pop from spilling out of the top, making a big mess :))

Hello,

All files that are owned by the username that are on the partition with the quoats will be included. If you have quotas on /home, then anywhere under /home where there is a file owned by the user, it will be included. Files owned by root are not included.

On top of the system quotas (metioned above), DA also includes other basic files, such as email data in /var/spool and mysql databases into the total disk usage.

4) email *quotas* are handled by exim and are seperate. Their usages are included in the total, but the limiting aspect is controlled by exim. This is settable by the user for each virtual pop account. If /var and /home are on the same partition, then the system quotas would in fact have control over the email as well, so emails would be limited by both exim and the system quotas.

5) maybe you're just a popular guy :) This would relate to #4. If you don't check your email, they will just accumulate until a limit is reached, should there be one set. If it's gone over, then it's the system email account (exim doesn't have quotas setup for that) and /var/spool is on a different partition that the quotas.

6) queued/frozen emails are not included. But emails being sent to your server that get denied because of quotas are queued on your server at all. They sit on the other outgoing server and try to send mail to your server for as long as their set to. Basically, the queuing doesn't happen on your server at all, so it shouldn't be an issue. Queueing only happens for outgoing emails when the other server rejects the email.

7) email accounts and databases are included in the total. Pehaps a breakdown of the disk usage would be helpful for people in determining where used space is coming from.

John
 
Thanks John,

So if you give a user a package with 15 mb webspace and 3 email-popaccounts.

- The user can't upload more webfiles than 15mb.
- The user has 3 emailaccounts so: 30mb stored seperate from the 15mb webfiles.
- The user gets an notify-message if the total mb's of web & mails exeeds the 15mb.

eventhough the user has the right on 3x10mb emailspace.


This seems not right.
And I can't give the user a package with 15+30 mb space just to avoid those notify-messages. Because the user can make advantage of the given space for his/her website.

8. What can I do ?
9. If the user's quota is over it's limit, can the user still receive emails and upload files for the website ?
Or does this depend on the item that actually is over it's limit. (if email is over it's limit: one can't receive email but can upload webfiles and vise versa)


P.S. the user is not popular, but receives emails of 2-4 mb daily.
 
Last edited:
Hello,
- The user can't upload more webfiles than 15mb.
- The user has 3 emailaccounts so: 30mb stored seperate from the 15mb webfiles.
- The user gets an notify-message if the total mb's of web & mails exeeds the 15mb.
Correct, both the User and Reseller should get a message when the nightly tally notices he went over.

8. What can I do ?
Well... you *coud* move the /var/spool/mail and the /var/spool/virtual directories to the parition with the system quotas (/home) and just create a symbolic link to them from /var/spool. This would allow them to be under the control of the system quotas, which would then limit the whole works to the 15 meg limit.

9. If the user's quota is over it's limit, can the user still receive emails and upload files for the website ?
That depends on what limits have been reached. If they've uploaded 15 meg of data to their site, then the system quotas would prevent any futher uploading. If /var/spool/virtual,mail is on a different partition, then the system quotas won't have any effect and they'll still be able to recieve mail.

The solution I think you're looking for is to move /var/spool/virtual,mail to the /home parition (whichever parition the users are in)

Sample moving to /home:
Code:
mkdir /home/spool
cd /home/spool
mkdir mail
mkdir virtual
chown mail:mail *
chmod 1777 *
cp -p /var/spool/mail/* mail
cp -Rp /var/spool/virtual/* virtual

#make *sure* everything got copied over, and that permissions match

cd /var/spool
rm -rf mail
rm -rf virtual
ln -s /home/spool/mail mail
ln -s /home/spool/virtual virtual
*note this is untested, but in theory should work.

John
 
Thanks John,


For now I'm just a reseller, so I'll have to ask my admin.

10. Can I, for the time being, just remove the contact-mail address from the user (or replace it with my address) so the user won't receive that notify-message, and I can set the limit back to 15mb (instead of the 50mb I've set in order to avoid those messages) ?

11. Can DA be set that it won't count the mail-mb's ?


By the way, am I the only one with this problem ?
I don't think so, however a user with a mail-usage like that probably won't exist that often either...
 
Last edited:
Hello,

10. Sure, that would work fine. Just change it in his message system too.

11. No

John
 
Back
Top