Mail Server 移機完畢

Because of the recent mail server was hacked and I also FreeBSD wake unable to make the best management, therefore take this opportunity to move Mail Server to Fedora Core 6. Previously prepared to put the work in advance is create all of the user accounts of FreeBSD in FC6. But no one should create account one by one! After all, the units have nearly 200 people Account. Therefore, due to this Webmin installed a suite, so we can export substantial account:

Login the FreeBSD system which own webmin service --->System---> Users and Groups --->Export users to select batch file--->Select the users and their options --->Export NOW

Login Fedora Core 6's webmin--->System --->Users and Groups--->Create, modify and delete users from batch file --->Browse you file---> select the set options --->Execute batch

Waitting implementation of the batch file .... . Done! ^ ^

This preparatory work is finish! Finish a "major event"!

Next, should the FreeBSD mail and mail folders of user home directory (because it was installed the openwebmail) transfer to FC6 (I use is that I want, is probably the most stupid way. .)

In FreeBSD :

#cd var * FreeBSD because my mail is under the /var

#tar zcvf mail.tar.gz mail/

*Entire mail folder compressed into one of tarball

# mv mail.tar.gz /var/www/html/ *moved to the web underground

# cd / * under /

#tar zcvf home.tar.gz home/ *all user home folders under /home

#mv home.tar.gz /var/www/html/ *moved to the web underground

Fedora Core 6 :

#cd /

#wget http : //freebsd.domain/home.tar.gz

*Catch FreeBSD's home directory file backup

#tar zxvf home.tar.gz

*decompress home.ta r.gz. This will directly cover the original home
directory file name all the same file or folder

#rm -rf home.tar. gz * Remove have already decompress off tarball

#cd /var/spool *to mail stored in the folder on the floor

#wget http://freebsd.domain/mail.tar.gz *FreeBSD's mail backup file.

#tar zxvf mail.tar.gz *decompress mail backup file

#rm -rf mail.tar.gz *delete the mail.tar.gz has been used.

Don't forget to back to FreeBSD to delete the files that are homr.tar.gz and mail.tar.gz under the website root directory! Otherwise, people can download arbitrary your backup file is, of course, your web servers are the starting. Now almost completed. YA!

最近因為Mail Server常被入侵,而且FreeBSD我也不熟,無法作最好的管理,於是趁此機會要將Mail Server移到Fedora Core 6上。


登入 FreeBSD的webmin--->系統--->使用者與群組--->Export users to batch file--->選好要匯出的使用者及其選項--->Export NOW

登入 Fedora Core 6的webmin--->系統--->使用者與群組--->使用批次檔一次過建立/修改/刪除使用者--->Browse你會出的檔案--->--->選好要設定的選項--->執行批次檔

Waitting.....Done! ^^




#cd /var *因我的bsd的mail是放在/var/mail底下

#tar zcvf mail.tar.gz mail/ *把整個mail資料夾壓縮成一個tar.gz的壓縮檔

# mv mail.tar.gz /var/www/html/ *移到網頁目錄底下

# cd / *到 / 底下

#tar zcvf home.tar.gz home/ *所有人的家目錄在home底下

#mv home.tar.gz /var/www/html/ *一樣移到網頁目錄底下

Fedora Core 6上

#cd /

#wget http://freebsd.domain/home.tar.gz


#tar zxvf home.tar.gz


#rm -rf home.tar.gz *刪除已經解開過的壓縮檔(不解開就是暫空間而已)

#cd /var/spool *到FC6上存放mail的資料夾的上一層

#wget http://freebsd.domain/mail.tar.gz

#tar zxvf mail.tar.gz *解開mail備份檔

#rm -rf mail.tar.gz *刪除已經用過的mail備份檔



0 Responses