Sabtu, 24 Maret 2012

imapsync without know passwd user


1. create link from your account email to the other account,example other account : ujang my account : yudi, ln -s /home/vmail/domains/yourdomain.com/ujang /home/vmail/domains/yourdomain.com/yudi/.ujang
to create all account with  script you can search in tips and trik or mbah google.
2. its a little script to sync all user with 1 passwd without know passwd client
#!/bin/bash
# imapsyncrun.sh. Script to migrate imap mailboxes under the account migrate1DATE=`date +%m%d%y_%H:%M`LOGFILE=”imapsync.log”echo “IMAPSync starting..  $DATE” >> $LOGFILE
# Begin ‘for’ loop, calling the list of user names already collectedfor ACCTNAME in `cat /root/account`do
ACCOUNT=`echo $ACCTNAME | awk -F@ ‘{print $1}’`;
# Reset the zimbra password temporarily:
#zmprov setPassword $ACCTNAME test123
# Then migrate:/usr/bin/imapsync –buffersize 8192000 –nosyncacls –subscribe –syncinternaldates –host1 [IP address1] \–user1 youraccount@yourdomain.com –password1 [password1] –host2 [IP address2] –user2 $ACCTNAME –password2 [password2] \–folderrec INBOX.$ACCOUNT –regextrans2 ‘s/(.*)/INBOX/’ –noauthmd5echo Done with $ACCTNAME on $DATE >> $LOGFILEdone
# Change the password back to the encrypted one on file.reset_passwords.shecho “” >> $LOGFILEecho “IMAPSync Finished..  $DATE” >> $LOGFILEecho “————————————” >> $LOGFILE
have trying..

Tidak ada komentar:

Posting Komentar