Date: Thu, 26 Aug 2004 13:53:15 -0400 (EDT) From: "Charles Ulrich" <charles@idealso.com> To: "adp" <dap99@i-55.com> Cc: questions@freebsd.org Subject: Re: Postfix thinks there isn't enough disk space in a jail Message-ID: <33977.24.11.146.21.1093542795.squirrel@freedombi.com> In-Reply-To: <063c01c48b74$4030e570$6401a8c0@THEBOX> References: <063c01c48b74$4030e570$6401a8c0@THEBOX>
next in thread | previous in thread | raw e-mail | index | archive | help
adp said:
> This problem seems to be affecting Postfix in a FreeBSD jail, and I haven't
> seen this problem outside of a jail, so I'm trying questions@ first.
>
> I am running postfix-2.0.18,1 (from ports) in a FreeBSD 4.10 system in a
> jail. Everything was fine until recently I moved NFS services over to this
> same server. (This may be a red herring.) Now, every few mails I get an
> email to Postmaster like this:
In normal operation, Postfix makes a system call to check to see if it can
create a file of a certain size. Inside a jail, this call will not succeed as
per the very design of jails. Thus, you must use the following one-line patch
to make postfix work. You can use the `patch` command, but it's probably just
easiest to insert the line manually. Remember that a 'make clean' from within
the port directory will wipe this change out, patch or no.
--- ./src/util/file_limit.c.orig        Tue Aug 22 14:44:44 2000
+++ ./src/util/file_limit.c     Mon Apr  8 12:43:55 2002
   @@ -85,6 +85,7 @@
 #else
     struct rlimit rlim;
+    limit = RLIM_INFINITY;
     rlim.rlim_cur = rlim.rlim_max = limit;
     if (setrlimit(RLIMIT_FSIZE, &rlim) < 0)
        msg_fatal("setrlimit: %m");
This patch probably hasn't made it into the port because it completely
bypasses a moderately important check. As long as you keep a close eye on disk
space, you should be okay.
-- 
Charles Ulrich
System Administrator
Ideal Solution - http://www.idealso.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33977.24.11.146.21.1093542795.squirrel>
