Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

To limit mail box size.


To limit mail box size.

I am using sendmail/Qpoper(POP3) on HPUX, would like to restrict mail box size of each user.
And is it possible to truncate automatically of mails older than one week or so?

Thanks in advance.

Steve Steel
Honored Contributor

Re: To limit mail box size.


HP bases on the public sendmail so
go to

search on size


How to limit the size of mail separately for each recipient?
There is no simple solution for this. It might be easy if the sender announces the (correct) size of the e-mail via SIZE= in the MAIL FROM: command. In this case, it would be possible to compare that size against the allowed size for each recipient when those are specified by RCPT TO:. However, if the size isn't given, it can be only determined after all recipients have been given. In that case, the mail might be accepted for some but not for others. Hence the solution to have quota on mail spool might be best. Another (crude) workaround is to define different mails with different size restrictions and select those accordingly to the recipients limitations.

Quota on mail spool?
This is not a sendmail problem, but one of the local delivery agent. Check your Mlocal line in your If you have procmail you're settled, it obeys quotas. So you can install quotas on your mailspool (check with your OS version, e.g., man quota), and everything should work. You can also tell procmail to deliver e-mail into the HOME directory of the user, so you have solved several problems at once.

Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)
Christopher Caldwell
Honored Contributor

Re: To limit mail box size.

mailbox size management isn't really a function of sendmail. Using quoatas (man quota) and/or tweaking the local delivery agent (by default rmail) you can change the behavior of sendmail to queue or reject mail for full mailboxes. Most people would replace rmail with a smarter LDA like procmail.

The techniques can be found on the comp.mail.sendmail newsgroup.

Truncating mail would require that you lock the mail box and filter out mail over a certain size. This would be a scripting exercise.
Steven E. Protter
Exalted Contributor

Re: To limit mail box size.

The mailbox is on the users home directory. Indirectly you can limit mailbox size by putting a quota on the overall user.

Steven E Protter
Owner of ISN Corporation