Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2007 23:15:19 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        Lisa Casey <lisa@jellico.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: FreeBsd e-mail question
Message-ID:  <20071003211519.GC44500@slackbox.xs4all.nl>
In-Reply-To: <011e01c805fc$4c5dc3d0$d5b9bfcf@lisac>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Oct 03, 2007 at 04:30:54PM -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?

Since rmuser is a shell-script, you could easily change it to suit your
needs. Look at the function rm_mail (lines 79-95), and change
'${login}.pop' to '.${login}.pop' in line 89,90 and line 92.

A more elegant approach would be to duplicate lines 89-93 and add the
dot before the login in the second instance, changeing " pop3" to "
qpopper" as well.

If you make this change, do not forget to re-apply it after doing a
installworld. :-)

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHBAZnEnfvsMMhpyURAr58AJ9HEfWUlR29lQrvrSGysFEJWWHbjQCfYJRe
zWCqMMb5uyDEU+TiOIgMD+0=
=YAsd
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071003211519.GC44500>