On Thu, 2 Dec 1999, scott.list wrote:

> I have changed servers for about 400 users.  I ahve DNS, etc, reconfigured,
> all mail that manages to make it to the old server is rerouted to the new
> via virtusertable.
> 
> The problem is I have users who had mail in their mailboxes
> (/var/spool/mail/[userid]) that I need to get to them at the new server.

If you can guarantee that there is no new email is received to the old
mailboxes (no locking is done here), you can use the following:

#################START
#!/bin/sh
cd /var/spool/mail
for i in `ls`
do
  echo "Processing mailbox of: "
  echo "\n"
  echo $i
  cat $i | tail -n +12 |formail -s /bin/mail $[EMAIL PROTECTED]
done
#################END    

the "tail -n +12" part is to cut the sh#$% that WU programs
(IMAP/pine/etc.) put at the start of each mailbox.


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to