OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Wietse Venema (wietseporcupine.org)
Date: Fri Feb 02 2001 - 14:17:09 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    lambertcswnet.com:
    > Just as a datapoint, I have a FreeBSD 4.2-STABLE box running
    > SNAPSHOT-20001005 which does *not* seem to be using message_size_limit as
    > an mbox size limit.

    Well, that measurement made me thinking, so I did some detective
    work.

    Here's how Postfix really works. As usual the answer is: it depends.

    Upon startup the Postfix master server normally does not set the
    per-process file size limit at all.

    However, the Postfix master server sets the file size limit to
    message_size_limit when the inherited file size limit is smaller
    than message_size_limit. This is to prevent Postfix from having
    trouble accessing its own queue files. This file size limit is then
    inherited by all Postfix daemon processes, including the Postfix
    local delivery agent, and by any processes that it executes.

    Upon startup, the Postfix cleanup server sets the file size limit
    to message_size_limit (it does not change the file size limit when
    message_size_limit is disabled). This is how Postfix enforces the
    queue file size limit.

    So before 20010128, Postfix did not enforce mailbox file sizes at
    all, unless the master inherited a too small file size limit -
    then the mailbox size limit was enforced as the inherited file
    size from the master.

    That mystery is solved.

    I still think that it is OK to have some limit on how big a file
    can be written upon local delivery. It stops software runaways,
    and as such should be part of Postfix as the many other safety
    mechanism that are already part of Postfix, and that most people
    normally aren't aware of.

    But I am concerned that people keep trying to morph this safety
    feature into something that Postfix cannot do, namely, implementing
    a mail quota mechanism. It would be nice to have, but Postfix
    cannot enforce mail quota.

            Wietse

    lambertcswnet.com:
    > In <20010202005212.BF1DBBC0C5spike.porcupine.org>, on 02/01/2001
    > at 07:52 PM, wietseporcupine.org (Wietse Venema) said:
    >
    > >Craig Sanders:
    > >> On Tue, Jan 30, 2001 at 11:25:18AM -0500, Wietse Venema wrote:
    > >> > Thomas Andres:
    > >> > >
    > >> > > > > Am I correct in assuming that this parameter is only relevant when
    > >> > > > > delivering with local (not with e.g. procmail)?
    > >> > > >
    > >> > > > No. According to the man page (20010129), this parameter affects
    > >> > > > the size of all files being written to upon local delivery.
    > >> > >
    > >> > > How about older versions? (I'm still using Postfix-19990906-pl08 until I
    > >> > > find time for a big upgrade:)
    > >> >
    > >> > With older Postfix versions, the message_size_limit controls what
    > >> > the mailbox_size_limit controls now.
    > >>
    > >> i just upgraded from 20000531 to 20010128 and some of my users started
    > >> getting their mail bounced due to the default mailbox_size_limit of 20MB.
    > >>
    > >> prior to the upgrade, there were no problems at all delivering to them
    > >> with the default message_size_limit of 10MB, even though some of the
    > >> mailboxes were much larger than that (some as large as 200MB).
    >
    > >That surprises me.
    >
    > >Before the change, the Postfix master process set the file size limit to
    > >$message_size_limit, once at process startup. This limit was then
    > >inherited by all Postfix daemon processes, including the local delivery
    > >agent. This is how the mailbox size limit worked until recently - as an
    > >artefact of the message_size_limit
    > >implementation.
    >
    > >After the change, the local delivery agent sets the file size limit to
    > >$mailbox_size_limit, once at process startup.
    >
    > >If this change suddenly enforces a mailbox size limit where no limit was
    > >enforced before, then the old behavior was b0rken, as opposed to the new
    > >behavior which actually does what it says.
    >
    > Just as a datapoint, I have a FreeBSD 4.2-STABLE box running
    > SNAPSHOT-20001005 which does *not* seem to be using message_size_limit as
    > an mbox size limit.
    >
    > --
    > Scott Lambert
    > lambertcswnet.com
    > Systems and Security Administrator
    > CSW Net, Inc.
    > ================================================================
    > Written: Friday, February 02, 2001 - 01:22 PM
    >
    >
    >
    >
    >