<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No Money No Honey &#187; Linux</title>
	<atom:link href="http://blog.infinity.idv.tw/index.php/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.infinity.idv.tw</link>
	<description>Just Another Beginning</description>
	<lastBuildDate>Sat, 28 Jan 2012 18:25:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>限制POSTFIX轉寄到指定網域 與 針對特定使用者阻擋轉寄的網域</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/09/23/%e9%99%90%e5%88%b6postfix%e8%bd%89%e5%af%84%e5%88%b0%e6%8c%87%e5%ae%9a%e7%b6%b2%e5%9f%9f/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/09/23/%e9%99%90%e5%88%b6postfix%e8%bd%89%e5%af%84%e5%88%b0%e6%8c%87%e5%ae%9a%e7%b6%b2%e5%9f%9f/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 03:47:14 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[postfix 限制轉寄網域 relay deny]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/09/23/%e9%99%90%e5%88%b6postfix%e8%bd%89%e5%af%84%e5%88%b0%e6%8c%87%e5%ae%9a%e7%b6%b2%e5%9f%9f/</guid>
		<description><![CDATA[<p>1.建立阻檔網域清單    [root@mail ~]# vi /etc/postfix/reject_domains     xxx.com.tw reject     存檔 </p>
<p>2.建立資料庫    postmap hash:/etc/postfix/reject_domains </p>
<p>3.設定 main.cf    [root@mail ~]# vi /etc/postfix/main.cf     加在第一行     smtpd_recipient_restrictions =     &#160;&#160;&#160;&#160; check_recipient_access hash:/etc/postfix/reject_domains,permit </p>
<p>4.重啟postfix 設定  [...]]]></description>
			<content:encoded><![CDATA[<p>1.建立阻檔網域清單    <br />[root@mail ~]# vi /etc/postfix/reject_domains     <br />xxx.com.tw reject     <br />存檔 </p>
<p>2.建立資料庫    <br />postmap hash:/etc/postfix/reject_domains </p>
<p>3.設定 main.cf    <br />[root@mail ~]# vi /etc/postfix/main.cf     <br />加在第一行     <br />smtpd_recipient_restrictions =     <br />&#160;&#160;&#160;&#160; check_recipient_access hash:/etc/postfix/reject_domains,permit </p>
<p>4.重啟postfix 設定    <br />[root@mail ~]#postfix reload</p>
<p>=======================================</p>
<p>針對特定使用者阻擋轉寄的網域</p>
<p>參考網址:<a title="http://ithelp.ithome.com.tw/question/10024729" href="http://ithelp.ithome.com.tw/question/10024729">http://ithelp.ithome.com.tw/question/10024729</a></p>
<p>可以透過 smtpd_restriction_classes 來實現   <br />1. 將想受限制的使用者清單指定一個 smtpd_restriction_classes    <br />vi reject_users </p>
<p><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4.htm">檢視原始檔</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B1%5D.htm">複製到剪貼簿</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B2%5D.htm">列印</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B3%5D.htm">關於</a> </p>
<ol>
<li>user1@mydomain.com reject_class&#160;&#160;&#160; </li>
<li>user2@mydomain.com reject_class&#160; </li>
</ol>
<pre>user1@mydomain.com reject_class
user2@mydomain.com reject_class</pre>
<p>postmap hash:/etc/postfix/reject_users</p>
<p>2. 將想受限制的 domain 清單也作一個 map</p>
<p>vi reject_domains </p>
<p><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B4%5D.htm">檢視原始檔</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B5%5D.htm">複製到剪貼簿</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B6%5D.htm">列印</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B7%5D.htm">關於</a> </p>
<ol>
<li>domain1.com reject&#160;&#160;&#160; </li>
<li>domain2.com reject&#160; </li>
</ol>
<pre>domain1.com reject
domain2.com reject</pre>
<p>postmap hash:/etc/postfix/reject_domains</p>
<p>3. 設定 postfix</p>
<p>vi main.cf </p>
<p><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B8%5D.htm">檢視原始檔</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B9%5D.htm">複製到剪貼簿</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B10%5D.htm">列印</a><a href="file:///C:/Documents%20and%20Settings/roger.WINPEX-GL/Local%20Settings/Temp/WindowsLiveWriter-429641856/supfiles5DD8BFF/postfix%E8%A6%81%E6%80%8E%E9%BA%BC%E9%99%90%E5%88%B6%E9%83%A8%E4%BB%BD%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%84%E5%88%B0%E5%A4%96%E9%83%A8%E7%9A%84%E4%BF%A1%E7%AE%B1(%E5%8F%AA%E6%88%90%E5%8A%9F%E4%B8%80%E5%8D%8A)%20-%20iT%E9%82%A6%E5%B9%AB%E5%BF%99IT%E7%9F%A5%E8%AD%98%E5%88%86%E4%BA%AB%E7%A4%BE%E7%BE%A4%5B11%5D.htm">關於</a> </p>
<ol>
<li># 宣告 smtpd_restriction_classes&#160; </li>
<li>smtpd_restriction_classes = reject_class&#160;&#160;&#160; </li>
<li></li>
<li># 說明這個 class 的檢查規則 </li>
<li>reject_class = check_recipient_access hash:/etc/postfix/reject_domain&#160;&#160;&#160; </li>
<li></li>
<li># 現在要改用 check_sender_access 來檢查使用者了 </li>
<li>smtpd_recipient_restrictions =&#160;&#160;&#160; </li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; check_sender_access hash:/etc/postfix/reject_user,&#160;&#160;&#160; </li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; permit_mynetworks,&#160;&#160;&#160; </li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#160; </li>
</ol>
<pre># 宣告 smtpd_restriction_classes
smtpd_restriction_classes = reject_class

# 說明這個 class 的檢查規則
reject_class = check_recipient_access hash:/etc/postfix/reject_domain

# 現在要改用 check_sender_access 來檢查使用者了
smtpd_recipient_restrictions =
        check_sender_access hash:/etc/postfix/reject_user,
        permit_mynetworks,
        .....................</pre>
<p>4. 重啟 postfix, 測試</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/09/23/%e9%99%90%e5%88%b6postfix%e8%bd%89%e5%af%84%e5%88%b0%e6%8c%87%e5%ae%9a%e7%b6%b2%e5%9f%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2011.08.18 &#8211; CentOS 5.5關閉IPV6(非alias net-pf-10 off與alias ipv6 off無法關閉方式)</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/08/18/2011-08-18-centos-5-5%e9%97%9c%e9%96%89ipv6%e9%9d%9ealias-net-pf-10-off%e8%88%87alias-ipv6-off%e7%84%a1%e6%b3%95%e9%97%9c%e9%96%89%e6%96%b9%e5%bc%8f/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/08/18/2011-08-18-centos-5-5%e9%97%9c%e9%96%89ipv6%e9%9d%9ealias-net-pf-10-off%e8%88%87alias-ipv6-off%e7%84%a1%e6%b3%95%e9%97%9c%e9%96%89%e6%96%b9%e5%bc%8f/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 01:47:20 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[指令集]]></category>
		<category><![CDATA[CentOS 5.5 關閉IPv6]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/08/18/2011-08-18-centos-5-5%e9%97%9c%e9%96%89ipv6%e9%9d%9ealias-net-pf-10-off%e8%88%87alias-ipv6-off%e7%84%a1%e6%b3%95%e9%97%9c%e9%96%89%e6%96%b9%e5%bc%8f/</guid>
		<description><![CDATA[<p>測試過確定可行!</p>
<p>參考出處 : http://www.360doc.com/content/11/0808/23/7470455_139037303.shtml</p>
<p>CentOS 5.5關閉IPV6   發表於 2011/07/08 由 winds    可以修改下面兩個文件以阻止IPv6內核模塊的加載：    /etc/modprobe.conf –內核模塊配置文件    /etc/sysconfig/network –網絡配置文件 </p>
<p>1. # vim /etc/modprobe.conf    在其中加入下面這一行， </p>
<p>install ipv6 /bin/true </p>
<p>保存並退出。 </p>
<p>2. # vim /etc/sysconfig/network    在其中加入下面配置項： </p>
<p>NETWORKING_IPV6=no    IPV6INIT=no </p>
<p>保存並退出文件，重啟網絡與服務器： </p>
<p># service network restart  [...]]]></description>
			<content:encoded><![CDATA[<p>測試過確定可行!</p>
<p>參考出處 : <a title="http://www.360doc.com/content/11/0808/23/7470455_139037303.shtml" href="http://www.360doc.com/content/11/0808/23/7470455_139037303.shtml">http://www.360doc.com/content/11/0808/23/7470455_139037303.shtml</a></p>
<p>CentOS 5.5關閉IPV6   <br />發表於 2011/07/08 由 winds    <br />可以修改下面兩個文件以阻止IPv6內核模塊的加載：    <br />/etc/modprobe.conf –內核模塊配置文件    <br />/etc/sysconfig/network –網絡配置文件 </p>
<p>1. # vim /etc/modprobe.conf    <br />在其中加入下面這一行， </p>
<p>install ipv6 /bin/true </p>
<p>保存並退出。 </p>
<p>2. # vim /etc/sysconfig/network    <br />在其中加入下面配置項： </p>
<p>NETWORKING_IPV6=no    <br />IPV6INIT=no </p>
<p>保存並退出文件，重啟網絡與服務器： </p>
<p># service network restart    <br /># reboot </p>
<p>如果想檢查當前IPv6是否已禁用，可以使用下列命令： </p>
<p># lsmod | grep ipv6    <br /># ifconfig -a</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/08/18/2011-08-18-centos-5-5%e9%97%9c%e9%96%89ipv6%e9%9d%9ealias-net-pf-10-off%e8%88%87alias-ipv6-off%e7%84%a1%e6%b3%95%e9%97%9c%e9%96%89%e6%96%b9%e5%bc%8f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeNAS 8.0.1 BETA 2 之 NFS 與 CIFS(W網芳)傳輸測試(BETA 3 因設定 storage 權限設定異常無法測試)</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/07/08/freenas-8-0-1-beta-2-%e4%b9%8b-nfs-%e8%88%87-cifsw%e7%b6%b2%e8%8a%b3%e5%82%b3%e8%bc%b8%e6%b8%ac%e8%a9%a6beta-3-%e5%9b%a0%e8%a8%ad%e5%ae%9a-storage-%e6%ac%8a%e9%99%90%e8%a8%ad%e5%ae%9a%e7%95%b0/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/07/08/freenas-8-0-1-beta-2-%e4%b9%8b-nfs-%e8%88%87-cifsw%e7%b6%b2%e8%8a%b3%e5%82%b3%e8%bc%b8%e6%b8%ac%e8%a9%a6beta-3-%e5%9b%a0%e8%a8%ad%e5%ae%9a-storage-%e6%ac%8a%e9%99%90%e8%a8%ad%e5%ae%9a%e7%95%b0/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 03:53:34 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[VMware虛擬機器]]></category>
		<category><![CDATA[FreeNAS NFS CIFS 網芳 傳輸測試]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/07/08/freenas-8-0-1-beta-2-%e4%b9%8b-nfs-%e8%88%87-cifsw%e7%b6%b2%e8%8a%b3%e5%82%b3%e8%bc%b8%e6%b8%ac%e8%a9%a6beta-3-%e5%9b%a0%e8%a8%ad%e5%ae%9a-storage-%e6%ac%8a%e9%99%90%e8%a8%ad%e5%ae%9a%e7%95%b0/</guid>
		<description><![CDATA[<p>FreeNAS 8.0.1 BETA 2 之 NFS 與 CIFS(W網芳)傳輸測試(BETA 3 因設定 storage 權限設定異常無法測試)</p>
<p>簡易測試環境:</p>
<p>網路: 1Gbps   FreeNAS主機資訊:         </p>
<p>簡易測試方式:</p>
<p>1.使用 Client XP 連 CIFS(網芳)傳檔   </p>
<p>XP下載:(會飄 39~42居多)    &#160; </p>
<p>XP上傳:(比較平穩快速,幾乎都在55以上)        </p>
</p>
<p>2.使用 XP 執行 vSphere 連線掛載 NFS,使用vSphere 的Browse Datastore的上下傳測試</p>
<p>上傳:(慘不忍賭,大部份都卡在幾kb,偶爾跳一兩秒15mb…)   [...]]]></description>
			<content:encoded><![CDATA[<p>FreeNAS 8.0.1 BETA 2 之 NFS 與 CIFS(W網芳)傳輸測試(BETA 3 因設定 <b>storage </b>權限設定異常無法測試)</p>
<p>簡易測試環境:</p>
<p>網路: 1Gbps   <br />FreeNAS主機資訊:    <br /><a href="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/1.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1" border="0" alt="1" src="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/1_thumb.jpg" width="427" height="286" /></a>     </p>
<p>簡易測試方式:</p>
<p>1.使用 Client XP 連 CIFS(網芳)傳檔   </p>
<p>XP下載:(會飄 39~42居多)    <br /><a href="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2" border="0" alt="2" src="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/2_thumb.jpg" width="742" height="288" /></a>&#160; </p>
<p>XP上傳:(比較平穩快速,幾乎都在55以上)   <br /><a href="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="3" border="0" alt="3" src="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/3_thumb.jpg" width="554" height="311" /></a>     </p>
</p>
<p>2.使用 XP 執行 vSphere 連線掛載 NFS,使用vSphere 的Browse Datastore的上下傳測試</p>
<p>上傳:(慘不忍賭,大部份都卡在幾kb,偶爾跳一兩秒15mb…)   <br /><a href="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/2_3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2" border="0" alt="2" src="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/2_thumb_3.jpg" width="657" height="199" /></a>&#160; <br /><a href="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="4" border="0" alt="4" src="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/4_thumb.jpg" width="661" height="204" /></a> </p>
<p>&#160;</p>
<p>下載:(平穩約45~47)   <br /><a href="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/1_3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1" border="0" alt="1" src="http://blog.infinity.idv.tw/blog-img/FreeNAS8.0.1BETA2NFSCIFSWBETA3storage_A732/1_thumb_3.jpg" width="651" height="237" /></a> </p>
<p>&#160;</p>
<p>本想用來當ESX第二台備份用,看來要再等等看了,看那時候這種問題可排除。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/07/08/freenas-8-0-1-beta-2-%e4%b9%8b-nfs-%e8%88%87-cifsw%e7%b6%b2%e8%8a%b3%e5%82%b3%e8%bc%b8%e6%b8%ac%e8%a9%a6beta-3-%e5%9b%a0%e8%a8%ad%e5%ae%9a-storage-%e6%ac%8a%e9%99%90%e8%a8%ad%e5%ae%9a%e7%95%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freenas 8 Released 安裝後,要到 Storge Create Volume 時找不到媒體問題</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/07/05/freenas-8-released-%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a6%81%e5%88%b0-storge-create-volume-%e6%99%82%e6%89%be%e4%b8%8d%e5%88%b0%e5%aa%92%e9%ab%94%e5%95%8f%e9%a1%8c/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/07/05/freenas-8-released-%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a6%81%e5%88%b0-storge-create-volume-%e6%99%82%e6%89%be%e4%b8%8d%e5%88%b0%e5%aa%92%e9%ab%94%e5%95%8f%e9%a1%8c/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 08:19:31 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[FreeNAS 硬碟 媒體 安裝]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/07/05/freenas-8-released-%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a6%81%e5%88%b0-storge-create-volume-%e6%99%82%e6%89%be%e4%b8%8d%e5%88%b0%e5%aa%92%e9%ab%94%e5%95%8f%e9%a1%8c/</guid>
		<description><![CDATA[<p>Freenas 8 Released 安裝後,要到 Storge Create Volume 時找不到媒體問題</p>
<p>試了一下發現，如果只有一顆硬碟，且安裝時當開機系統，那這顆硬碟就會是純開機的硬碟，進 Freenas 後,這顆硬碟就不算是可用媒體範圍，建議將系統安裝在一個2g的USB隨身碟裡當開機系統(當然設備要支援usb開機才行)。</p>
]]></description>
			<content:encoded><![CDATA[<p>Freenas 8 Released 安裝後,要到 Storge Create Volume 時找不到媒體問題</p>
<p>試了一下發現，如果只有一顆硬碟，且安裝時當開機系統，那這顆硬碟就會是純開機的硬碟，進 Freenas 後,這顆硬碟就不算是可用媒體範圍，建議將系統安裝在一個2g的USB隨身碟裡當開機系統(當然設備要支援usb開機才行)。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/07/05/freenas-8-released-%e5%ae%89%e8%a3%9d%e5%be%8c%e8%a6%81%e5%88%b0-storge-create-volume-%e6%99%82%e6%89%be%e4%b8%8d%e5%88%b0%e5%aa%92%e9%ab%94%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>利用 procmail 的過濾信件(Postfix )</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/05/26/%e5%88%a9%e7%94%a8-procmail-%e7%9a%84%e9%81%8e%e6%bf%be%e4%bf%a1%e4%bb%b6postfix/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/05/26/%e5%88%a9%e7%94%a8-procmail-%e7%9a%84%e9%81%8e%e6%bf%be%e4%bf%a1%e4%bb%b6postfix/#comments</comments>
		<pubDate>Thu, 26 May 2011 02:47:39 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[postfix]]></category>
		<category><![CDATA[過濾郵件 Procmail]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/05/26/%e5%88%a9%e7%94%a8-procmail-%e7%9a%84%e9%81%8e%e6%bf%be%e4%bf%a1%e4%bb%b6postfix/</guid>
		<description><![CDATA[<p>利用 procmail 的過濾信件(Postfix )</p>
<p>參考網址:http://blog.weithenn.org/2009/06/freebsdpostfix-amavisd-new-uvscan.html</p>
Procmail 部份 (自訂郵件收送規則)
步驟1.安裝 Procmail 套件
<p>切換至 Ports Tree 路徑安裝 Procmail 套件(請尊重 weithenn 的辛勞!!)</p>
<p></p>
<p>#cd /usr/ports/mail/procmail //切換至安裝路徑        #make install clean //安裝套件並清除安裝過程中不必要的檔案</p>

步驟2.修改 Postfix 設定檔 (main.cf)
<p>修改 Postfix 設定檔 main.cf 內容如下</p>
<p>#vi /usr/local/etc/postfix/main.cf //修改 Postfix 設定檔        mailbox_command = /usr/local/bin/procmail //加入此行 (自訂的規則會套用至所有帳號)</p>

步驟3.編寫過濾規則 (procmailrc)
<p>編寫過濾規則設定檔 Promailrc 下列過濾規則為收集網路上資料而成的範例。(請尊重 weithenn [...]]]></description>
			<content:encoded><![CDATA[<p>利用 procmail 的過濾信件(Postfix )</p>
<p>參考網址:<a title="http://blog.weithenn.org/2009/06/freebsdpostfix-amavisd-new-uvscan.html" href="http://blog.weithenn.org/2009/06/freebsdpostfix-amavisd-new-uvscan.html">http://blog.weithenn.org/2009/06/freebsdpostfix-amavisd-new-uvscan.html</a></p>
<h4>Procmail 部份 (自訂郵件收送規則)</h4>
<h5>步驟1.安裝 Procmail 套件</h5>
<p>切換至 Ports Tree 路徑安裝 Procmail 套件(請尊重 weithenn 的辛勞!!)</p>
<p><code></code></p>
<blockquote><p><code>#cd /usr/ports/mail/procmail //切換至安裝路徑        <br />#make install clean //安裝套件並清除安裝過程中不必要的檔案</code></p>
</blockquote>
<h5>步驟2.修改 Postfix 設定檔 (main.cf)</h5>
<p>修改 Postfix 設定檔 main.cf 內容如下</p>
<blockquote><p><code>#vi /usr/local/etc/postfix/main.cf //修改 Postfix 設定檔        <br />mailbox_command = /usr/local/bin/procmail //加入此行 (自訂的規則會套用至所有帳號)</code></p>
</blockquote>
<h5>步驟3.編寫過濾規則 (procmailrc)</h5>
<p>編寫過濾規則設定檔 Promailrc 下列過濾規則為收集網路上資料而成的範例。(請尊重 weithenn 的辛勞!!)</p>
<ul>
<li>所有使用者的過濾條件： /usr/loca/etc/procmailrc </li>
<li>個別使用者的過濾條件： .procmailrc (使用者家目錄下透過 .forware 來啟動 procmail) </li>
</ul>
<p>使用者可透過在個人家目錄下 .forward 加入如下內容來達到自訂個人過濾條件的目的 (請依個人喜好擇一即可)</p>
<blockquote><p><code>#cat ~/.forward        <br />&quot;| /usr/local/bin/procmail&quot; //加入此行 (方式一)         <br />&quot;|IFS=' ' &amp;&amp; exec /usr/local/bin/procmail -f- || exit 75 $USER&quot; //加入此行 (方式二)</code></p>
</blockquote>
<p>以下為自訂所有使用者的過濾條件，其中的 /dev/null 可以換成別的目錄 (ex./var/virusmails)。內容如下 (當然您可依個人需求新增/刪除)</p>
<blockquote><p><code>#vi /usr/loca/etc/procmailrc        <br />VERBOSE=off         <br />LOGFILE=/var/log/procmail.log         <br />###########################################################################         <br />###Procmail 寄進來的郵件依下列規則逐一過濾，未符合底下規則的信件都放行 ###         <br />###Subjcet 主旨 ###         <br />###Content-Type: ###         <br />###########################################################################         <br />############ KLEZ.G Virus ############         <br />:0b         <br />* ^Subject:.*(Let's be friends)         <br />/dev/null         <br />###         <br />:0b         <br />* ^Subject:.*A funny game         <br />/dev/null         <br />###         <br />:0b         <br />* ^Subject:.*Hello\,.*\,how are you.*         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*audio/x-wav.*         <br />* ^.*name=.*\.(scr|SCR)         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*audio/x-midi.*         <br />* ^.*name=.*\.(scr|SCR)         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*application/octet-stream.*         <br />* ^.*name=.*\.(scr|SCR)         <br />/dev/null         <br />###         <br />:0 Bb         <br />* ^This game is my first work.*         <br />* ^You\'re the first player.*         <br />* I.*you would .* it.*         <br />/dev/null         <br />###         <br />:0 Bb         <br />* .*This is a.*patch.*         <br />* ^I .* you would.*it.*         <br />/dev/null         <br />###         <br />:0 Bb         <br />* .*iframe src=3Dcid.*height=3D0 width=3D0.*         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*multipart/mixed.*         <br />* name=&quot;ANTI_CIH.EXE&quot;         <br />/dev/null         <br />###         <br />:0b         <br />* ^Subject:.*W32.Klez.*removal tools.*         <br />/dev/null         <br />############## Nimda Virus ###############         <br />:0 Bh         <br />* ^Content-Type:.*audio/x-wav.*         <br />* name=&quot;readme.exe&quot;         <br />/dev/null         <br />###         <br />:0 Bh         <br />* ^Content-Type:.*audio/x-wav.*         <br />* name=&quot;sample.exe&quot;         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*multipart/mixed.*         <br />* name=&quot;readme.exe&quot;         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*multipart/mixed.*         <br />* name=&quot;sample.exe&quot;         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*application.*         <br />* name=&quot;readme.exe&quot;         <br />/dev/null         <br />###         <br />:0 B         <br />* ^Content-Type:.*application.*         <br />* name=&quot;sample.exe&quot;         <br />/dev/null         <br />############# SirCam Virus ############         <br />:0 Bh         <br />* I send you this file in order to have your advice         <br />/dev/null         <br />############# PE.BRID.A ############         <br />:0 H         <br />* ^X-Mailer: EBT Reporter.*$         <br />/dev/null         <br />###         <br />:0 B         <br />* ^.*[Nn][Aa][Mm][Ee]=README\.EXE.*$         <br />/dev/null         <br />#############廣告信 (下列三種挑一個吧) ##############         <br />:0:         <br />* ^X-Spam-Flag:.*YES         <br />/dev/null         <br />:0:         <br />* ^X-Spam-Level:.\*\*\*\*\*         <br />/dev/null         <br />:0:         <br />* ^X-Spam-Status:.*Yes         <br />/dev/null</code></p>
</blockquote>
<p>建立 Procmail Log 以便後續觀察 Procmail 運作狀況，若要允許使用者的 Procmail 過濾規則也可寫入該 Log 的話則權限請設定為 666(請尊重 weithenn 的辛勞!!)</p>
<blockquote><p><code>#touch /var/log/procmail.log //建立 Procmail Log        <br />#chmod 666 /var/log/procmail.log //允許使用者的 Procmail 過濾規則也可寫入</code></p>
</blockquote>
<h5>步驟4.測試過濾規則</h5>
<p>在測試過程中可以針對 A funny game 主旨來進行測試並且把 /dev/null 改成/var/virusmails。寄此主旨的信件給使用者然後使用 mailstat 來觀察。</p>
<blockquote><p><code>#mailstat -km /var/log/procmail.log</code></p>
</blockquote>
<h5>步驟5.如何過濾中文廣告信</h5>
<p>由於中文編碼 (中文廣告信) 進入系統後會顯示為亂碼，因此若是您直接在過濾規則內打中文是無法過濾中文廣告信的，所以請安裝 mmencode 套件，將中文字轉換為 MIME Code。</p>
<blockquote><p><code>#cd /usr/ports/converters/mmencode //切換到安裝路徑        <br />#make install clean //安裝並清除過程中不必要的檔案</code></p>
</blockquote>
<p>MIME 定義兩種編碼方法：Base64 與 QP(Quote-Printable) 而含有 MIME 編碼的郵件若您查看它的源始碼會含有 &quot;This is a multi-part message in MIME format.&quot; 這樣的句子。</p>
<ul>
<li><strong>Base64</strong>： 預設值，將整個檔案資料重新編碼為 7bits
<ul>
<li>以下將中文字 <strong>打炮</strong> 轉換成 MIME 編碼中的 Base64 以及將 Base64 轉換回中文 </li>
</ul>
</li>
</ul>
<blockquote><p><code>#echo &quot;打炮&quot; | mmencode //中文轉換為 Base64        <br />pbSstgo=         <br />#echo &quot;pbSstgo=&quot; |mmencode -u //Base64 轉換為中文         <br />打炮</code> </p>
<ul>
<li><strong>QP</strong> (<strong>Q</strong>uote-<strong>P</strong>rintable)： 將 8bits 中文資料轉換為 7bits
<ul>
<li>以下將中文字 <strong>打炮</strong> 轉換成 MIME 編碼中的 QP 以及將 QP 轉換回中文 </li>
</ul>
</li>
</ul>
<p>   <code>#echo &quot;打炮&quot; | mmencode -q //中文轉換為 QP      <br />=A5=B4=AC=B6       <br />#echo &quot;=A5=B4=AC=B6&quot; | mmencode -q -u //QP 轉換為中文       <br />打炮</code> </p></blockquote>
<p>在 Procemail 過濾規則 (procmailrc) 中可以接受 Base64 及 QP 的 MIME 編碼，以下過濾規則中為郵件主旨中只要有<strong>打炮</strong>這二個中文字眼就把該 Mail 移到 /dev/null 去。</p>
<blockquote><p><code>:0b        <br />* ^Subject:.*(pbSstgo=)* //Base64 Code         <br />/dev/null         <br />:0b         <br />* ^Subject:.*(=A5=B4=AC=B6)* //QP Code         <br />/dev/null</code></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/05/26/%e5%88%a9%e7%94%a8-procmail-%e7%9a%84%e9%81%8e%e6%bf%be%e4%bf%a1%e4%bb%b6postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>POSTFIX針對特定垃圾信主旨過濾</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/05/26/postfix%e9%87%9d%e5%b0%8d%e7%89%b9%e5%ae%9a%e5%9e%83%e5%9c%be%e4%bf%a1%e4%b8%bb%e6%97%a8%e9%81%8e%e6%bf%be/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/05/26/postfix%e9%87%9d%e5%b0%8d%e7%89%b9%e5%ae%9a%e5%9e%83%e5%9c%be%e4%bf%a1%e4%b8%bb%e6%97%a8%e9%81%8e%e6%bf%be/#comments</comments>
		<pubDate>Thu, 26 May 2011 01:51:10 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[postfix]]></category>
		<category><![CDATA[過濾 主旨 postfix 阻擋信件]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/05/26/postfix%e9%87%9d%e5%b0%8d%e7%89%b9%e5%ae%9a%e5%9e%83%e5%9c%be%e4%bf%a1%e4%b8%bb%e6%97%a8%e9%81%8e%e6%bf%be/</guid>
		<description><![CDATA[最近公司同仁收到很多DHL的病毒信，叫收信的人要開附件zip檔案，內附的文件是 *.exe，叫我家的狗想，他都知道 200% 是病毒，但是還是怕有同仁”誤點”，還是在SERVER上先阻擋吧，發現主旨不會變，找到了下面方式來擋特定主旨
參考網址:http://ak6783.blogspot.com/2009/06/blog-post_11.html
POSTFIX 針對特定垃圾信主旨過濾
<p>小弟公司的MailServer是用Postfix+MailScanner+Spamassassin   因為為了&#34;方便&#34;公司同事，所有垃圾信都是直接轉到某個信箱，而誤判的正常信再由我們轉給同事，原來我們IT也算是另類的郵差啊^_^    最近整理垃圾信的時候發現，那些寄藥品廣告的(大家應該知道是哪家吧)的主旨都好固定哦，這讓我愛死他們了，因為固定那我幾乎可以直接把它們給過濾掉    在/etc/postfix/header_checks裡    我增加了</p>
<p>/^Subject:.*You&#8217;ve received a greeting ecard/ DISCARD   /^Subject:.*Pharmacy Discount ID*/ DISCARD    /^Subject:.RE: DISCOUNT ID*/ DISCARD</p>
<p>我重新啟動了MailScanner後，以後這個主旨垃圾信就連進來都不會進來了  那你說，垃圾信可以換一個主旨再來啊，沒錯啊，就好像防毒軟體常常要更新一樣啊，它可以變啊，我也可以增加啊，反正我已經有防垃圾信的機制，再配合手動增加這種幾乎是一模一樣的主旨來過濾，幾乎九成九都可以過濾  記住，沒有一個防毒或是防垃圾信的軟體是全自動且百分之百，認真的管理才是最重要的^_^ </p>
]]></description>
			<content:encoded><![CDATA[<h5>最近公司同仁收到很多DHL的病毒信，叫收信的人要開附件zip檔案，內附的文件是 *.exe，叫我家的狗想，他都知道 200% 是病毒，但是還是怕有同仁”誤點”，還是在SERVER上先阻擋吧，發現主旨不會變，找到了下面方式來擋特定主旨</h5>
<h5>參考網址:<a title="http://ak6783.blogspot.com/2009/06/blog-post_11.html" href="http://ak6783.blogspot.com/2009/06/blog-post_11.html">http://ak6783.blogspot.com/2009/06/blog-post_11.html</a></h5>
<h5>POSTFIX <a href="http://ak6783.blogspot.com/2009/06/blog-post_11.html">針對特定垃圾信主旨過濾</a></h5>
<p>小弟公司的MailServer是用Postfix+MailScanner+Spamassassin   <br />因為為了&quot;方便&quot;公司同事，所有垃圾信都是直接轉到某個信箱，而誤判的正常信再由我們轉給同事，原來我們IT也算是另類的郵差啊^_^    <br />最近整理垃圾信的時候發現，那些寄藥品廣告的(大家應該知道是哪家吧)的主旨都好固定哦，這讓我愛死他們了，因為固定那我幾乎可以直接把它們給過濾掉    <br />在/etc/postfix/header_checks裡    <br />我增加了</p>
<blockquote><p>/^Subject:.*You&#8217;ve received a greeting ecard/ DISCARD   <br />/^Subject:.*Pharmacy Discount ID*/ DISCARD    <br />/^Subject:.RE: DISCOUNT ID*/ DISCARD</p></blockquote>
<p>我重新啟動了MailScanner後，以後這個主旨垃圾信就連進來都不會進來了  <br />那你說，垃圾信可以換一個主旨再來啊，沒錯啊，就好像防毒軟體常常要更新一樣啊，它可以變啊，我也可以增加啊，反正我已經有防垃圾信的機制，再配合手動增加這種幾乎是一模一樣的主旨來過濾，幾乎九成九都可以過濾  <br />記住，沒有一個防毒或是防垃圾信的軟體是全自動且百分之百，認真的管理才是最重要的^_^ </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/05/26/postfix%e9%87%9d%e5%b0%8d%e7%89%b9%e5%ae%9a%e5%9e%83%e5%9c%be%e4%bf%a1%e4%b8%bb%e6%97%a8%e9%81%8e%e6%bf%be/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache根目錄只顯示預設的歡迎畫面問題</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/04/28/apache%e6%a0%b9%e7%9b%ae%e9%8c%84%e5%8f%aa%e9%a1%af%e7%a4%ba%e9%a0%90%e8%a8%ad%e7%9a%84%e6%ad%a1%e8%bf%8e%e7%95%ab%e9%9d%a2%e5%95%8f%e9%a1%8c/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/04/28/apache%e6%a0%b9%e7%9b%ae%e9%8c%84%e5%8f%aa%e9%a1%af%e7%a4%ba%e9%a0%90%e8%a8%ad%e7%9a%84%e6%ad%a1%e8%bf%8e%e7%95%ab%e9%9d%a2%e5%95%8f%e9%a1%8c/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 02:40:10 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache httpd 根目錄 歡迎畫面 test page]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/04/28/apache%e6%a0%b9%e7%9b%ae%e9%8c%84%e5%8f%aa%e9%a1%af%e7%a4%ba%e9%a0%90%e8%a8%ad%e7%9a%84%e6%ad%a1%e8%bf%8e%e7%95%ab%e9%9d%a2%e5%95%8f%e9%a1%8c/</guid>
		<description><![CDATA[<p>CentOS 5.5 的 apache 怎麼設定 /etc/httpd/conf/httpd.conf 根目錄並加入自己的網頁都只會顯示 預設的歡迎畫面,確無法顯示:    </p>
<p>將/etc/httpd/conf.d/welcome.conf改名或刪除後即可正常使用。</p>
]]></description>
			<content:encoded><![CDATA[<p>CentOS 5.5 的 apache 怎麼設定 /etc/httpd/conf/httpd.conf 根目錄並加入自己的網頁都只會顯示 預設的歡迎畫面,確無法顯示:   <br /><a href="http://blog.infinity.idv.tw/blog-img/apache_962B/1.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1" border="0" alt="1" src="http://blog.infinity.idv.tw/blog-img/apache_962B/1_thumb.jpg" width="1041" height="413" /></a> </p>
<p>將/etc/httpd/conf.d/welcome.conf改名或刪除後即可正常使用。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/04/28/apache%e6%a0%b9%e7%9b%ae%e9%8c%84%e5%8f%aa%e9%a1%af%e7%a4%ba%e9%a0%90%e8%a8%ad%e7%9a%84%e6%ad%a1%e8%bf%8e%e7%95%ab%e9%9d%a2%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mailscanner取回隔離區的信-Releasing mail from the quarantine</title>
		<link>http://blog.infinity.idv.tw/index.php/2011/03/01/mailscanner%e5%8f%96%e5%9b%9e%e9%9a%94%e9%9b%a2%e5%8d%80%e7%9a%84%e4%bf%a1-releasing-mail-from-the-quarantine/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2011/03/01/mailscanner%e5%8f%96%e5%9b%9e%e9%9a%94%e9%9b%a2%e5%8d%80%e7%9a%84%e4%bf%a1-releasing-mail-from-the-quarantine/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 05:57:32 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MailScanner]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[MailScanner 取回 隔離區]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2011/03/01/mailscanner%e5%8f%96%e5%9b%9e%e9%9a%94%e9%9b%a2%e5%8d%80%e7%9a%84%e4%bf%a1-releasing-mail-from-the-quarantine/</guid>
		<description><![CDATA[Releasing mail from the quarantine &#8211; queue files
<p>For the purposes of this, I’m assuming you have set up a single (safe!) postfix instance, with messages going to the HOLD queue, before being processed by MailScanner and sent to the INCOMING queue. You also need to be saving whole messages as queue files. </p>
<p>In MailScanner.conf ensure [...]]]></description>
			<content:encoded><![CDATA[<h3><a name="releasing_mail_from_the_quarantine_-_queue_files">Releasing mail from the quarantine &#8211; queue files</a></h3>
<p>For the purposes of this, I’m assuming you have set up a single (safe!) postfix instance, with messages going to the HOLD queue, before being processed by MailScanner and sent to the INCOMING queue. You also need to be saving whole messages as queue files. </p>
<p>In MailScanner.conf ensure that you have </p>
<pre># When you quarantine an entire message, do you want to store it as
# raw mail queue files (so you can easily send them onto users) or
# as human-readable files (header then body in 1 file)?
Quarantine Whole Messages As Queue Files = yes </pre>
<p>Quarantined emails are by default kept in /var/spool/MailScanner/quarantine and sorted into subdirectories by date. With any luck it will be dead easy to find, as MailScanner will have sent a message including text along the lines of either: </p>
<p>A: If it’s a quarantined virus, or other dangerous content. </p>
<pre>“Note to Help Desk: Look on the &lt;Your text&gt; in /var/spool/MailScanner/quarantine/20050309 (message
6BC5E368497.3C3A6).” </pre>
<p>MailScanner keeps such quarantined emails in their own directories, thus the directory containing the quarantined message will be (in this example): /var/spool/MailScanner/quarantine/20050309/6BC5E368497.3C3A6. In this directory, you should see the original queue file, named as a 10 digit hex number matching the name of the directory. There should also be copies of any attachments that may have been picked up by the virus scanning engine or file filtering. </p>
<p>B: If it’s a quarantined spam </p>
<pre>&quot;Your system administrators will need the following information:
Server name: &lt;Your Server&gt;
Message id: 46EE0E18151.CE630
Date code: 20080509&quot;</pre>
<p>MailScanner keeps all spam on a given day in the same directory, thus the directory containing the quarantined message will be (in this example): /var/spool/MailScanner/quarantine/20080509/spam. </p>
<p>If you want to check the original message use: </p>
<pre># postcat &lt;filename&gt;</pre>
<p>Releasing an email from quarantine is a simple matter of replacing the queue file back into the Postfix queue, so that it gets sent. The permissions on the file are wrong, however and must be changed. </p>
<pre># chmod 700 &lt;filename&gt;</pre>
<p>The file must now be moved into /var/spool/postfix/incoming. There may be 16 directories in there (Collectively referred to as ‘hashed queue files’) each corresponding to a hexadecimal digit, depending which version of Postfix you are running. First check if you have hashed queue files by: </p>
<pre># ls /var/spool/postfix/incoming</pre>
<p>If no directories are listed then follow the instructions below but do not add the trailing letter/ number. </p>
<p>The file must be placed in the directory which corresponds to the first digit of the filename. So in the example above, it must go into /var/spool/postfix/incoming/6. We must also be sure to preserve the ownership and permissions of the file when moving it, so we use “cp -p”. If the message is a spam, we must also remove the trailing 6 characters. </p>
<p>Thus for the example above: </p>
<pre># cp –p 6BC5E368497 /var/spool/postfix/incoming/6</pre>
<p>or for the example quarantined spam </p>
<pre># cp –p 46EE0E18151.CE630 /var/spool/postfix/incoming/4/46EE0E18151</pre>
<p>The email will disappear from the queue and be delivered. </p>
<p>Thanks to Joshua Hirsh for the details and Stef Morrell for writing the document </p>
<h3><a name="releasing_mail_from_the_quarantine_-_with_a_bash_script">Releasing mail from the quarantine &#8211; with a bash script</a></h3>
<p>Maybe it’s too circuitous for you to do all the steps in the section above to release a mail. For this I wrote a tiny script to release very easily. To use this script you should set the MailScanner environment identically to the article above. </p>
<p>To use this script copy it to a file and make it executable. </p>
<p>The Syntax: release.sh &lt;Message-ID&gt; (e.g. release.sh 5B604228086.932F0) </p>
<pre>#!/bin/sh

if [ -z &quot;$1&quot; ]; then
        echo &quot;Syntax: release.sh &lt;Message-ID&gt; i.e. 5B604228086.932F0 (case sensitive)&quot;
        exit
fi

#change in the quarantine folder
folder=`find /var/spool/MailScanner/quarantine/ -name $1`
cd $folder

#set the mailfile executable
mailname=`echo $1 | cut -d . -f 1`
chmod u+x $mailname

#lets get the first character
char=`echo $1 | cut -b 1-1`

#copy the mail
cp -a $mailname /var/spool/postfix/incoming/$char/

echo Mail $mailname released</pre>
<h3><a name="releasing_mail_from_the_quarantine_-_message_files">Releasing mail from the quarantine &#8211; message files</a></h3>
<p>If you don’t quarantine the complete queue file, but instead have the rfc822 message file, releasing messages are actually a bit simpler (for postfix) than the above, since you can use the postfix <code>sendmail</code> convenience program. </p>
<p>In MailScanner.conf you have </p>
<pre>Quarantine Whole Messages As Queue Files = no </pre>
<p>and in the quarantine directory you have a file called message (this is the complete human-readible message, but without the envelope info). Just do </p>
<pre>cd /path/to/quarantine/dir
sendmail -t -i &lt; message</pre>
<p>to send the message to the recipient(s) as found in the message file, or </p>
<pre>cd /path/to/quarantine/dir
sendmail -i alternate_recipient@example.net &lt; message</pre>
<p>to send the message to an alternate recipient (of course you can combine them). The <code>-i</code> option is to avoid terminating the message prematurely on a spurious single “.” on a line in the message file. </p>
<p>If you use <a href="http://wiki.mailscanner.info/doku.php?id=documentation:related_software:management:mailwatch:description">MailWatch</a>, this can also release the message iff you don’t quarantine the whole message file as the queue file, although this uses a different method to release messages from the <acronym>GUI</acronym>. </p>
<h3><a name="releasing_mail_from_the_quarantine_-_queue_files_postfix_again">Releasing mail from the quarantine &#8211; queue files postfix (again)</a></h3>
<p>In a larger environment with many hosts and thousands of quarantined emails per day, we’ve found it impractical to reply to each email released or deleted from a queue, and simply process it without fanfare. The code below is modified from the release.sh above to accomodate moving the released mail back into postfix using the original mail ID. In addition, our postfix install required us to rename the queue file to its shortname, that is, the 10 or 11 character filename before postfix would accept the email into the queue. </p>
<p>The Syntax: release.sh &lt;Message-ID&gt; (e.g. release.sh 5B604228086.932F0) </p>
<pre>#!/bin/sh

if [ -z &quot;$1&quot; ]; then
        echo &quot;Syntax: release.sh &lt;Message-ID&gt; i.e. 5B604228086.932F0 (case sensitive)&quot;
        exit
fi

#change in the quarantine folder
folder=`find /var/spool/MailScanner/quarantine/ -name $1 | sed -e &quot;s/$1//g&quot;`
cd $folder

#set the mailfile executable
mailname=`echo $1 | cut -d . -f1`
chmod u+x $1

#lets get the first character
char=`echo $1 | cut -b 1-1`

#copy the mail
cp -a $1 /var/spool/postfix/incoming/$char/$mailname</pre>
<p>The following is for recent postfixes (2.3, 2.4) which seem to have a flat incoming directory: </p>
<pre>#!/bin/sh

# this is the final destination for the mail to be released:
# postfix's incoming queue
POSTFIX_DEST=/var/spool/postfix/incoming

# check for valid parameters
if [ -z &quot;$1&quot; ]; then
        echo &quot;Syntax: release.sh &lt;Message-ID&gt;&quot;
        echo &quot;Example: release.sh 678362AC.9CFE7&quot;
        exit
fi

# find the specific mail in the quarantine folders
folder=`find /var/spool/MailScanner/quarantine/ -name $1`

mailname=`echo $1 | cut -d . -f1`

# copy the mail
if [ -e $POSTFIX_DEST/$mailname ] ; then
        echo &quot;ERROR: $mailname already in $POSTFIX_DEST! EXITING&quot;
        echo &quot;This should not happen&quot;
        exit 255
fi

cp -avi &quot;$folder/$mailname&quot; &quot;$POSTFIX_DEST/$mailname&quot;

# make it 0700 so that the mail is deemed ready
chmod 0700 $POSTFIX_DEST/$mailname</pre>
<h3><a name="releasing_mail_from_the_quarantine_-_the_one_liner">Releasing mail from the quarantine &#8211; the one liner</a></h3>
<p>sudo install -m 0700 -o postfix &lt;source message&gt; /var/spool/postfix/incoming </p>
<h3><a name="releasing_mail_from_the_quarantine_-_alias_with_intelligence">Releasing mail from the quarantine &#8211; alias with intelligence</a></h3>
<pre>integrate() {
  # integration: antonym of quarantine
  # Pass the message ID as obtained from user's email as $1
  DEST=$(postconf queue_directory | cut -d= -f2)/incoming
  SOURCE=$(find /var/spool/MailScanner/quarantine -name &quot;$1&quot;)
  install --verbose --mode=0700 --owner=postfix $SOURCE $DEST
}</pre>
<h3><a name="updated_bash_script">Updated bash script</a></h3>
<p>Line 9 on initial bash script returned filename with full path and not folder, as expected. Instructions at the top also used the cp -p option, and not -a. Instead of cd’ing to quarantine folder, this will do the copy and preserve permissions. </p>
<pre>#!/bin/sh

if [ -z &quot;$1&quot; ]; then
        echo &quot;Syntax: release.sh &lt;Message-ID&gt; i.e. 5B604228086.932F0 (case sensitive)&quot;
        exit
fi

#find the quarantined file and set permissions
quarantined_file=`find /var/spool/MailScanner/quarantine/ -name $1`
chmod u+x $quarantined_file

#truncate the filename
mailname=`echo $1 | cut -d . -f 1`

#lets get the first character
char=`echo $1 | cut -b 1-1`

#copy the mail, destination is the truncated filename
cp -p $quarantined_file /var/spool/postfix/incoming/$char/$mailname

echo Mail $mailname released</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2011/03/01/mailscanner%e5%8f%96%e5%9b%9e%e9%9a%94%e9%9b%a2%e5%8d%80%e7%9a%84%e4%bf%a1-releasing-mail-from-the-quarantine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用Mailscanner 的 Archive Mail 備份郵件</title>
		<link>http://blog.infinity.idv.tw/index.php/2010/11/04/%e4%bd%bf%e7%94%a8mailscanner-%e7%9a%84-archive-mail-%e5%82%99%e4%bb%bd%e9%83%b5%e4%bb%b6/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2010/11/04/%e4%bd%bf%e7%94%a8mailscanner-%e7%9a%84-archive-mail-%e5%82%99%e4%bb%bd%e9%83%b5%e4%bb%b6/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 01:45:16 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MailScanner]]></category>
		<category><![CDATA[Archive Mailscanner]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2010/11/04/%e4%bd%bf%e7%94%a8mailscanner-%e7%9a%84-archive-mail-%e5%82%99%e4%bb%bd%e9%83%b5%e4%bb%b6/</guid>
		<description><![CDATA[<p>最近MAIL常出現主旨為 : Problem Messages</p>
<p>內容為:</p>
<p>Archive:   Number of messages: 5    Tries Message Last Tried    ===== ======= ==========    6 3553C24D80D2.A0925 Sat Oct 30 04:57:38 2010    6 10ED024D80EC.AC79E Sat Oct 30 04:56:25 2010    6 2FF5D24D80D7.AD62C Sat Oct 30 04:53:05 2010   [...]]]></description>
			<content:encoded><![CDATA[<p>最近MAIL常出現主旨為 : Problem Messages</p>
<p>內容為:</p>
<p>Archive:   <br />Number of messages: 5    <br />Tries Message Last Tried    <br />===== ======= ==========    <br />6 3553C24D80D2.A0925 Sat Oct 30 04:57:38 2010    <br />6 10ED024D80EC.AC79E Sat Oct 30 04:56:25 2010    <br />6 2FF5D24D80D7.AD62C Sat Oct 30 04:53:05 2010    <br />6 DC7FD24D80BD.AC95D Sat Oct 30 04:43:07 2010    <br />6 73A4D24D80C2.A16DF Sat Oct 30 04:42:41 2010</p>
<p>找著找著找到了Mailscanner 的 Archive 用法</p>
<p>文章出處:<a title="http://i-yow.blogspot.com/2009/07/archive-mailby-mailscanner.html" href="http://i-yow.blogspot.com/2009/07/archive-mailby-mailscanner.html">http://i-yow.blogspot.com/2009/07/archive-mailby-mailscanner.html</a></p>
<p>=====================================================</p>
<p>邪惡的Archive Mail備份郵件(By MailScanner)   <br />MailScanner有一個邪惡又好用的功能：『Archive Mail』    <br />這個比Forward還要厲害的功能，當你想要存留(備份)用戶收、發的信件時，用這就就對了~ </p>
<p>1.啟動Archive功能   <br />vim /etc/MailScanner/MailScanner.conf    <br />Archive Mail = /etc/MailScanner/archive.rule </p>
<p>2.編輯Archive規則   <br />vim /etc/MailScanner/archive.rule    <br />基本規則如下：    <br />FromOrTo: User@mail.com* yes forward Admin@mail.com.tw    <br />(收件者或寄件者) (關鍵字，可配合萬用字元) (yes，啟用規則) (forward，動作) (Forward的目標) </p>
<p>※Archive Mail不但可以過濾到本機網域的帳號，也可以以外部帳號作為關鍵字，只要有經過MailScanner掃描的都可以做處理。   <br />※以上只是簡單的例子，Archive Mail還有許多變化跟應用</p>
<p>======================================================</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2010/11/04/%e4%bd%bf%e7%94%a8mailscanner-%e7%9a%84-archive-mail-%e5%82%99%e4%bb%bd%e9%83%b5%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Large Mailbox threshold 40MB之Syslog警訊</title>
		<link>http://blog.infinity.idv.tw/index.php/2010/10/28/large-mailbox-threshold-40mb%e4%b9%8bsyslog%e8%ad%a6%e8%a8%8a/</link>
		<comments>http://blog.infinity.idv.tw/index.php/2010/10/28/large-mailbox-threshold-40mb%e4%b9%8bsyslog%e8%ad%a6%e8%a8%8a/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 02:29:00 +0000</pubDate>
		<dc:creator>Roger Lin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[未分類系統設定]]></category>
		<category><![CDATA[Large Mailbox threshold Warning Large mailbox]]></category>

		<guid isPermaLink="false">http://blog.infinity.idv.tw/index.php/2010/10/28/large-mailbox-threshold-40mb%e4%b9%8bsyslog%e8%ad%a6%e8%a8%8a/</guid>
		<description><![CDATA[<p>發現Syslog只要信箱超過40MB都會出現警訊:</p>
<p> Large Mailbox threshold: 40MB (41943040 bytes)   &#160; Warning: Large mailbox: teresa.wu (1151343331)    &#160; Warning: Large mailbox: karen.wang (489717393)</p>
<p>GOOGLE了一下知道怎麼改這個設定:</p>
<p>在 [root@mail ~]# vi /usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf中 &#60;==CentOS 5.5內位置有變動</p>
  # Mailbox size threshold

#   can add units KB, MB, GB, TB

#   can set to 0 to report spool files being [...]]]></description>
			<content:encoded><![CDATA[<p>發現Syslog只要信箱超過40MB都會出現警訊:</p>
<p> Large Mailbox threshold: 40MB (41943040 bytes)   <br />&#160; Warning: Large mailbox: teresa.wu (1151343331)    <br />&#160; Warning: Large mailbox: karen.wang (489717393)</p>
<p>GOOGLE了一下知道怎麼改這個設定:</p>
<p>在 [root@mail ~]# vi /usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf中 &lt;==CentOS 5.5內位置有變動</p>
<pre>  # Mailbox size threshold

#   can add units KB, MB, GB, TB

#   can set to 0 to report spool files being created where they shouldn't

sendmail_largeboxes_size = 40MB

#   改為希望的大小就可以了。</pre>
<p>&#160;</p>
<p>文章出處:<a href="http://linuxdiary.blogspot.com/2008/10/logwatch.html">http://linuxdiary.blogspot.com/2008/10/logwatch.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.infinity.idv.tw/index.php/2010/10/28/large-mailbox-threshold-40mb%e4%b9%8bsyslog%e8%ad%a6%e8%a8%8a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

