Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sendmail and mailbox quota questions

509 views
Skip to first unread message

Stefan Arts

unread,
Jan 23, 2003, 3:51:06 AM1/23/03
to
Hello,

I am trying to limit users mailboxes to 25 MB with Linux quota's. I know
this is not a sendmail issue, though I think this is the right place to
ask some questions about it.

I have read many answers in newsgroups and they all say that you have to
setup quota for your /var/spool/mail directory.

1. Do they mean that /var/spool/mail has to be on a separate partition or is
it possible to setup quota for a specified directory? I ask this question,
because I don't want to limit other user files, mailboxes only.

2. I have succesfully installed quota, but when I send mail that is too big,
it goes to postmaster with the error "can't create output". I think this is
a
procmail issue, but how can configure it, so it (also) sends a message back
to sender with a "user mailbox exceeded" error (without the attachment)?

3. Are there another way to limit mailboxes, besides quota?

Stefan Arts
Holland

"Pts"

unread,
Jan 23, 2003, 8:35:24 AM1/23/03
to

Take a look at http://www.scanmail-software.com
You can download a milter that allows you set individual or system wide
mailbox quotas.

Paul Sanger
p...@konnekted.com

Anonymous

unread,
Jan 23, 2003, 3:20:26 PM1/23/03
to
NOTE: This message was sent thru a mail2news gateway.
No effort was made to verify the identity of the sender.
--------------------------------------------------------

<snip>

Take a look at http://www.scanmail-software.com
You can download a milter that allows you set individual or system wide
mailbox quotas.

Paul Sanger
p...@konnekted.com

<snip>


Do you know of any open source software that compares to this software?

Jorey Bump

unread,
Jan 24, 2003, 11:00:42 PM1/24/03
to
"Stefan Arts" <ste...@ioc.nl> wrote in news:3e2fb7ec$1...@newsfeed.bit.nl:

> Hello,
>
> I am trying to limit users mailboxes to 25 MB with Linux quota's. I
> know this is not a sendmail issue, though I think this is the right
> place to ask some questions about it.
>
> I have read many answers in newsgroups and they all say that you have
> to setup quota for your /var/spool/mail directory.
>
> 1. Do they mean that /var/spool/mail has to be on a separate partition
> or is it possible to setup quota for a specified directory? I ask this
> question, because I don't want to limit other user files, mailboxes
> only.

Quotas apply to partitions, so make sure that /var/spool/mail is on a
partition where your desired quota is reasonable. If /home is on the same
partition, it will share the quota with the mail spool.

> 2. I have succesfully installed quota, but when I send mail that is
> too big, it goes to postmaster with the error "can't create output". I
> think this is a
> procmail issue, but how can configure it, so it (also) sends a message
> back to sender with a "user mailbox exceeded" error (without the
> attachment)?

If you want to set a 25MB quota on mailboxes, you will probably need to
make it a soft limit, with a hard limit of 50MB. This is because it may be
necessary to create temporary files on the same partition for that user
during certain operations.

> 3. Are there another way to limit mailboxes, besides quota?

I assume the milter approach checks a user's disk usage before accepting
the message for delivery, and is probably capable of delivering better
rejection messages than procmail. Some admins prefer to run a regular cron
job to check disk usage, notify the user if it's exceeded, then disable
mail delivery until they clean up (an entry can be added to access.db with
a custom error message). A bit more clumsy, but combined with a generous
quota, it protects the system while avoiding some of the other issues.

Andrzej Filip

unread,
Jan 25, 2003, 4:51:06 AM1/25/03
to
Stefan Arts wrote:

>
> [...]


> 3. Are there another way to limit mailboxes, besides quota?

One way (custom milter) has been posted already.

Another way is to make sendmail capable to check mailbox file size "real time"
in sendmail.cf rules.
The simple patch below will make new fstat map available:
http://www.polbox.com/a/anfi/sendmail/_FFR_MAP_FSTAT.html
Fstat map can report file size. Arith map can be used to check if
mailbox_size + message_size < mailbox_size_limit

It should allow you to bounce "too big" messages in response to RCPT TO (if
correct SIZE= is given in "MAIL FROM:") based on current mailbox size.

It is possible but (simple) sendmail.cf fixes have not been written yet.

--
Andrzej [pl>en: Andrew] Adam Filip http://www.polbox.com/a/anfi/
*Random epigram* :
Waste not fresh tears over old griefs.
-- Euripides

0 new messages