On Mon, 22 Mar 1999, David Rysdam wrote:

> "Hossein S. Zadeh" wrote:
> > 
> > Hi gurus,
> > I have a unix (Linux) box with tens of users on it. The management has
> > decided to move email to Groupwise (Novell).
> > 


Thanks to everyone who responded. This is what I finally ended up
stitching together:

==========================
#!/bin/sh

cd /var/spool/mail
for i in `ls [eE]*`
do
  echo "Processing mailbox of: "
  echo $i
  echo "\n"
  cat $i | tail -n +12 | \
    sed -e 's/^To: $i@old_machine/To: $i@new_machine/g' | \
    formail -s /usr/bin/mail $i@new_machine

done
==========================

I am not sure if the "sed" part is needed at all (or if it is correct for
that matter).

Some of the command line switches *might* be different from Linux
versions. I wrote the above for Digital Unix.


cheers,
Hossein

Reply via email to