#!/bin/sh
tar zxPf squirrelmail-1.4.6.tar.gz
for i in `sitelookup -a site_handle`
do 
cp -aRf /etc/virtualhosting/templates/sqmail/var/www/squirrelmail /home/virtual/$i/fst/var/www/ >/dev/null
k=`echo $i | sed "s/[a-z]//g"`
chmod 755 /home/virtual/$i/fst/var/www/squirrelmail >/dev/null
chown -R admin$k:admin$k /home/virtual/$i/fst/var/www/squirrelmail >/dev/null
echo $i " updated ..." 
done
