FreeBsd e-mail question

Roland Smith rsmith at xs4all.nl
Wed Oct 3 14:15:22 PDT 2007


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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20071003/d06e2a6a/attachment.pgp


More information about the freebsd-questions mailing list