extmail 全局地址簿自动同步个人地址簿

  
  
  
  
  1. #!/bin/bash 
  2. mysql -uroot -pextmail extmail -e "SELECT name,username FROM mailbox" > /tmp/mailbox 
  3. cat /tmp/mailbox |sed 's/\t/","/g'  |sed 's/^/"/g'|sed 's/$/"/g' > /var/www/extsuite/extmail/globabook.cf 
  4. cd /home/domains/huaqigame.com/ 
  5. for i in  `ls -l |awk '{print $9}'` 
  6. do 
  7. \cp /var/www/extsuite/extmail/globabook.cf /home/domains/huaqigame.com/$i/Maildir/abook.cf 
  8. chown vuser:vgroup /home/domains/huaqigame.com/$i/Maildir/abook.cf 
  9. done 
  10. [root@mail tools]#  

 

你可能感兴趣的:(ExtMail,全局地址簿自动同步个人地址簿)