LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-05-2003, 04:01 PM   #1
locoiguana
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
Angry Configure mailbox size limits email server...please help!


Hi everyone, I'm having a bit of a tough time with this one, and I was hoping I could get some advice...

Background info:
A couple of months back, my company moved from a Windows to a Linux mail server. Translation: I needed to learn Linux. I've done pretty well with it, and have been please overall with the performance enhancements from Linux, but I'm 100% self-taught, and still relatively new to the OS, so be gentle :-)

We are running Red Hat 8, with Sendmail as our MTA. We have aprox 260 users over 80+ domains on this one server. Users can access their mail boxes via POP3, or the web (SquirrelMail (IMAP)). None of the users with email addresses on the server have been granted login privileges to a shell (shell = /sbin/nologin).

The Problem:
Yesterday evening, I got a cal from a user complaining that they couldn't get any new mail. I looked into it and, long story short, the /var/spool/mail directory was using up all the space allocated to that partition. I went through and cleaned out as many useless files as I could, which solved the immediate problem. However, I have now been charged with the task of making sure this doesn't happen again by establishing mailbox quotas.

The Goal:
To give every user on the machine a 5 MB mailbox limit. When they real 4.5 MB, they get an email telling them that they are approaching their size limit, and must delete some messages. When they reach they size limit, anyone sending them email should receive a message back indicating that the user they are trying to email has reached the size limit for their mailbox, and they should try again later. I pretty much want to mimic the functionality of MS Exchange (or any of the big webmail providers, i.e. - Hotmail, yahoo, etc.).

What I've done:
I have enabled quotas on my /var mount, and set up a aquota.user file. I established the quotas for one test account, but the problem is, when someone emails a message to a user who is over quota, neither the sender or the user are notified. I considered writing a script which checks the size of each user's mailbox and emails warnings to anyone over 4.5 MB, but the only way I know how to check disk usage from a shell script is with the du command, and since it can only look at directories (and the user mailboxes are all contained as separate files in one directory) I can't figure out how I could isolate each individual mailbox to check its size. And even if I could get this to work, it would only serve to notify the user that they where near the limit. It wouldn't solve the problem of notifying senders that their messages hadn't been delivered. My boss swears to me that there has to be a better way to do this, as other email providers do it all the time; but I can't find any better way.

Questions:
PLEASE help with these!!!
1. Is there any pre-packaged software program out there to do this sort of thing?
2. If not, is there a better way to do this than with disk quotas?
3. How can I check and notify users when they are near their max size limit?
4. How can I notify senders that the mailbox they are attempting to send a message to is full?

Any help anyone can provide (or even just point me in the right direction) would be VERY much appreciated.

Thanks!
 
Old 12-05-2003, 05:18 PM   #2
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
I heard qmail allows flexible and almost painless quota management. However, if you can't / don't want to change server, I point out that du works with files, too!

bash$ du -s /Z/Mozilla*
9312 /Z/MozillaFirebird-0.7-i686-pc-linux-gnu.tar.gz
6208 /Z/MozillaFirebird-0.7-win32.zip
 
Old 12-05-2003, 05:33 PM   #3
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
http://www.lifewithqmail.org/
 
Old 01-16-2004, 10:35 AM   #4
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Rep: Reputation: 30
Has anybody an answer to locoiguana's questions? I have the same problem
 
Old 01-16-2004, 10:42 AM   #5
locoiguana
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by ganninu
Has anybody an answer to locoiguana's questions? I have the same problem
Wish I had better news for you, ganninu, but I haven't found a really good solution yet. I'm really not too into switching my whole system over to qmail, so I've taken to just regularly clearing out mailboxes that are too big, and sending reminders to users that I know to be major offenders to clean out their mailboxes from time to time.

Sorry
 
Old 02-25-2004, 10:59 PM   #6
Buckyjunior
Member
 
Registered: Jul 2003
Distribution: Kubuntu Hardy
Posts: 76

Rep: Reputation: 15
Also a newbie here so I don't have a definitive, working answer to your problem. I have an idea of how I might approach it. I would use a combination of Perl, cron, and mail.

The cron program would periodically (daily?) run a Perl program which would run your du and output that to a file. Perl would then grep that file for your quota parameters. Using the results of that, Perl would then mail the user and admin (you).

I have to admit that my authoring skills are not up to the task, but I'm working on it.

Best wishes.
 
Old 06-04-2004, 05:20 PM   #7
mpgram
Member
 
Registered: Sep 2003
Location: Dallas TX
Distribution: Red Hat
Posts: 59

Rep: Reputation: 15
Has anyone found a solution to this? I am running into the same problem now. Any help (without converting to qmail) would be greatly appreciated!
 
Old 05-11-2005, 04:15 AM   #8
kimnajoo
LQ Newbie
 
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
could u tell me some basic command for limit the mailboxsize?

hi, i'm going to limit the mailbox size at moment,nothing else. but i have no any idea where i shall begin. could u tell me some basic command on configring mailbox size? how could i do it?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition size limits pedromdsantos Linux - General 7 07-01-2005 03:56 PM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 04:43 AM
HD size limits under slackware horndude Slackware 6 02-10-2004 07:34 PM
Limit mailbox size on the server for all users? portalguy Linux - Software 0 09-22-2003 10:41 AM
File Size limits ascii2k Linux - General 4 04-15-2002 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration