From owner-freebsd-questions@FreeBSD.ORG Tue Jan 2 01:02:18 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B79B516A403 for ; Tue, 2 Jan 2007 01:02:18 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) Received: from daisy2.compar.com (daisy2.compar.com [216.208.38.133]) by mx1.freebsd.org (Postfix) with ESMTP id 774A913C46A for ; Tue, 2 Jan 2007 01:02:18 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) Received: from localhost (localhost.compar.com [127.0.0.1]) by daisy2.compar.com (Postfix) with ESMTP id 1CD1C13C41C; Mon, 1 Jan 2007 19:29:03 -0500 (EST) X-Virus-Scanned: amavisd-new at compar.com Received: from unknown by localhost (amavisd-new, unix socket) id b0k4Rmq1+2CK; Mon, 1 Jan 2007 19:29:01 -0500 (EST) Received: from gabby.gsicomp.on.ca (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [74.109.12.188]) by daisy2.compar.com (Postfix) with ESMTP id 9548213C417; Mon, 1 Jan 2007 19:29:01 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id C2E9B610D; Mon, 1 Jan 2007 20:25:11 -0500 (EST) Received: from unknown by localhost (amavisd-new, unix socket) id client-GMXsfVgH; Mon, 1 Jan 2007 20:24:53 -0500 (EST) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 10AB96108; Mon, 1 Jan 2007 20:24:52 -0500 (EST) Message-ID: <003301c72e06$7e7ab180$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: "Michael P. Soulier" , References: <20070101203920.GA955@tandon.net> Date: Mon, 1 Jan 2007 19:39:42 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 X-Virus-Scanned: amavisd-new at gsicomp.on.ca Cc: freebsd-questions@freebsd.org Subject: Re: How to stop automatic creation of /var/mail/$USER X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 01:02:18 -0000 > On 1/1/07, Sahil Tandon wrote: > > When I 'adduser' a new account, a /var/mail/$USER file is created. This is > > unnecessary as our MTA is configured to deliver mail directly to a user's > > ~/Maildir/, where the IMAP server looks by default. > > > > There is nothing in the adduser or adduser.conf man pages that explains how > > to manipulate (or, in my case, simply stop) the creation of this file. > > I do the same. I don't really care about the file, as it's not hurting > anything. I looked at the adduser sources and couldn't find anything that explicitly creates the /var/mail/$USER directory. Further debugging shows that the "pw useradd" command (see the adduser subroutine) is what is creating the mail file. There doesn't seem to be a way from the command-line to have pw *not* create the mail spool file, although code will skip this is PWALTDIR() is set -- although our version of pw doesn't set this at all. There also appears to be a shortage of command line options that could be used to enable this behaviour. Regards, -- Matt Emmerton