<?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>榆树网 &#187; 榆树网-杂项</title>
	<atom:link href="http://www.wenzk.com/archives/category/misc/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wenzk.com</link>
	<description>http://www.wenzk.com</description>
	<lastBuildDate>Thu, 09 Feb 2012 07:57:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Firefox扩展：Wappalyzer</title>
		<link>http://www.wenzk.com/archives/1519</link>
		<comments>http://www.wenzk.com/archives/1519#comments</comments>
		<pubDate>Thu, 09 Feb 2012 07:57:28 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[扩展]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1519</guid>
		<description><![CDATA[以前安装过，重装系统忘记名称了，没想到Chrome下类似的扩展Chrome sniffer比它名气大多了。 可以帮助开发者检查网页正在使用的CMS框架和javascript库的情况，在检测到框架时，地址栏会出现一个图标。 相关文章将Firefox更新至3.6 Beta 3 (0)如何让你的Chrome支持插件？ (0)Chrome也支持插件了 (0)Firefox 7.0已经在beta更新通道推送了 (0)Firefox的Hostname in Titlebar与Nightly Tester Tools冲突 (0)]]></description>
			<content:encoded><![CDATA[<p>以前安装过，重装系统忘记名称了，没想到Chrome下类似的扩展Chrome sniffer比它名气大多了。<br />
可以帮助开发者检查网页正在使用的CMS框架和javascript库的情况，在检测到框架时，地址栏会出现一个图标。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/450" title="将Firefox更新至3.6 Beta 3">将Firefox更新至3.6 Beta 3</a> (0)</li><li><a href="http://www.wenzk.com/archives/301" title="如何让你的Chrome支持插件？">如何让你的Chrome支持插件？</a> (0)</li><li><a href="http://www.wenzk.com/archives/298" title="Chrome也支持插件了">Chrome也支持插件了</a> (0)</li><li><a href="http://www.wenzk.com/archives/1308" title="Firefox 7.0已经在beta更新通道推送了">Firefox 7.0已经在beta更新通道推送了</a> (0)</li><li><a href="http://www.wenzk.com/archives/1154" title="Firefox的Hostname in Titlebar与Nightly Tester Tools冲突">Firefox的Hostname in Titlebar与Nightly Tester Tools冲突</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1519/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>将 Zimbra Desktop 设为默认电子邮件程序</title>
		<link>http://www.wenzk.com/archives/1509</link>
		<comments>http://www.wenzk.com/archives/1509#comments</comments>
		<pubDate>Sun, 29 Jan 2012 15:03:13 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[Zimbra]]></category>
		<category><![CDATA[Zimbra Desktop]]></category>
		<category><![CDATA[电子邮件]]></category>
		<category><![CDATA[默认电子邮件]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1509</guid>
		<description><![CDATA[在浏览器或其他应用程序中，当您单击一个电子邮件链接时，打开的是计算机上默认的电子邮件程序。 您可将 Zimbra Desktop 设为主要的应用程序。当在其他程序中单击电子邮件链接时，Zimbra Desktop 中的默认帐户的写信窗口随即打开。 要设置默认电子邮件程序： 1、选择首选项-常规。 2、在其他部分中，对于系统默认值，勾选将 Zimbra Desktop 设为默认的邮件应用程序复选框。 3、重启Zimbra Desktop程序。 相关文章OutLook如何使用Zimbra LDAP提供的地址簿 (0)zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED (0)为什么不能用Outlook、Foxmail收取Zimbra的邮件 (0)Zimbra如何支持SPF、DCC及Razor (0)Zimbra如何启用DSPAM (0)]]></description>
			<content:encoded><![CDATA[<p>在浏览器或其他应用程序中，当您单击一个电子邮件链接时，打开的是计算机上默认的电子邮件程序。<br />
您可将 Zimbra Desktop 设为主要的应用程序。当在其他程序中单击电子邮件链接时，Zimbra Desktop 中的默认帐户的写信窗口随即打开。<br />
要设置默认电子邮件程序：<br />
    1、选择<strong>首选项</strong>-<strong>常规</strong>。<br />
    2、在<strong>其他</strong>部分中，对于<strong>系统默认值</strong>，勾选<strong>将 Zimbra Desktop 设为默认的邮件应用程序</strong>复选框。<br />
    3、重启Zimbra Desktop程序。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1407" title="OutLook如何使用Zimbra LDAP提供的地址簿">OutLook如何使用Zimbra LDAP提供的地址簿</a> (0)</li><li><a href="http://www.wenzk.com/archives/1501" title="zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED">zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED</a> (0)</li><li><a href="http://www.wenzk.com/archives/1477" title="为什么不能用Outlook、Foxmail收取Zimbra的邮件">为什么不能用Outlook、Foxmail收取Zimbra的邮件</a> (0)</li><li><a href="http://www.wenzk.com/archives/1451" title="Zimbra如何支持SPF、DCC及Razor">Zimbra如何支持SPF、DCC及Razor</a> (0)</li><li><a href="http://www.wenzk.com/archives/1449" title="Zimbra如何启用DSPAM">Zimbra如何启用DSPAM</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1509/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决smbclient与Windows 7之间的共享问题</title>
		<link>http://www.wenzk.com/archives/1506</link>
		<comments>http://www.wenzk.com/archives/1506#comments</comments>
		<pubDate>Fri, 20 Jan 2012 16:09:26 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[smbclient]]></category>
		<category><![CDATA[Win7]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[共享]]></category>
		<category><![CDATA[网上邻居]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1506</guid>
		<description><![CDATA[由于备份数据的需求，所以需要通过使用smbclient访问win7，起初只是遇到无法访问 C$ 一类共享问题，可以通过： 如何使windows7的默认共享可以被访问 来解决，使用windows也不是每次都那么幸运。 今天在处理smbclient与win7共享问题的时候，却遇到了一个更头疼的问题，却总是提示“session setup failed: SUCCESS &#8211; 0”，试过了很多办法，都是google的，但是仍然未成功，最终还是通过 [ubuntu] Sharing Files and Folders with Windows 7 文中多人提到卸载“windows live sign-in assistant”后就正常了，于是我也卸载了Windows Live相关的程序，果真成功了。 之前还做了一些操作，不知道对成功是否有影响，如果卸载后仍然不好使，尝试修改这些注册表。 之后还参考了这个 做完这些操作后，删除windows live sign-in assistant就可以访问了。 相关文章如何使windows7的默认共享可以被访问[转载] (0)IOBlazer-跨平台的IO压力测试程序 (0)Windows下循环启动VLC的脚本 (0)Windows下VLC状态检查脚本 (0)让Windows XP自动登录的两种方法 (0)]]></description>
			<content:encoded><![CDATA[<p>由于备份数据的需求，所以需要通过使用smbclient访问win7，起初只是遇到无法访问 C$ 一类共享问题，可以通过： <a href="http://www.wenzk.com/archives/1131" target="_blank">如何使windows7的默认共享可以被访问</a> 来解决，使用windows也不是每次都那么幸运。<br />
<span id="more-1506"></span><br />
今天在处理smbclient与win7共享问题的时候，却遇到了一个更头疼的问题，却总是提示“session setup failed: SUCCESS &#8211; 0”，试过了很多办法，都是google的，但是仍然未成功，最终还是通过 <a href="http://ubuntuforums.org/archive/index.php/t-1273419.html" target="_blank">[ubuntu] Sharing Files and Folders with Windows 7</a> 文中多人提到卸载“windows live sign-in assistant”后就正常了，于是我也卸载了Windows Live相关的程序，果真成功了。</p>
<p>之前还做了一些操作，不知道对成功是否有影响，如果卸载后仍然不好使，尝试修改这些注册表。</p>
<pre class="brush: plain; title: ; notranslate">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
&quot;LmCompatibilityLevel&quot;=dword:1         -allow older Lan manager style messages
&quot;NoLmHash&quot;=dword:0                       -store the older, less secure Lan Manager encrypted password

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Netlogon\Parameters
&quot;AllowNT4Crypto&quot;=dword:1                -allow less secure encrypted passwords (intermediate keys must be created)

HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
&quot;RequireSecuritySignature&quot;=dword:0   -don't require new message signatures
This value may have already existed, I don't remember</pre>
<p>之后还参考了这个</p>
<pre class="brush: plain; title: ; notranslate">1) in hklm\system\currentcontrolset\control\lsa, created LmCompatibilityLevel = dword &quot;1&quot;, changed NoLmHash from &quot;0&quot; to &quot;1&quot;
2) in hklm\software\policies\microsoft created key netlogon
    in hklm\software\policies\microsoft\netlogon created key Paramaters
    in hklm\software\policies\microsoft\netlogon\paramaters created AllowNT4Crypto = dword &quot;1&quot;
3) in hklm\system\currentcontrolset\services\netlogon\paramaters created AllowNT4Crypto = dword &quot;1&quot;
4) in hklm\system\currentcontrolset\services\lanmanserver\paramaters requiresecuritysignature was already = dword &quot;0&quot;</pre>
<p>做完这些操作后，删除windows live sign-in assistant就可以访问了。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1131" title="如何使windows7的默认共享可以被访问[转载]">如何使windows7的默认共享可以被访问[转载]</a> (0)</li><li><a href="http://www.wenzk.com/archives/1443" title="IOBlazer-跨平台的IO压力测试程序">IOBlazer-跨平台的IO压力测试程序</a> (0)</li><li><a href="http://www.wenzk.com/archives/940" title="Windows下循环启动VLC的脚本">Windows下循环启动VLC的脚本</a> (0)</li><li><a href="http://www.wenzk.com/archives/938" title="Windows下VLC状态检查脚本">Windows下VLC状态检查脚本</a> (0)</li><li><a href="http://www.wenzk.com/archives/891" title="让Windows XP自动登录的两种方法">让Windows XP自动登录的两种方法</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1506/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED</title>
		<link>http://www.wenzk.com/archives/1501</link>
		<comments>http://www.wenzk.com/archives/1501#comments</comments>
		<pubDate>Mon, 16 Jan 2012 05:14:47 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[Maildir]]></category>
		<category><![CDATA[Zimbra]]></category>
		<category><![CDATA[导入邮件]]></category>
		<category><![CDATA[迁移]]></category>
		<category><![CDATA[邮件]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1501</guid>
		<description><![CDATA[解决办法： 相关文章如何将Maildir邮件导入到Zimbra中 (0)如何让Zimbra支持https (0)Zimbra如何启用IM插件 (0)将 Zimbra Desktop 设为默认电子邮件程序 (0)为什么不能用Outlook、Foxmail收取Zimbra的邮件 (0)]]></description>
			<content:encoded><![CDATA[<p>解决办法：</p>
<pre class="brush: plain; title: ; notranslate">su - zimbra
 zmprov gacf | grep zimbraFileUploadMaxSize
 zmprov gacf | grep zimbraMtaMaxMessageSize

 zmprov mcf zimbraFileUploadMaxSize xxxxxxxx
 zmprov mcf zimbraMtaMaxMessageSize xxxxxxx</pre>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1398" title="如何将Maildir邮件导入到Zimbra中">如何将Maildir邮件导入到Zimbra中</a> (0)</li><li><a href="http://www.wenzk.com/archives/1185" title="如何让Zimbra支持https">如何让Zimbra支持https</a> (0)</li><li><a href="http://www.wenzk.com/archives/1182" title="Zimbra如何启用IM插件">Zimbra如何启用IM插件</a> (0)</li><li><a href="http://www.wenzk.com/archives/1509" title="将 Zimbra Desktop 设为默认电子邮件程序">将 Zimbra Desktop 设为默认电子邮件程序</a> (0)</li><li><a href="http://www.wenzk.com/archives/1477" title="为什么不能用Outlook、Foxmail收取Zimbra的邮件">为什么不能用Outlook、Foxmail收取Zimbra的邮件</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1501/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weathermap如何使用Zabbix作为数据源</title>
		<link>http://www.wenzk.com/archives/1499</link>
		<comments>http://www.wenzk.com/archives/1499#comments</comments>
		<pubDate>Fri, 13 Jan 2012 01:08:37 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[榆树网-网络]]></category>
		<category><![CDATA[Cacti]]></category>
		<category><![CDATA[MRTG]]></category>
		<category><![CDATA[RRD]]></category>
		<category><![CDATA[RRDtools]]></category>
		<category><![CDATA[WeatherMap]]></category>
		<category><![CDATA[zabbix]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1499</guid>
		<description><![CDATA[I&#8217;ve started playing around with it and after some tinkering, I have a working weathermap. This adds an excellent visualization tool to ZABBIX, especially for complex networks. A very quick HOWTO: 1) Install php-weathermap somewhere. 2) Read the fine manual 3) Create a weathermap of the hosts you want to monitor. 4) Configure WeatherMapDataSource_zabbix.php (and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started playing around with it and after some tinkering, I have a working weathermap. This adds an excellent visualization tool to ZABBIX, especially for complex networks.</p>
<p>A very quick HOWTO:<span id="more-1499"></span></p>
<p>1) Install php-weathermap somewhere.<br />
2) Read the fine manual<br />
3) Create a weathermap of the hosts you want to monitor.<br />
4) Configure WeatherMapDataSource_zabbix.php (and put it in the right place at weathermap/lib/datasources &#8211; not in the ZABBIX directory).<br />
5) To get the id&#8217;s of the Items to put in the map, I&#8217;ve named all my traffic Items “Traffic&#8230;” so I ran the following MySQL query:</p>
<p>SELECT * FROM items i where description LIKE &#8216;Traffic%&#8217;;</p>
<p>this gets me the itemid I need to put into the weathermap configuration file. Note that I got error messages around lines 44 and 45 of the php file because my root MySQL user has a password. I guess these are for debugging purposes. I&#8217;ve also hardcoded the host, username and password of the database at around line 52 and hardcoded the datbase name at line 54. The variables didn&#8217;t seem to work. Also note that the Items must be Integers or the script won&#8217;t work.</p>
<p>6) Create the weathermap using “php ./weathermap &#8211;config mymap.conf”<br />
7) Enjoy<br />
8) If you want your map to auto-update itself, create a cron job or a Windows Scheduled Task to run the command at step 6)</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// Zabbix Pluggable datasource for PHP Weathermap 0.9
// - read a pair of values from a database, and return it
// Actually the plugin look only in history_uint table
// TARGET zabbix:in:out

class WeatherMapDataSource_zabbix extends WeatherMapDataSource {

        function Init(&amp;$map)
        {
                if(! function_exists(&quot;mysql_real_escape_string&quot;) ) return FALSE;
                if(! function_exists(&quot;mysql_connect&quot;) ) return FALSE;

                return(TRUE);
        }

        function Recognise($targetstring)
        {

         if(preg_match(&quot;/^zabbix:([\-a-zA-Z0-9_]+):([\-a-zA-Z0-9_]+)$/&quot;,$targetstring,$matches))

                {
                        return TRUE;
                }
                else
                {
                        return FALSE;
                }
        }

        function ReadData($targetstring, &amp;$map, &amp;$item)
        {
                $data[IN] = NULL;
                $data[OUT] = NULL;
                $data_time = 0;

                if(preg_match(&quot;/^zabbix:([\-a-zA-Z0-9_]+):([\-a-zA-Z0-9_]+)$/&quot;,$targetstring,$matches))
                {
                        $database_user = $map-&gt;get_hint('zabbix_dbuser');
                        $database_pass = $map-&gt;get_hint('zabbix_dbpass');
                        $database_name = $map-&gt;get_hint('zabbix_dbname');
                        $database_host = $map-&gt;get_hint('zabbix_dbhost');

                        $raw_in = mysql_real_escape_string($matches[1]);
                        $raw_out= mysql_real_escape_string($matches[2]);

                        debug (&quot;Found for IN Value :  $raw_in \n&quot;);
                        debug (&quot;Found for OUT Value :  $raw_out \n&quot;);

                        $SQL_IN = &quot;select value from history_uint where itemid=$raw_in order by clock desc limit 1&quot;;
                        $SQL_OUT = &quot;select value,clock from history_uint where itemid=$raw_out order by clock desc limit 1&quot;;
                        if(mysql_connect($database_host,$database_user,$database_pass))
                        {
                                if(mysql_select_db($database_name))
                                {
                                        $result_IN = mysql_query($SQL_IN);
                                        if (!$result_IN)
                                        {
                                            warn(&quot;Zabbix ReadData: Invalid query for IN Value: &quot; . mysql_error().&quot;\n&quot;);
                                        }
                                        else
                                        {
                                                $row_IN = mysql_fetch_assoc($result_IN);
                                                $data[IN] = $row_IN['value'];
                                        }
                                        $result_OUT = mysql_query($SQL_OUT);
                                        if (!$result_OUT)
                                        {
                                            warn(&quot;Zabbix ReadData: Invalid query for OUT Value: &quot; . mysql_error().&quot;\n&quot;);
                                        }
                                        else
                                        {
                                                $row_OUT = mysql_fetch_assoc($result_OUT);
                                                $data[OUT] = $row_OUT['value'];
                                                $data_time = $row_OUT['clock'];
                                        }

                                }

                                else
                                {
                                        warn(&quot;Zabbix ReadData: failed to select database ($database_name): &quot;.mysql_error().&quot;\n&quot;);
                                }
                        }
                        else
                        {
                                warn(&quot;Zabbix ReadData: failed to connect to database server: &quot;.mysql_error().&quot;\n&quot;);
                        }

                //      $data_time = now();
                }

                debug (&quot;RRD ReadData: Returning (&quot;.($data[IN]===NULL?'NULL':$data[IN]).&quot;,&quot;.($data[OUT]===NULL?'NULL':$data[IN]).&quot;,$data_time)\n&quot;);

                return( array($data[IN], $data[OUT], $data_time) );
        }
}
?&gt;</pre>
<p>转自: http://www.zabbix.com/forum/showthread.php?t=9873</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1516" title="新安装Cacti遇到的几个问题">新安装Cacti遇到的几个问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/880" title="Zabbix Agentd在Windows下如何获得网卡流量">Zabbix Agentd在Windows下如何获得网卡流量</a> (0)</li><li><a href="http://www.wenzk.com/archives/586" title="FreeBSD下运行Zabbix出现错误">FreeBSD下运行Zabbix出现错误</a> (0)</li><li><a href="http://www.wenzk.com/archives/494" title="Zabbix在FreeBSD启动错误">Zabbix在FreeBSD启动错误</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1499/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个能“记忆”上次读取位置的cat程序</title>
		<link>http://www.wenzk.com/archives/1489</link>
		<comments>http://www.wenzk.com/archives/1489#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:24:47 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[readline]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1489</guid>
		<description><![CDATA[这是用python写的第一个程序，每句话都是查手册写出来的，呵呵。 大家拍砖吧。 随机文章如何让你的Chrome支持插件？ (0)CMS主题使用方法 (0)Android(安卓)系统如何修改默认打开程序 (0)自动下载CERNET免费IP地址列表脚本 (0)SSH黑名单自动更新脚本-sshbl.org (1)]]></description>
			<content:encoded><![CDATA[<p>这是用python写的第一个程序，每句话都是查手册写出来的，呵呵。<br />
大家拍砖吧。</p>
<pre class="brush: python; title: ; notranslate">
#!/bin/env python

import os
import sys

if os.path.isfile(&quot;/tmp/workfile&quot;):
   f = open('/tmp/workfile', 'r')
   size = int(os.fstat(f.fileno())[6])
else:
   sys.exit()

if os.path.isfile(&quot;/tmp/workfile.s&quot;):
   s = open('/tmp/workfile.s', 'r+')
   if int(os.fstat(s.fileno())[6]) == 0 :
      last_stats = 0
   else:
      last_stats = int(s.readline())
else:
   s = open('/tmp/workfile.s', 'w')
   last_stats = 0

if size &lt; last_stats :
   last_stats = 0

f.seek(last_stats)

notend = 1
while notend :
  string = f.readline()
  if len(string) == 0 :
     notend = 0
  else:
     string = string.strip(' \t\n\r')
     print string

s.seek(0)
s.write( str( f.tell() ) )

s.close()
f.close()
sys.exit()
</pre>
<h2  class="related_post_title">随机文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1477" title="为什么不能用Outlook、Foxmail收取Zimbra的邮件">为什么不能用Outlook、Foxmail收取Zimbra的邮件</a> (0)</li><li><a href="http://www.wenzk.com/archives/873" title="ADSL改成小区宽带接入啦">ADSL改成小区宽带接入啦</a> (0)</li><li><a href="http://www.wenzk.com/archives/940" title="Windows下循环启动VLC的脚本">Windows下循环启动VLC的脚本</a> (0)</li><li><a href="http://www.wenzk.com/archives/1169" title="如何给Ipad安装shell cmds">如何给Ipad安装shell cmds</a> (1)</li><li><a href="http://www.wenzk.com/archives/1308" title="Firefox 7.0已经在beta更新通道推送了">Firefox 7.0已经在beta更新通道推送了</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1489/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Itunes降级IOS出现未知错误20</title>
		<link>http://www.wenzk.com/archives/1472</link>
		<comments>http://www.wenzk.com/archives/1472#comments</comments>
		<pubDate>Sun, 30 Oct 2011 12:09:09 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂谈]]></category>
		<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[cydia]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[Itunes]]></category>
		<category><![CDATA[shsh]]></category>
		<category><![CDATA[降级]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1472</guid>
		<description><![CDATA[最近Ipad总是出现各种异常现象，据说IOS5支持自定义手势，于是将IOS升级到版本5，但是IOS5的手势用得不习惯，只好降级至4.3.3这个比较容易越狱的版本（不越狱不知道如何将Mutlti改成Multi）。 如果Cydia备份了系统的shsh，只需修改C:\windwos\system32\drivers\etc\hosts文件，增加 然后在Itunes里面按住“shift”点击“恢复”，验证通过后Itunes提示：未能恢复iPhone 发生未知错误（20）。 IPAD屏幕提示： 据说IOS软件的降级会导致这个错误，解决办法让设备进入DFU模式后再恢复。 具体操作方法： 1、关闭Itunes。 2、IPAD使用USB连接电脑 3、同时按住电源键+HOME键10秒（直到屏幕变黑），然后松开电源键，继续按住HOME键，再等待15秒。桌面右下角提示DFU模式驱动成功，但是屏幕始终是黑的！这时成功进入DFU模式. 4、打开Itunes，按住“shift”点击“恢复”，选择相应的IOS进行恢复即可。 相关文章如何给Ipad安装shell cmds (1)我也贴几张关于iPad的图片-平板电脑 (0)]]></description>
			<content:encoded><![CDATA[<p>最近Ipad总是出现各种异常现象，据说IOS5支持自定义手势，于是将IOS升级到版本5，但是IOS5的手势用得不习惯，只好降级至4.3.3这个比较容易越狱的版本（不越狱不知道如何将Mutlti改成Multi）。</p>
<p><span id="more-1472"></span>如果Cydia备份了系统的shsh，只需修改C:\windwos\system32\drivers\etc\hosts文件，增加</p>
<pre class="brush: plain; title: ; notranslate">74.208.10.249 gs.apple.com
74.208.105.171 gs.apple.com</pre>
<p>然后在Itunes里面按住“shift”点击“恢复”，验证通过后Itunes提示：未能恢复iPhone 发生未知错误（20）。</p>
<p>IPAD屏幕提示：</p>
<p><a href="http://www.wenzk.com/wp-content/uploads/2011/10/itunes-connect.png" class="highslide-image" onclick="return hs.expand(this);"><img class="alignnone size-full wp-image-1473" title="itunes-connect" src="http://www.wenzk.com/wp-content/uploads/2011/10/itunes-connect.png" alt="" width="240" height="360" /></a></p>
<p>据说IOS软件的降级会导致这个错误，解决办法让设备进入DFU模式后再恢复。</p>
<p>具体操作方法：</p>
<p>1、关闭Itunes。</p>
<p>2、IPAD使用USB连接电脑</p>
<p>3、同时按住电源键+HOME键10秒（直到屏幕变黑），然后松开电源键，继续按住HOME键，再等待15秒。桌面右下角提示DFU模式驱动成功，但是屏幕始终是黑的！这时成功进入DFU模式.</p>
<p>4、打开Itunes，按住“shift”点击“恢复”，选择相应的IOS进行恢复即可。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1169" title="如何给Ipad安装shell cmds">如何给Ipad安装shell cmds</a> (1)</li><li><a href="http://www.wenzk.com/archives/578" title="我也贴几张关于iPad的图片-平板电脑">我也贴几张关于iPad的图片-平板电脑</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1472/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra如何支持SPF、DCC及Razor</title>
		<link>http://www.wenzk.com/archives/1451</link>
		<comments>http://www.wenzk.com/archives/1451#comments</comments>
		<pubDate>Tue, 18 Oct 2011 07:42:27 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[DCC]]></category>
		<category><![CDATA[Razor]]></category>
		<category><![CDATA[SpamAssassion]]></category>
		<category><![CDATA[SPF]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1451</guid>
		<description><![CDATA[用root用户执行： 修改/opt/zimbra/conf/spamassion/v310.pre文件： 去掉“loadplugin Mail::SpamAssassin::Plugin::DCC”前的注释。 切换到zimbra用户，重启SA服务： 注意，如果升级过Zimbra，需要重新确认v310.pre文件的内容。 相关文章Zimbra如何启用DSPAM (0)将 Zimbra Desktop 设为默认电子邮件程序 (0)zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED (0)为什么不能用Outlook、Foxmail收取Zimbra的邮件 (0)Zimbra管理员总是能收到MySQL检查出错的邮件 (0)]]></description>
			<content:encoded><![CDATA[<p>用root用户执行：</p>
<pre class="brush: plain; title: ; notranslate">wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh
rpm -ivh http://mirror.neu.edu.cn/dag/redhat/el6/en/x86_64/dag/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
yum install dcc pyzor razor-agents perl-Mail-SPF</pre>
<p>修改/opt/zimbra/conf/spamassion/v310.pre文件：<br />
去掉“loadplugin Mail::SpamAssassin::Plugin::DCC”前的注释。<br />
切换到zimbra用户，重启SA服务：</p>
<pre class="brush: plain; title: ; notranslate">su – zimbra
zmantispamctl reload</pre>
<p>注意，如果升级过Zimbra，需要重新确认v310.pre文件的内容。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1449" title="Zimbra如何启用DSPAM">Zimbra如何启用DSPAM</a> (0)</li><li><a href="http://www.wenzk.com/archives/1509" title="将 Zimbra Desktop 设为默认电子邮件程序">将 Zimbra Desktop 设为默认电子邮件程序</a> (0)</li><li><a href="http://www.wenzk.com/archives/1501" title="zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED">zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED</a> (0)</li><li><a href="http://www.wenzk.com/archives/1477" title="为什么不能用Outlook、Foxmail收取Zimbra的邮件">为什么不能用Outlook、Foxmail收取Zimbra的邮件</a> (0)</li><li><a href="http://www.wenzk.com/archives/1447" title="Zimbra管理员总是能收到MySQL检查出错的邮件">Zimbra管理员总是能收到MySQL检查出错的邮件</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1451/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra如何启用DSPAM</title>
		<link>http://www.wenzk.com/archives/1449</link>
		<comments>http://www.wenzk.com/archives/1449#comments</comments>
		<pubDate>Tue, 18 Oct 2011 07:40:36 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[DSPAM]]></category>
		<category><![CDATA[SPAM]]></category>
		<category><![CDATA[SpamAssassion]]></category>
		<category><![CDATA[Zimbra]]></category>
		<category><![CDATA[垃圾邮件]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1449</guid>
		<description><![CDATA[切换到到zimbra用户，执行以下命令： 但是，DSPAM是需要学习的，否则没效果，学习方法： 1、下载邮件样本：http://spamassassin.apache.org/publiccorpus/ 2、解压相关文件 3、用zimbra用户执行： 4、如果从系统邮件学习，直接运行zmtrainsa即可 5、查看学习状态 注意：如果升级Zimbra，需要重新配置。 相关文章Zimbra如何支持SPF、DCC及Razor (0)将 Zimbra Desktop 设为默认电子邮件程序 (0)zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED (0)为什么不能用Outlook、Foxmail收取Zimbra的邮件 (0)Zimbra管理员总是能收到MySQL检查出错的邮件 (0)]]></description>
			<content:encoded><![CDATA[<p>切换到到zimbra用户，执行以下命令：</p>
<pre class="brush: plain; title: ; notranslate">zmlocalconfig -e amavis_dspam_enabled=true
zmamavisdctl reload</pre>
<p>但是，DSPAM是需要学习的，否则没效果，学习方法：<br />
1、下载邮件样本：<a href="http://spamassassin.apache.org/publiccorpus/" target="_blank">http://spamassassin.apache.org/publiccorpus/</a><br />
2、解压相关文件<br />
3、用zimbra用户执行：</p>
<pre class="brush: plain; title: ; notranslate">/opt/zimbra/dspam/bin/dspam_train zimbra /path/to/spam_directory /path/to/ham_directory</pre>
<p>4、如果从系统邮件学习，直接运行zmtrainsa即可</p>
<pre class="brush: plain; title: ; notranslate">zmtrainsa</pre>
<p>5、查看学习状态</p>
<pre class="brush: plain; title: ; notranslate">/opt/zimbra/dspam/bin/dspam_stats -H</pre>
<p>注意：如果升级Zimbra，需要重新配置。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1451" title="Zimbra如何支持SPF、DCC及Razor">Zimbra如何支持SPF、DCC及Razor</a> (0)</li><li><a href="http://www.wenzk.com/archives/1509" title="将 Zimbra Desktop 设为默认电子邮件程序">将 Zimbra Desktop 设为默认电子邮件程序</a> (0)</li><li><a href="http://www.wenzk.com/archives/1501" title="zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED">zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED</a> (0)</li><li><a href="http://www.wenzk.com/archives/1477" title="为什么不能用Outlook、Foxmail收取Zimbra的邮件">为什么不能用Outlook、Foxmail收取Zimbra的邮件</a> (0)</li><li><a href="http://www.wenzk.com/archives/1447" title="Zimbra管理员总是能收到MySQL检查出错的邮件">Zimbra管理员总是能收到MySQL检查出错的邮件</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1449/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra管理员总是能收到MySQL检查出错的邮件</title>
		<link>http://www.wenzk.com/archives/1447</link>
		<comments>http://www.wenzk.com/archives/1447#comments</comments>
		<pubDate>Tue, 18 Oct 2011 07:38:59 +0000</pubDate>
		<dc:creator>ELM</dc:creator>
				<category><![CDATA[榆树网-杂项]]></category>
		<category><![CDATA[榆树网-系统]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lock]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ZCS]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.wenzk.com/?p=1447</guid>
		<description><![CDATA[邮件大概内容为： 通过修复工具会发现，没有任何数据表需要修复，因此，可以这么解决这个错误： 从上面可以看出，错误提示没有了。 相关文章Moving ZCS to Another Server (0)Zimbra-proxy配置步骤 (0)新安装Cacti遇到的几个问题 (0)将 Zimbra Desktop 设为默认电子邮件程序 (0)zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED (0)]]></description>
			<content:encoded><![CDATA[<p>邮件大概内容为：</p>
<pre class="brush: plain; title: ; notranslate">/opt/zimbra/mysql/bin/mysqlcheck --defaults-file=/opt/zimbra/conf/my.cnf -S /opt/zimbra/db/mysql.sock -A -C -s -u root --password=VGyGSVvw2mjCMWClWpcKwHjp1dj7W
mysql.general_log
Error    : You can't use locks with log tables.
mysql.slow_log
Error    : You can't use locks with log tables.</pre>
<p>通过修复工具会发现，没有任何数据表需要修复，因此，可以这么解决这个错误：</p>
<pre class="brush: plain; title: ; notranslate">[root@Zimbra-Mailbox-01 ~]# cd /opt/zimbra/db/data/mysql/
[root@Zimbra-Mailbox-01 mysql]# mv *log.frm /tmp/
[root@Zimbra-Mailbox-01 mysql]# /opt/zimbra/mysql/bin/mysqlcheck --defaults-file=/opt/zimbra/conf/my.cnf -S /opt/zimbra/db/mysql.sock -A -C -s -u root --password=VGyGSVvw2mjCMWClWpcKwHjp1dj7W</pre>
<p>从上面可以看出，错误提示没有了。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.wenzk.com/archives/1424" title="Moving ZCS to Another Server">Moving ZCS to Another Server</a> (0)</li><li><a href="http://www.wenzk.com/archives/1388" title="Zimbra-proxy配置步骤">Zimbra-proxy配置步骤</a> (0)</li><li><a href="http://www.wenzk.com/archives/1516" title="新安装Cacti遇到的几个问题">新安装Cacti遇到的几个问题</a> (0)</li><li><a href="http://www.wenzk.com/archives/1509" title="将 Zimbra Desktop 设为默认电子邮件程序">将 Zimbra Desktop 设为默认电子邮件程序</a> (0)</li><li><a href="http://www.wenzk.com/archives/1501" title="zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED">zmmailbox导入邮件提示：Code:zclient.UPLOAD_SIZE_LIMIT_EXCEEDED</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wenzk.com/archives/1447/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

