CODE
cat <<EOF >/etc/httpd/conf/$2/0sqmail
Redirect /webmail [url="https://$IP/squirrelmail/src/login.php?site_domain=$1"]https://$IP/squirrelmail/src/login.php?site_domain=$1[/url]
EOF
Stick in the correct IP at $IP.Redirect /webmail [url="https://$IP/squirrelmail/src/login.php?site_domain=$1"]https://$IP/squirrelmail/src/login.php?site_domain=$1[/url]
EOF
It's a bit of worry, tho --- AFAIK, it gets the IP from Ensim, doesn't it? And if it thinks the IP is something else, then you may have other issues.