From owner-freebsd-questions@FreeBSD.ORG Thu Aug 26 17:53:18 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24C5816A4CE for ; Thu, 26 Aug 2004 17:53:18 +0000 (GMT) Received: from lists.freedombi.com (crmc1.com [207.179.98.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0CC043D39 for ; Thu, 26 Aug 2004 17:53:17 +0000 (GMT) (envelope-from charles@idealso.com) Received: by lists.freedombi.com (Postfix, from userid 1000) id 0FB3F72825; Thu, 26 Aug 2004 13:53:17 -0400 (EDT) Received: from freedombi.com (localhost [192.168.10.108]) by lists.freedombi.com (Postfix) with SMTP id 5418772327; Thu, 26 Aug 2004 13:53:15 -0400 (EDT) Received: from 24.11.146.21 (SquirrelMail authenticated user charles) by freedombi.com with HTTP; Thu, 26 Aug 2004 13:53:15 -0400 (EDT) Message-ID: <33977.24.11.146.21.1093542795.squirrel@freedombi.com> In-Reply-To: <063c01c48b74$4030e570$6401a8c0@THEBOX> References: <063c01c48b74$4030e570$6401a8c0@THEBOX> Date: Thu, 26 Aug 2004 13:53:15 -0400 (EDT) From: "Charles Ulrich" To: "adp" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on freedombi.com X-Spam-Level: X-Spam-Status: No, hits=-3.7 required=7.0 tests=BAYES_00,PRIORITY_NO_NAME autolearn=no version=2.63 cc: questions@freebsd.org Subject: Re: Postfix thinks there isn't enough disk space in a jail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 17:53:18 -0000 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