[NCLUG] Apparent size limitation on /var/spool/mail

Bob Proulx bob at proulx.com
Tue Sep 18 18:58:58 MDT 2007


DJ Eshelman wrote:
> apparently, when the /var/spool/mail/<uid> file gets about 50MB, mail flow
> stops completely for that user, but is fine for everyone else.

To print the default postfix mailbox size limit:

  $ postconf -d mailbox_size_limit
  mailbox_size_limit = 51200000

To print the currently configured postfix mailbox size limit:

  $ postconf mailbox_size_limit
  mailbox_size_limit = 0

Non-zero values are limits.  Zero values are no limit.

  http://www.postfix.org/postconf.5.html

To use the postfix postconf command to edit the postfix main.cf file
to change the limit.

  $ sudo postconf -e mailbox_size_limit=0
  $ sudo postfix reload

That simply edits the main.cf file.  This could also be done with
other commands.  For example this should do it too.  But the
convenience editing command postconf is simpler.

  cnfdir=$(postconf config_directory)
  if ! grep -q '^ *mailbox_size_limit *= *0' $cnf/main.cf; then
    echo 'mailbox_size_limit = 0' >> $cnf/main.cf
  else
    sed --in-place 's/^ *mailbox_size_limit *=.*/mailbox_size_limit = 0/' /etc/postfix/main.cf
  fi

> So, the question is: what can I do?  There's no quotas set that I can see,
> and frankly I don't even know where to start searching Google...  after an
> hour or so I just had to give up because I just wasn't getting any good
> results.
> 
> Even if you could give me a good idea on keywords to search on, that would
> help.  Just typing in /var/spool/mail 50MB or size limit is still like
> looking for a needle in a haystack.

We have all been there looking for this particular configuration item
at one time or another.  At some point in the future you will be asked
this very same question by someone else and will now have the answer
ready for them.  :-)

Bob



More information about the NCLUG mailing list