#!/bin/bash
user=username
passwd=password
domain=@domain.com
group=all@domain.com
mysql -u$user -p$passwd -e "select username from extmail.mailbox where username like '%$domain' and active=1;" >userlist.txt
gotouser=`grep -v "username" userlist.txt |
linuxjishu/13830.html target=_blank class=infotextkey>awk '{printf $0","}'`
mysql -u$user -p$passwd -e "update extmail.
alias set goto ='$gotouser' where address='$group';"
rm -rf userlist.txt