FreeBsd e-mail question

Ian Smith smithi at
Wed Oct 3 23:56:52 PDT 2007

On Wed, 3 Oct 2007 16:30:54 -0400 Lisa Casey <lisa at> 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

Cheers, Ian

More information about the freebsd-questions mailing list