Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Dan Pelleg
Greg Bernard <[EMAIL PROTECTED]> writes:

> Is there another way to limit the amount of space occupied by mail files on
> a per user basis using another method than quotas ?
> 
> I would like to limit the amount of space available for each user's e.mail
> so e.mail file size will not go crazy.
> 
> 
> Thanks for your advices...
> 

I've never tried this, but it should work: set up a vn(4) disk of the right
size, and arrange for the user's spool to be on its mountpoint. See
vnconfig(8) for setup examples.

-- 

  Dan Pelleg
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Uwe Doering
Greg Bernard wrote:
Is there another way to limit the amount of space occupied by mail files on
a per user basis using another method than quotas ?
I would like to limit the amount of space available for each user's e.mail
so e.mail file size will not go crazy.
You could switch to Cyrus IMAP, which is a complete IMAP4/POP3 email 
storage subsystem with file system independent quotas.

   Uwe
--
Uwe Doering |  EscapeBox - Managed On-Demand UNIX Servers
[EMAIL PROTECTED]  |  http://www.escapebox.net
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Jez Hancock
On Mon, Jan 12, 2004 at 08:34:53AM +0100, Greg Bernard wrote:
> Le 11/01/04 23:12, ??Mike Maltese?? <[EMAIL PROTECTED]> a ?crit?:
> >> Is there another way to limit the amount of space occupied by mail files
> > on
> >> a per user basis using another method than quotas ?
> >> I would like to limit the amount of space available for each user's e.mail
> >> so e.mail file size will not go crazy.
> > Is there an option to limit message size with the MTA you are using?

> Well I don't know, that's my question...
> I am using sendmail.
Exim can do quotas.

http://www.exim.org/

also in the ports:

/usr/ports/mail/exim/

I've never actually used the quota system myself in Exim but it sounds
relatively straightforward - from the specifications for Exim:


quota   Type: string*  Default: unset

This option imposes a limit on the size of the file to which Exim is
appending, or to the total space used in the directory tree when the
"directory" option is set. In the latter case, computation of the space
used is expensive, because all the files in the directory (and any sub-
directories) have to be individually inspected and their sizes summed (but
see "quota_size_regex" below). Also, there is no interlock against two
simultaneous deliveries into a multi-file mailbox. For single-file
mailboxes, of course, an interlock is a necessity.

A file's size is taken as its "used" value. Because of blocking effects,
this may be a lot less than the actual amount of disk space allocated to
the file. If the sizes of a number of files are being added up, the
rounding effect can become quite noticeable, especially on systems that
have large block sizes. Nevertheless, it seems best to stick to the "used"
figure, because this is the obvious value which users understand most
easily.

The value of the option is expanded, and must then be a numerical value
(decimal point allowed), optionally followed by one of the letters K or M.
A value of zero unsets the option. The expansion happens while Exim is
running as root, before it changes uid for the delivery. This means that
files which are inaccessible to the end user can be used to hold quota
values that are looked up in the expansion. When delivery fails because
this quota is exceeded, the handling of the error is as for system quota
failures.

By default, Exim's quota checking mimics system quotas, and restricts the
mailbox to the specified maximum size, though the value is not accurate to
the last byte, owing to separator lines and additional headers that may
get added during message delivery. When a mailbox is nearly full, large
messages may get refused even though small ones are accepted, because the
size of the current message is added to the quota when the check is made.
This behaviour can be changed by setting "quota_is_inclusive" false. When
this is done, the check for exceeding the quota does not include the
current message. Thus, deliveries continue until the quota has been
exceeded; thereafter, no further messages are delivered. See also
"quota_warn_threshold".

quota_directory Type: string*  Default: unset

This option defines the directory to check for quota purposes when
delivering into individual files. The default is the delivery directory,
or, if a file called maildirfolder exists in a maildir directory, the
parent of the delivery directory.

quota_filecount Type: string*  Default: 0

This option applies when the "directory" option is set. It limits the
total number of files in the directory (compare the inode limit in system
quotas). It can only be used if "quota" is also set. The value is
expanded; an expansion failure causes delivery to be deferred.

quota_is_inclusive  Type: boolean   Default: true

See "quota" above.

quota_size_regex Type: string   Default: unset

This option applies when one of the delivery modes that writes a separate
file for each message is being used. When Exim wants to find the size
of one of these files in order to test the quota, it first checks
"quota_size_regex". If this is set to a regular expression that matches
the file name, and it captures one string, that string is interpreted as a
representation of the file's size. The value of "quota_size_regex" is not
expanded.

This feature is useful only when users have no shell access to their
mailboxes - otherwise they could defeat the quota simply by renaming the
files. This facility can be used with maildir deliveries, by setting
"maildir_tag" to add the file length to the file name. For example:

  maildir_tag = ,S=$message_size
  quota_size_regex = ,S=(\d+)

The regular expression should not assume tha

Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Paul Chvostek
On Sun, Jan 11, 2004 at 09:24:28PM +0100, Greg Bernard wrote:
> 
> Is there another way to limit the amount of space occupied by mail files on
> a per user basis using another method than quotas ?
> 
> I would like to limit the amount of space available for each user's e.mail
> so e.mail file size will not go crazy.

What exactly do you want to do?

Filesystem quotas will cause a bounce message to be returned to the
sender indicating that the recipient was over quota.  That's generally
the preferred way because the operating system takes care of most of it.
You could modify that bounce message to include "friendlier" text if the
default text is a problem for you.

Alternately, you could implement a solution using procmail, with a small
tool like http://www.it.ca/software/fsizecompare.c to determine existing
filesize and behave accordingly.  Or you could come up with other clever
behaviour based on whatever criteria you dream up.

But you have to dream it up first.  Figure out exactly what you want to
do with your users' mail.  Then try to write something that does it.
And if you have problems with that, come back to the list and ask for
advice.  :-)

p

-- 
  Paul Chvostek <[EMAIL PROTECTED]>
  it.canadahttp://www.it.ca/
  Free PHP web hosting!http://www.it.ca/web/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Greg Bernard
Le 11/01/04 23:12, « Mike Maltese » <[EMAIL PROTECTED]> a écrit :

>> Is there another way to limit the amount of space occupied by mail files
> on
>> a per user basis using another method than quotas ?
> 
>> I would like to limit the amount of space available for each user's e.mail
>> so e.mail file size will not go crazy.
> 
> Is there an option to limit message size with the MTA you are using?
> 

Well I don't know, that's my question...

I am using sendmail.


«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§

Gregober ---> PGP ID --> 0x1BA3C2FD
omni_osx_ml @at@ todoo.biz

«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Other ways than quotas to limit mail files size ??

2004-01-11 Thread Mike Maltese
> Is there another way to limit the amount of space occupied by mail files
on
> a per user basis using another method than quotas ?

> I would like to limit the amount of space available for each user's e.mail
> so e.mail file size will not go crazy.

Is there an option to limit message size with the MTA you are using?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"