Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jan 2007 19:39:42 -0500
From:      "Matt Emmerton" <matt@gsicomp.on.ca>
To:        "Michael P. Soulier" <msoulier@digitaltorque.ca>, <sahil@tandon.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to stop automatic creation of /var/mail/$USER
Message-ID:  <003301c72e06$7e7ab180$1200a8c0@gsicomp.on.ca>
References:  <20070101203920.GA955@tandon.net> <fb6605670701011312w344779cewa857b5afeb1fbd4d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 1/1/07, Sahil Tandon <sahil@tandon.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003301c72e06$7e7ab180$1200a8c0>