homepage Welcome to WebmasterWorld Guest from 54.161.166.171
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
limiting the size of user mailboxes in /var/spool/mail
how to?
jamie




msg:906929
 11:01 am on Apr 17, 2003 (gmt 0)

hi,

some of the users on our redhat box are massing up MBs of mail, by not regularly downloading. is there a way to put a limit on each mailbox?

can i also delete these enormous mailboxes by copying /dev/null into each large mailbox:

cp /dev/null /var/spool/mail/user?

thanks

<added>
we use sendmail and procmail, and i have just found out that procmail obeys user quotas, so i just have to set up disk quotas. anyone know any good help pages for that?

 

jamie




msg:906930
 12:33 pm on Apr 17, 2003 (gmt 0)

well after much experimenting i think i have enabled quotas, but they don't work.

i have created aquota.user and aquota.group in the root folder / of the primary partition and have enabled quotas in fstab and then rebooted:

/dev/sda1 / ext3 defaults,usrquota,grpquota 1 1

a quotacheck -vm /dev/sda1 runs fine, and edquota -u myuser allows me to edit the quota setting for that user.

however when i try edquota -g mygroup it returns:

Failed to turn on quotas : quotaon: using //quota.user on /dev/sda1: No such file or directory

and when i try quotaon -v /dev/sda1 it returns:

quotaon: using //quota.group on /dev/sda1: No such file or directory
quotaon: using //quota.user on /dev/sda1: No such file or directory

does anyone have any clues?

much appreciated

<added>

well ther's nought like trying. and i just succeeded in setting up quotas for all users on the system. quotacheck is now running by a cronjob.

* the only thing i am still confused about is how quotacheck then notifies either me (root) or the user that they have too many files. in an ideal situation it would notify me, as i am the admin?

* and i am still unsure as to how to use the quotas to control the /var/spool/mail/usermailboxes

am still grateful for any feedback

jamie




msg:906931
 6:52 pm on Apr 17, 2003 (gmt 0)

sorry for posting three times, but as noone answered i just carried on investigating and have just about managed to do it all (i'm sure there's a lesson to be learnt there ;-)

all i had to do was enable quotas on the second partition whose root directory was /var and then set the quotas accordingly.

now each users mailbox in /var/spool/mail is also limited! :-)))

still not sure how quotacheck will notify me (or them) but that's not so important for the time being. the main thing is the mailboxes can't run away from me.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved