A Bunch of Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 12, 2001 at 03:44:15PM -0500, Dave Mielke wrote:
> [quoted lines by John J. Boyer on December 12, 2001, at 14:38]
> 
..... deleted

> 
> >How do I delete a user?
> 
> userdel old-user-name
> 
> >How do I stop a running daemon like fetchmail without rebooting?
> 
> killall fetchmail
> 
> >How can I transfer the messages in the inbox of one use to the inbox of
> >another?
> 
> cd /var/spool/mail
> cat old-user-name >>new-user-name
> rm old-user-name

A safer way to move email is to stop mail daemon,

mv old-user-name new-user-name
chown new-user-name.new-user-name new-user-name

that is, change the ownership to new user otherwise you won't be able to
read it and restart the mail server. If you do it otherwise your cat
command could mess the email box if MTA was writing into it at the same
time.

> 
> Note the two right angle brackets before new-user-name in the cat command. This
> is important. It means append. If you only put one of them there then existing
> messages for new-user-name will be deleted as the whole file will be replaced.
> 
> -- 
> Dave Mielke           | 2213 Fox Crescent | I believe that the Bible is the
> Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
> EMail: dave@mielke.cc | Canada  K2A 1H7   | if you're concerned about Hell.

-- 
Rafael





[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]