終於把Mail Serivce丟給Google Apps了^^Y

幾個星期來,經過反覆的測試、宣導及半強迫,終於把學校的Mail Service丟給Google Apps了,這樣一來,伺服器的工作就少了一個負擔了。
之前遲遲不換到Google Apps的原因是因為學校本身的Mail Server上有老師留下來的信件,如果貿然換郵件系統而要求老師自行備份郵件的話,必定會招致許多的抨擊及抱怨,所以一直沒有轉換。直到近來Google Apps在教育版(Education Edition)上公告一項新的功能,寫著"
最新! 電子郵件移轉 - 將您現有的電子郵件封存檔移轉至「Google 應用服務」 - 開始使用(
New! Email Migration - Move your existing email archives into Google Apps - Get started)。一開始還不懂是什麼意思,抱著好奇的心態去測試這個功能,拿著自己的帳號來測試什麼叫做"Migration",結果,居然成功了!這一刻,有一種心中大石放下一塊的感覺,很想大聲的叫:"我終於要擺脫Mail Server的禁錮了!哈!哈!哈!",我分析,如果完全把所有教職員的Mail轉移到Google Apps的話有幾個優點也有缺點:
優點:
1、主機房可以騰出一台Server來做別的Service,譬如Web Server或是Samba Server或是NFS、Backup Server、Update Server等等。
2、Gmail優越的防堵垃圾信件及防毒機制(至少比我自己架設的Mail Server好很多)會避免校內使用OutLook收信或其他使用POP3收信的應用軟體在收取信件時容易中毒的情形,甚至蔓延到全校的區域網路當中;之前因為病毒郵件造成的PC中毒已經太多樁了,甚至教師用的PC被植入木馬程式而不自知。
3、郵件信箱的容量由原本的(自己架的)100MB提升為2GB。
4、其他功能:譬如Chat、Calender、Docs、Web Pages、Star Page等等。
缺點:
1、自己的技術不會進步,哈!

Blog 文章外移完畢

用一個晚上的時間,把原來在http://acmevil.taes.tp.edu.tw/drupal上所寫的文章全部轉移到http://acmevil.blogspot.com上面來。主要原因是原來的主機未來如果移作他用的話,那文章就必須再做大轉移,與其擔心未來,不如現在就做下決定。

Mail Server 移機--後記

Mail Server in the machine after a shift and start to test ok, but over the past few days has occurred several problems. DNS aspects aside for the moment and the local server has some problems.

First : When sign openwebmail and it displayed "can not read lock /var/spool/mail/user! " or " Unknown error at user write lock error ) : " After an investigation and discovered that the original mail owner was lost, mail owner became root. I do not know all of accounts the passwords and were unable to test how many lost, so change one by one. However, my good friend Pcpark provide a batch file to modify quickly and saved a lot of time. Create a text file that contains all the mail users account and create a batch file to execute. For example :

#vi chownuser

may

john

apple

joe

mary

arthur

stacy

lee

jack

Save it.

#vi chownuser.sh

#!/bin/sh

for name in `cat chownuser`
do
chown $name.mail $name
done

Save it.

These two files on the mail directory and then execute.

#sh chownuser.sh

This will help you change all of mail owners! ^ ^

2nd : Some people sign will be displayed at the bottom bunch .

Software error:

Undefined subroutine &ow::htmltext::str2html called at /var/www/cgi-bin/openwebmail/shares/ow-shared.pl line 1283.

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

The problem is user's home directory mistakes, as long as back into their original position.

Third : This is a big problem, the PC is not to be mail server originally. So the partition for /var in the first place is not allocated greater capacity, so the mail will fill /var partition. Don't re-install........ Finally I think solution in the bath:

#cd /var/spool/

#mkdir /home/mail

#mv /var/spool/mail/* /home/mail

#chown root.mail /home/mail

#mv mail mail_old

#ln -s /home/maol /var/spool/mail

As a result, all letters moved to /home/mail underground. If there is the question of mail owner occurred, you want to change mail owner again.

#cd /home/mail

#sh chownuser.sh

Done!^^


Mail Server在移機之後一開始試OK的,可是過幾天卻遇到許多的問題,DNS方面暫且不談,本機就有一些問題了。

第一:登入openwebmail時顯示"讀取無法鎖定 /var/spool/mail/user!

"或是"Unknown error at user write lock error):"經查證之後才發現,原來有些mail的權限已經跑掉了,擁有者變成root而不昰user本身,因我無所有user的帳號密碼,不能一一 測試到底有哪些權限跑掉了,於是就一個一個改權限。不過,我的好朋友pcpark提供一個batch改權限的方式,讓我省了不少時間:

先做一個文字檔,裡頭包含所有mail使用者的帳號,再寫一個sh檔來batch。範例如下:

#vi chownuser

may

john

apple

joe

mary

arthur

stacy

lee

jack

存檔.

#vi chownuser.sh

#!/bin/sh

for name in `cat chownuser`
do
chown $name.mail $name
done

存檔.

這兩個檔案一同放在mail目錄裡,然後執行。

#sh chownuser.sh

這樣就會幫你全部改好mail的擁有者了!^^

第二:有人登入時會顯示下面這一串

Software error:

Undefined subroutine &ow::htmltext::str2html called at /var/www/cgi-bin/openwebmail/shares/ow-shared.pl line 1283.

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

這個問題昰user的家目錄位置錯誤了,只要放回原來的位置就可以了,哈!

第三:這是一個大問題,原本此PC不是要用來當作mail server的,所以當初在partition時倂沒有給/var很大的容量,所以移過來的/var/mail一下子就會把該partition塞爆,不想重灌.......。終於在洗澡時想到解決的方式:

把/var/spool/mail裡的信件移到/home底下去

#cd /var/spool/

#mkdir /home/mail

#mv /var/spool/mail/* /home/mail

#chown root.mail /home/mail

#mv mail mail_old

#ln -s /home/maol /var/spool/mail

這樣一來,信件就全部轉移到/home/mail底下了。

如果還有發生權限的問題,就再去修改各個權限。

#cd /home/mail

#sh chownuser.sh

完畢!^^

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上的使用者帳號在FC6上在重建一次,但應該沒有人會一個一個來重建吧!畢竟我們的單位也有將近兩百人的帳號。於是,因本身有安裝Webmin此一套件,所以我們可以把帳號大量匯出:

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

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

Waitting.....Done! ^^

這樣先前的準備工作就做完了!做完一件”大事”了!

接下來要把FreeBSD上的mail及家目錄裡的mail資料夾(因為有裝openwenmail)轉移到FC6上(我用的是我想得到的方法,可能是最笨的方法。@.@)

在FreeBSD端:

#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

*把FreeBSD上所有人的家目錄備份檔抓過來

#tar zxvf home.tar.gz

*解開home.tar.gz,此會直接覆蓋原來家目錄裡所有檔名相同的檔案或資料夾

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

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

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

*把FreeBSD上的mail備份檔抓過來
#tar zxvf mail.tar.gz *解開mail備份檔

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

記得回到FreeBSD上把網頁根目錄下的home.tar.g及mail.tar.gz都刪掉喔!不然別人是可以任意下載您的備份檔的,當然是您的網頁伺服器有開的情況下。

至此差不多就完成了!。

Beach, Hot, Fry Shrimp | 海灘、熱、蝦子

Under sunshine, someone beach। Rare people here, who were scattered around the beach। Between the beach and surrounding roads are several the street vendors। Although the weather is so hot that can only let people hear their heavy breathing , but there was a lively atmosphere, as if there are many unvisible people on your side, and not feel bored। It just hot~hot ~hot! Along the beach road and walk the line, want to find the street vendors to drink। Suddenly, a school female colleagues sale fry shrimp, she is also one of the vendors। The strange thing is that her business has been remarkably good under this hot beach। I take her final shrimp, Shelling, eating incomplete shrimp meat, courtesy to say : "It's delicious! "

" Sorry, this is the last one, no! , "She said with a smile.
I also smile : "Never mind, there are opportunities for the future "
" If you are willing to help me with the tools stalls, and perhaps I can give you some? "She asked
"No problem, even if there is no fry shrimp I will be happy to help."
Her work kitchen in another side of the beach. Here only has a small wooden house overlooking the sea and on th beach with a few strokes that be hanged breaking flues. But doesn't exist a small broken boat, lost some miserable feeling.
Tools moved to put next to the washbasin.
"If there are cool watermelon to eat, it the more wonderful! "She washing bowl side edge and humorous said.
"This simple! "I smiled
With these words, I face the sea, invoke by a gesture like a ninjas and shout "Shadow duplicable skill, watermelon come~~".
Without the expected emergence of numerous me, but there have a gas from my legs into the sea. Mess into a white skin and green lines watermelon. Waiting for approaching me, proudly pick it up and give her. Here ! For you! "Surprise! How do you have? Look good to eat. " She did not see that I just do.
"You need not care so much, just eat enough. " I talk to her with a smile :" Can I help you to carve? Forget it, your own good. " I gave her and go in a room next to the kitchen to help her string of fry shrimp."
Of course, when saw plump fry shrimp always sent to my mouth. Afraid she found, but ate very happy that I was laughing in my mind. "A cool watermelon for a few fry shrimp , OK! "
About ate less than three fry shrimp, look the scenery outside, the sun still makes people unable to open their eyes. Afar appeared a small figure on the white beach unexpected point, regardless, continues the "Watermelon for fry shrimp" and with her, I did not communicate.
My brother appeared by riding a bicycle, just the original black spots was my brother.
He Rode around me : "Brother! Do you know where Daddy? "
" He seems to uncle's home. "
He said" Oh ! It's OK! I go to find him now. Do you have something for him? "
I gave him several fry shrimp, like these fry shrimp were mine, said : "Take to eat with daddy. "
Happiest he said :" OK! Bye! "Brother left.
I Ports string well fry shrimp to the colleagues and then said :" Well, this is your fry shrimps."
Gave all the shrimps to her and calmly said :" I have gone, goodbye! "Turnabout and leave.
"Wait! "She suddenly exclaimed.
I scare in my mind, Was it possible that eating fry shrimps behavior was found?
"Do you like me, or how to give me so much favor? "She calm and without feeling.
I vent their anger :" Do you think too much of it! I just have nothing to do in the seaside. "
"What help you don't want to return, and to no purpose. " End the word and turned left.
"Hey ~" she shouted behind me.
.....................

(Alarm clock rang really time! )
------------------------------------
艷陽下,某個沙灘上。這裡沒有什麼人,稀稀落落人散落在沙灘各地,圍繞在沙灘與馬路之間的是零落的攤販,雖然天氣熱得讓人只聽到自己沉濁的呼吸聲,但卻有一股熱鬧的氣氛,彷彿有許許多多的人氣就在你身邊,不會覺得無聊,只是熱~熱~熱~~。
沿著沙灘與道路間的界線走,想找個可以暢飲的攤販。卻發現,一個同校的女同事在賣炒蝦子,她也是攤販之一。奇怪的是在如此逼人低頭的日照下,她的生意卻出奇的好。我接過她鍋底下最後一隻不完整的蝦子串,撥了殼,吃掉勉強湊合的完整蝦肉,禮貌性的對她說:「好吃!」
「抱歉,這是最後一隻,沒有了!」她笑著說。
我還以笑容
:「沒關係,以後還有機會。」
「如果你願意幫我一起把攤位的工具搬回去,也許我可以再拿幾隻給你吃?」她問道。
「沒問題,就算沒有蝦子我也樂意幫忙。」正好打發百無聊賴的時間
她的工作廚房在海攤的另一側,這裡只有面海的一間小木屋與白沙上幾根似乎隨意立起掛著破網的木頭,卻沒有該存在而不用的小破船,少了一點蒼涼的味道。
把工具搬到洗手檯旁。
「如果現在有清涼的西瓜可以吃那該有多好啊!」她邊洗鍋子邊打趣的說。
「這個簡單!」我笑著對她說。
說罷,我面對海洋,擺出忍者唸咒的姿勢,右手結印,左手握拳砥柱右手掌,雙腿蹲馬步,喊著:
「影分身之術,西瓜~~」沒有預期中出現很多個我,卻有一股氣衝向海面,匯成一團,變成白色外皮綠色線條的西瓜。等待它飄向我,得意的拿起西瓜遞給她,喏!給你吃吧!
「哇塞!你怎麼會有?看起來很好吃的樣子。」
可見,她剛剛並沒有看到我做的事情。
「你不用管這麼多,有得吃就好了。」我面帶微笑的對她說「要我幫你切嗎?算了,你自己來好了。」
我遞給她之後就逕自走到廚房旁的房間幫她串蝦子,當然,看到肥美的蝦子總是往自己嘴裡送。怕被她發現,又偷吃的很開心,我心裡竊笑
「一顆清涼西瓜換幾隻蝦子,OK吧!」
約莫吃了三隻蝦子,望著屋外的景色,陽光還是讓人無法完全睜開眼睛。遠方出現一個細小的身影,在白色沙灘上突兀的一點,不管,埋頭繼續著理所當然的
「西瓜換蝦子」行為,而且我與她也沒在交談。
我弟弟騎著腳踏車出現了,原來剛剛的黑點是我第弟。
他騎到我身邊:
「哥!你知道爸爸在哪裡嗎?」
「他好像去舅舅家了。」我說
他疑惑「是喔!好吧!我現在去找他,你要拿東西給他嗎?」
我抓起一把身旁被我串直的蝦子塞到袋子,就像這些蝦子是我的一樣,然後遞給我第弟說
:「這些給爸吃,你也一起吃。」
弟弟開心的說:
「好!那我走囉!」
弟弟剛走,我就端起串好的蝦子走向那位女同事,然後說:
「好了,這是你的蝦子。」把所有的蝦子遞給她,若無其事的說:「我得走了,再見!」轉身,起步。
「等等!」她突然喊道,我心中一顫,偷吃蝦子的行為被發現了嗎?
「你是不是喜歡我,不然怎麼願意幫我這麼多忙?」她平靜而不帶感情
我心裡吁了一口氣
:「你想太多了吧!我是正好沒事,在海邊閒晃罷了。」我毫無表情,語帶一絲的氣惱:「幫忙不是要什麼回報的,也沒有什麼目的!」語畢,轉身就走。
「喂~」在我身後她叫道。
.....................
(鬧鐘響了,真是時候!)

2007年5月22號 丁亥年四月初六 晴時多雲(HOT!)

1. 早上跟小毛把資源教室(一)兩位陳老師的台碩的電腦(98)換成Windows XP的,就硬體來說只多了一條SD128MB的RAM而已,效能沒有差很多,只是XP支援性的問題會比98少一點。不過,對老師來說:XP就是新的,98就是舊的。 =.=!!!



2. 報修電腦教室(一)MBS多媒體廣播教學系統,報修(http://www.sinew.com.tw)內容如下:

(1). MBS上兩台Client端一直閃紅燈,不知為何?
(2).靠走廊整排client的pc在廣播時,畫面會變色或是廣播視窗變小,恢復自行操作時Client端就正常。



3.資源教室(三)taes1135網域設定有問題,導致該台分享之印表機的Client端都會出錯,重設就OK了!

2007年5月21號 丁亥年四月初五 晴時多雲(悶熱!)

1.早上公假帶一個六年二班的小朋友到萬芳國小參加網路創意寫作比賽,八點半出校門,將近十二點時回到學校。

2.五年六班老師說USB的PORT不夠, 只剩耳機插孔。(耳機插孔有USB介面的嗎?) =.=搞了半天, 她把耳機插孔的符號併在USB的PORT上,而把原來耳機的圓形插孔忽略了!

3.資源教室(三)taes1135原來報修為OS的序號錯誤,為盜版序號, 哦~~事實是根本無法開機,OS掛了。於是Recover掉,重新設定就OK了。

4.續上,所有資源班的電腦都要連上taes1135上的local印表機,(我的老天爺啊~~好吧!)就一台一台去設定,大部分都OK。不過順便發現了資源教室(一)的印表機HP dj 1120C無法安裝與設定,因為該台的OS有問題,升級成XP再看看吧!先找一條128RAM再說!哈!

P.S 今天萬芳國小提供的便當還不錯吃;不過今天下午都耗在資源班了!

感冒了,手軟腿軟、鼻塞、咳嗽、沒胃口、.....,整天都想睡覺。

感冒了,可是又不能請假,事情真多耶~!

唉唷喂呀~~~~

去看了中醫,他開了如下的樂,四個小時吃一包:

1.辛夷清肺湯(粉)

2.小兒杏蘇散(粉)

3.荊防敗毒散(粉)

4.蒼耳散(粉)

5.麻杏甘石湯(粉)

6.射干(粉)

7.魚腥草(粉)

8.黨参(粉)

希望快快好起來,這樣才可以繼續開冷氣吹電風扇睡覺。

@@~~

2007年5月11號 丁亥年三月二十五日 晴(熱!流鼻水依然..)

1.把外接式光碟機編好號碼,預定下星期一發給五年級各班。光碟機編號從26-5~26-17,五年

1班將拿到26-5,五年二班為26-6、.....依此類推,五年13班則為26-17。

2.精業電腦的工程師今天沒來,我又得被五年級老師抱怨了!@@

3.五年五班網域登入有問題,需要很久的時間才能登入,不如用administrator登入之後再用

NtLogon登入網域還比較快,等精業的來重灌好了,現在沒這麼多時間。

P.S:奇怪,感冒怎麼還沒好,都一個禮拜了!

2007年5月10號 丁亥年三月二十四日 晴(悶熱!)

1.精業的來修電腦,可是他很混,好像是隨便弄弄就走了,幾乎都沒弄好。所以,我們的老大發飆了,於是那個工程師又來了,可是還是混!哈!



2.測試未來的Mail Server失敗了! =.=!!!

2007年5月9號 丁亥年三月二十三日 晴(熱啊!)

1.與韻潔及保全公司人員抽測校園單槍包全設備是否正常。--->非常正常@@

2.設定172.16.14.21的DNS及Firewall和NAT,我要從外部測試未來的Mail Server。

Postfix+Cyrus-sasl(saslauthd)+F-prot+MailScanner+Spamassassin

在Fedora Core6上重裝Mail Server

參考文章:http://ftp.tn.edu.tw/Study/student_server/mail2.htm

基本上我都是照著這個網頁上的步驟做的,不過也遇到了幾個問題。文章我就不引用了,只列出我遇到的問題:

Q1:saslauthd認證失敗:

#/usr/sbin/testsaslauthd -u username -p 'password'

0: NO "authentication failed"

A1:本來是以為cyrus-sasl少裝了什麼套件,因為cyrus-sasl一共有九種套件(cyrus-sasl-devel、cyrus- sasl-lib、cyrus-sasl、cyrus-sasl-sql、cyrus-sasl-plain、cyrus-sasl-ntlm、 cyrus-sasl-ldap、cyrus-sasl-md5、cyrus-sasl-gssapi)。找不出原因之下,查了以前裝的mail server有哪些套件,才發現我是imap沒裝,於是我裝了uw-imap-utils-2006g及uw-imap-2006g就OK了。 真是=.=!!!

Q2:F-prot更新時(check-updates)失敗了,顯示:

Error: Unable to include perl module: 'HTTP::Request'.
Please install this module and try re-running this script.
(Hint: man CPAN)

Fatal error. Exiting...

A2:這個問題是HTTP::Request模組沒有安裝,只要安裝perl-libwww-perl這個相關版本的套件即可。

Q3:在maillog裡出現

fatal: open database /etc/postfix/access.db: No such file or directory

A3:這是沒有access.db檔,只要下

#postmap hash:/etc/postfix/access

即可!

2007年5月8號 丁亥年三月二十二日 晴(HOT!!!)

1. 今早跟小毛把五年級5~13班的精業-康柏的電腦裝好,但是其中5、6、8、9、13班這五個班級的硬碟或是OS都出現問題,大同小異--->無法登入或無法開機,韻潔已經連同電腦教室2的一起報修了吧!一共有七台待修。

2.下午四點幫心宇代課後羽球班。

XXX???--The Twelfth of Never


«The Twelfth of Never»
You ask me how much I need you
Must I explain
I need you oh my darling
Like roses need rain
You ask how long I’ll love you
I'll tell you true
Until the twelfth of never
I'll still be loving you

Hold me close
Never let me go
Hold me close
Melt my heart like April snow

I'll love you 'til the bluebells
Forget to bloom
I'll love you 'til the clover
Has lost its perfume
And I'll love you 'til the poets
Run out of rhyme
Until the twelfth of never
And that's a long, long time