From owner-freebsd-questions@FreeBSD.ORG Thu Oct 4 06:56:52 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675A216A41A for ; Thu, 4 Oct 2007 06:56:52 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id CF8DD13C478 for ; Thu, 4 Oct 2007 06:56:50 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id QAA09116; Thu, 4 Oct 2007 16:56:36 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 4 Oct 2007 16:56:35 +1000 (EST) From: Ian Smith To: Lisa Casey In-Reply-To: <20071004002231.CF6ED16A4A0@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: FreeBsd e-mail question 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: Thu, 04 Oct 2007 06:56:52 -0000 On Wed, 3 Oct 2007 16:30:54 -0400 Lisa Casey wrote: > The problem comes in when a customer cancels his account. We remove users by > rmuser username. That command removes the user from the password file, > removes his home directory and removes the mailspool. What it doesn't do is > to remove the .username.pop file associated with that mailbox. This isn't a > problem unless we add another account with the same username. The new > account cannot pop his mail because he gets the following error messge: > > -ERR [SYS/PERM] Temporary drop /var/mail/.jjvc.pop not owned by jjvc. > > If I take a look at /var/mail/.jjvc.pop it isn't owned by anyone, the > ownership of the file is the group number of the original jjvc. > > -rw-rw---- 1 1473 mail 0 Sep 11 19:15 > .jjvc.pop > > Is there anyway to have rmuser remover the mail drop file associated with > that account also, or am I just going to have to remove these manually? I've read this whole thread, and what's strange is that this used to work. I just checked our old FreeBSD 2.2.6 system where rmuser always cleaned up /var/mail/.{$user}.pop properly. Its /usr/sbin/rmuser had: # Remove some pop daemon's leftover file $file = "$mail_dir/.${login_name}.pop"; if (-e $file || -l $file) { print STDERR "Removing pop daemon's temporary mail file ${file}:"; unlink $file || print STDERR "\n${whoami}: Warning: unlink on $file failed ($!) - continuing\n"; print STDERR " done.\n"; } So I wonder whether it's a bug - or maybe a later popper update? - that has the present version of rmuser looking for ${MAILSPOOL}/${login}.pop instead? Cheers, Ian