cancel
Showing results for 
Search instead for 
Did you mean: 

To limit mail box size.

Sudhakar.J
Advisor

To limit mail box size.

Hi,
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.

Sudhakar
3 REPLIES
Steve Steel
Honored Contributor

Re: To limit mail box size.

Hi

HP bases on the public sendmail so
go to

http://www.sendmail.org/

search on size

get

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 sendmail.cf. 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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com