<?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>UNIXy &#187; Crash Course</title>
	<atom:link href="http://blog.unixy.net/category/crash-course/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.unixy.net</link>
	<description>Fully Managed Dedicated Servers</description>
	<lastBuildDate>Sun, 18 Dec 2011 07:23:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Litespeed and Varnish Plugin on a cPanel WHM server</title>
		<link>http://blog.unixy.net/2011/12/litespeed-and-varnish-plugin-on-a-cpanel-whm-server/</link>
		<comments>http://blog.unixy.net/2011/12/litespeed-and-varnish-plugin-on-a-cpanel-whm-server/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 07:14:36 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Crash Course]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[litespeed]]></category>
		<category><![CDATA[litespeed varnish]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[UNIXy]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=1499</guid>
		<description><![CDATA[In this post, I'm going to list the steps required to pair the cPanel Varnish Plugin with Litespeed on cPanel WHM servers. These few procedures apply to a blank cPanel installation (no Litespeed, no Varnish Plugin). The order below is important so don't skip!]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F12%2Flitespeed-and-varnish-plugin-on-a-cpanel-whm-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F12%2Flitespeed-and-varnish-plugin-on-a-cpanel-whm-server%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>&nbsp;</p>
<p><a title="Litespeed" href="http://www.unixy.net/apache-vs-litespeed">Litespeed</a> users on <a title="cPanel" href="http://www.unixy.net/varnish">cPanel</a> <a title="WHM" href="http://www.unixy.net/varnish">WHM</a> servers are realizing the benefits of running <a title="varnish" href="http://www.unixy.net/varnish">Varnish</a> Cache in front of <a title="Litespeed" href="http://www.unixy.net/varnish">Litespeed</a> to improve performance. While we (<a title="UNIXy" href="http://www.unixy.net">UNIXy</a>) don&#8217;t officially provide support to subscribers running the <a title="Varnish" href="http://www.unixy.net/varnish">cPanel Varnish Plugin</a> with <a title="Litespeed" href="http://www.unixy.net/varnish">Litespeed</a>, it does work with only a few extra manual steps. Keep in mind that we support this configuration for our <a title="Fully managed server" href="http://www.unixy.net">fully managed</a> <a title="VPS" href="http://www.unixy.net/vps-hosting">VPS</a>, <a title="dedicated server" href="http://www.unixy.net/dedicated-servers">dedicated server</a>, and cluster clients. If you are a current client and need this configured, please open a ticket request.</p>
<p>In this post, I&#8217;m going to list the steps required to pair the cPanel Varnish Plugin with <a title="Litespeed" href="http://www.unixy.net">Litespeed</a> on cPanel WHM <a title="servers" href="http://www.unixy.net/dedicated-servers">servers</a>. These few procedures apply to a blank cPanel installation (no Litespeed, no Varnish Plugin). The order below is important so don&#8217;t skip!</p>
<ul>
<li>1. Configure your Apache / PHP with the desired options and extentions. Let EasyApache finish the build.</li>
<li>2. Install Litespeed using the command line installer with the port offset at 2000 (default).</li>
<li>3. From WHM -&gt; Litespeed -&gt; Build Matching PHP binaries. Let the Litespeed builder complete before proceeding.</li>
<li>4. Proceed with installing the cPanel Varnish Plugin. Let it complete.</li>
<li>5. Set the Litespeed Port offset to zero in Admin Console.</li>
<li>6. In Admin Console, Configuration -&gt; Server -&gt; General Settings -&gt; Use Client IP in header -&gt; Yes. Restart Litespeed.</li>
</ul>
<p>&nbsp;</p>
<h2><strong>About UNIXY</strong></h2>
<p><a title="UNIXY" href="http://www.unixy.net/">UNIXY</a> is a long-time Varnish Cache user and evangelist. They have been offering Varnish acceleration to their clients for more than three years. They have released the first c<a title="cPanel Varnish" href="http://www.unixy.net/varnish">Panel Varnish plugin</a> as well as spun a new startup, <a title="Fastlayer" href="http://fastlayer.com/">Fastlayer</a>, the on-demand HTTP accelerator for the <a title="cloud" href="http://www.unixy,net/advanced-hosting">cloud</a>.</p>
<p>That&#8217;s all folks! I hope you find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2011/12/litespeed-and-varnish-plugin-on-a-cpanel-whm-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stable FastCGI configuration on a cPanel Apache shared or dedicated server</title>
		<link>http://blog.unixy.net/2011/12/stable-fastcgi-configuration-on-a-cpanel-apache-shared-or-dedicated-server/</link>
		<comments>http://blog.unixy.net/2011/12/stable-fastcgi-configuration-on-a-cpanel-apache-shared-or-dedicated-server/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 20:35:32 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Crash Course]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[DSO]]></category>
		<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[mod_php]]></category>
		<category><![CDATA[suPHP]]></category>
		<category><![CDATA[UNIXy]]></category>
		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=1483</guid>
		<description><![CDATA[A default installation of FastCGI on cPanel server is dangerously simple. In this post, I'll go over what it takes to configure FastCGI on a cPanel node properly.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F12%2Fstable-fastcgi-configuration-on-a-cpanel-apache-shared-or-dedicated-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F12%2Fstable-fastcgi-configuration-on-a-cpanel-apache-shared-or-dedicated-server%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A default installation of FastCGI on <a title="cPanel Varnish" href="http://www.unixy.net/varnish" target="_blank">cPanel</a> <a title="server" href="http://www.unixy.net/dedicated-servers" target="_blank">server</a> is dangerously simple. It&#8217;s dangerous because one cPanel account (or one vhost) is capable of crashing down a whole <a title="server" href="http://www.unixy.net">server</a> if, say, traffic were to spike up. It&#8217;s also simple because it won&#8217;t allow complex scripts to run cleanly. In brief, it&#8217;s absolutely not ready for production as-is. In this post, I&#8217;ll go over what it takes to configure FastCGI on a cPanel node properly.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><em>Did you know?</em></p>
<blockquote>
<p style="text-align: left;"><strong>UNIXy is a <a title="fully managed server" href="http://www.unixy.net/fully-managed-hosting-promise">fully managed server</a> and cluster provider. What this means is we don&#8217;t expect you to know anything about servers or server management. The good news is it doesn&#8217;t cost you extra to have us manage your UNIXy server! Get in touch with us <a title="UNIXy Contact" href="https://www.unixy.net/secure/contact.php">here</a> to get the ball rolling!</strong></p>
<p style="text-align: left;">
</blockquote>
<p>Before you continue reading, be sure to have FastCGI up and running as the PHP handler on your cPanel server. The installation of FastCGI is covered in the online cPanel documentation. From here on now, I&#8217;ll assume you&#8217;re ready to add the settings for FastCGI.</p>
<p>The following is a list of settings that you need to add to /etc/httpd/conf/php.conf upon switching to FastCGI:</p>
<blockquote>
<pre>MaxRequestsPerProcess 1000
FcgidMaxProcesses 200
FcgidProcessLifeTime 7200
MaxProcessCount 500
FcgidIOTimeout 400
FcgidIdleTimeout 600
FcgidIdleScanInterval 90
FcgidBusyTimeout 300
FcgidBusyScanInterval 80
ErrorScanInterval 3
ZombieScanInterval 3
<strong>DefaultMinClassProcessCount 0</strong>
<strong>DefaultMaxClassProcessCount 3</strong>
<strong>MaxRequestLen 20468982</strong></pre>
</blockquote>
<p>You&#8217;re more likely to adjust the settings in <strong>bold </strong>above. <em>Default<strong>Min</strong>ClassProcessCount 0 </em>instructs FastCGI to keep zero PHP processes running for user when traffic is idle (cPanel account user) . On the other hand, <em>Default<strong>Max</strong>ClassProcessCount 3 </em>tells FastCGI to never allow more than 3 PHP processes running at a time. This settings prevents one users from crashing the server were they to receive a lot of traffic.</p>
<p>So go ahead and copy/paste the above into your httpd.conf and restart Apache (service httpd restart). You&#8217;re good to go now! For greater performance, be sure to check out our <a title="Varnish" href="http://www.unixy.net/varnish">Varnish plugin</a>. Whether you&#8217;re running suPHP, FastCGI, or even DSO (mod_php), <a title="varnish" href="http://www.unixy.net/varnish">Varnish</a> will make your website load much faster.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2011/12/stable-fastcgi-configuration-on-a-cpanel-apache-shared-or-dedicated-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Varnish &#8220;not responding to CLI, killing it died signal=3&#8243; Explained</title>
		<link>http://blog.unixy.net/2011/12/not-responding-to-cli-killing-it-died-signal3-explained/</link>
		<comments>http://blog.unixy.net/2011/12/not-responding-to-cli-killing-it-died-signal3-explained/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 15:04:28 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[Crash Course]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[cli_timeout]]></category>
		<category><![CDATA[not responding]]></category>
		<category><![CDATA[signal=3]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[varnish cache]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=1475</guid>
		<description><![CDATA[Varnish not responding to CLI, killing it died signal=3 Explained]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F12%2Fnot-responding-to-cli-killing-it-died-signal3-explained%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F12%2Fnot-responding-to-cli-killing-it-died-signal3-explained%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We haven&#8217;t seen anyone explain the meaning of following <a title="Varnish" href="http://www.unixy.net/varnish">Varnish</a> error message found in the logs of your <a title="server" href="http://www.unixy.net">server</a> in detail. So here it is for the curious:</p>
<blockquote>
<pre>Dec  5 12:31:31 server varnishd[28446]: Child (28447) not responding to CLI, killing it.
Dec  5 12:31:59 server varnishd[28446]: Child (28447) died signal=3
Dec  5 12:32:03 server varnishd[28446]: child (22431) Started
Dec  5 12:32:04 server varnishd[28446]: Child (22431) said Child starts
Dec  5 12:32:04 server varnishd[28446]: Child (22431) said SMF.s0 mmap'ed 268435456 bytes of 268435456</pre>
</blockquote>
<p>The message above comes from the Varnish Manager. The Manager is the Varnish process (there are two Varnish processes) that monitors and manages the Varnish caching process. Here it&#8217;s telling us that caching process has stopped responding back with a PONG to its PING. A ping from the Manager to the Cache process with its response look like this and happens every 3 seconds (at least in this configuration):</p>
<blockquote>
<pre>    0 CLI          - Rd ping
    0 CLI          - Wr 200 19 PONG 132318163<strong>3</strong> 1.0
    0 CLI          - Rd ping
    0 CLI          - Wr 200 19 PONG 132318163<strong>6</strong> 1.0</pre>
</blockquote>
<p>So going back to the error message, the Manager is telling us that it hasn&#8217;t received a &#8220;PONG&#8221; back from the Cache process in a while. A &#8220;while&#8221; is controlled by the variable <em>cli_timeout</em> which has a default of 10 seconds in Varnish 3.x and 20 seconds in Varnish 2.x. So the Manager waits for about 10 seconds before it fires a <a title="UNIX" href="http://www.unixy.net">UNIX</a> kill using signal SIGQUIT (signal=3). Next the Manager starts the child back up again afresh.</p>
<p>You may be asking yourself: why is the Cache process not responding? There are a few of possible causes. Either the cache process is deadlocked (deep code issue) or the <a title="server" href="http://www.unixy.net">server</a> is under a very heavy disk IO load / memory shortage. So how do you determine which category you fall under? I recommend checking the load average and memory utilization levels on your server using Sysstat tools.</p>
<p>&nbsp;</p>
<p><em>Did you know?</em></p>
<blockquote><p><strong>UNIXy is a <a title="fully managed server" href="http://www.unixy.net/fully-managed-hosting-promise">fully managed server</a> and cluster provider. What this means is we don&#8217;t expect you to know anything about servers or server management. The good news is it doesn&#8217;t cost you extra to have us manage your UNIXy server! Get in touch with us <a title="UNIXy Contact" href="https://www.unixy.net/secure/contact.php">here</a> to get the ball rolling!</strong></p>
<p>&nbsp;</p></blockquote>
<p>That&#8217;s all folks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2011/12/not-responding-to-cli-killing-it-died-signal3-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not all CPU cores are showing up in Linux server /proc/cpuinfo</title>
		<link>http://blog.unixy.net/2011/10/not-all-cpu-cores-are-showing-up-in-linux-server-proccpuinfo/</link>
		<comments>http://blog.unixy.net/2011/10/not-all-cpu-cores-are-showing-up-in-linux-server-proccpuinfo/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 07:53:44 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Crash Course]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[/proc/cpuinfo]]></category>
		<category><![CDATA[cores]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[cpuinfo]]></category>
		<category><![CDATA[hotplug]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=1423</guid>
		<description><![CDATA[The Linux kernel is very smart and can leverage CPU features and instruction sets to bring down power consumption. So one of the logical things to do when power savings are needed is to turn off CPU cores. To confirm that this is indeed what's happening on your system, you could hot-plug these cores and bring them online]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F10%2Fnot-all-cpu-cores-are-showing-up-in-linux-server-proccpuinfo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2011%2F10%2Fnot-all-cpu-cores-are-showing-up-in-linux-server-proccpuinfo%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The <a title="Linux" href="http://www.unixy.net">Linux</a> kernel is very <a title="smart server" href="http://www.unixy.net">smart</a> and can leverage CPU features and instruction sets to bring down power consumption especially on a <a title="server" href="http://www.unixy.net/dedicated-servers">server</a>. So one of the logical things to do when power savings are needed is to turn off CPU cores. To confirm that this is indeed what&#8217;s happening on your system, you could hot-plug these cores and bring them online in this fashion:</p>
<blockquote><p>echo 1 &gt; /sys/devices/system/cpu/cpu4/online<br />
echo 1 &gt; /sys/devices/system/cpu/cpu5/online</p></blockquote>
<p>You can then verify that additional CPU cores have been brought up. You can also take them offline if needed:</p>
<blockquote><p>echo 0 &gt; /sys/devices/system/cpu/cpu4/online<br />
echo 0 &gt; /sys/devices/system/cpu/cpu5/online</p></blockquote>
<p>The above will lead to this message being displayed in /var/log/messages (turned off core # 23):</p>
<blockquote><p>[1132050.457980] CPU 23 is now offline<br />
[1132065.819054] Booting Node 2 Processor 23 APIC 0x2b</p></blockquote>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2011/10/not-all-cpu-cores-are-showing-up-in-linux-server-proccpuinfo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn how your WordPress blog can weather a digg / slashdot / reddit / etc effect</title>
		<link>http://blog.unixy.net/2010/08/learn-how-your-wordpress-blog-can-weather-a-digg-slashdot-reddit-etc-effect/</link>
		<comments>http://blog.unixy.net/2010/08/learn-how-your-wordpress-blog-can-weather-a-digg-slashdot-reddit-etc-effect/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 04:40:04 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Crash Course]]></category>
		<category><![CDATA[./]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[heady load]]></category>
		<category><![CDATA[high traffic wordpress]]></category>
		<category><![CDATA[reddit]]></category>
		<category><![CDATA[slashdot]]></category>
		<category><![CDATA[slashdotted]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=468</guid>
		<description><![CDATA[In this article, we are going to cover one trick that is used in Web social circles to weather short-lived traffic storms. In most cases, servers collapse due to the server-side processing that needs to occur to produce the HTML that sent to the browser. Whether the server-side script is written in PHP, Ruby, Python, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F08%2Flearn-how-your-wordpress-blog-can-weather-a-digg-slashdot-reddit-etc-effect%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F08%2Flearn-how-your-wordpress-blog-can-weather-a-digg-slashdot-reddit-etc-effect%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In this article, we are going to cover one trick that is used in Web social circles to weather short-lived traffic storms. In most cases, servers collapse due to the server-side processing that needs to occur to produce the HTML that sent to the browser. Whether the server-side script is written in PHP, Ruby, Python, or Perl with a database back-end, this trick is effective and does the job. It gives you much needed breathing room to plan ahead should the spike continue for weeks.</p>
<p>In the case of a WordPress blog, say for example <a href="http://blog.unixy.net/2010/03/bargain-bin-fully-managed-dedicated-servers/">http://blog.unixy.net/2010/03/bargain-bin-fully-managed-dedicated-servers/</a>, upon visiting the Bargain Bin blog link, the server where blog.unixy.net is hosted will need to perform several tasks to render the page and send it the HTML results back. The tasks consist of running PHP scripts, querying the database, and retrieving files from disk amongst other tasks. Under extended peak traffic periods, these tasks when repeated continuously overwhelm the server and cause it to slow down and sometimes to crash.</p>
<p>So, if all the server does is produce the HTML code and send it back to the browser, we might as well just generate the HTML ourselves <strong><em>once </em><span style="font-weight: normal;">and instruct the server to send it instead, bypassing all of that heavy processing. So without further delay, here is how one can generate the HTML:</span></strong></p>
<blockquote><p><strong>GET <a href="http://blog.unixy.net/2010/03/bargain-bin-fully-managed-dedicated-servers/">http://blog.unixy.net/2010/03/bargain-bin-fully-managed-dedicated-servers/</a> &amp;&gt; /tmp/bargain-bin.html</strong></p></blockquote>
<p><strong><span style="font-weight: normal;">The GET command comes as part of the libwww-perl package, which is available for both Linux and Windows. Now that we obtained the HTML, we are going to add a .htaccess rule to temporarily redirect all requests to the article /<strong>2010/03/bargain-bin-fully-managed-dedicated-servers<span style="font-weight: normal;"> to </span>bargain-bin.html.</strong> Be sure to move the file my-page-dugg.html to the HTML root folder. Here is the .htaccess rule:</span></strong></p>
<blockquote><p><strong>RewriteEngine on</strong></p>
<p><strong>Redirect 302 /2010/03/bargain-bin-fully-managed-dedicated-servers /bargain-bin.html</strong></p></blockquote>
<p>Be sure to put the above rules <em>before</em> the WordPress rules. The 302 rule means that it is a temporary redirect. This is so it is SEO friendly and does not break your links as search engines see them.</p>
<p>I hope you enjoyed this short article. The above instructions can work for about any CMS or portal. Keep in mind that should you be one of our customers, we will be very happy to complete this workaround on your server for no extra charge.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2010/08/learn-how-your-wordpress-blog-can-weather-a-digg-slashdot-reddit-etc-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to train SpamAssassin&#8217;s Bayesian filter on spam or ham</title>
		<link>http://blog.unixy.net/2010/06/how-to-train-spamassassins-bayesian-filter-on-spam-or-ham/</link>
		<comments>http://blog.unixy.net/2010/06/how-to-train-spamassassins-bayesian-filter-on-spam-or-ham/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 16:27:49 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Crash Course]]></category>
		<category><![CDATA[bayesian]]></category>
		<category><![CDATA[classifier]]></category>
		<category><![CDATA[ham]]></category>
		<category><![CDATA[mailbox]]></category>
		<category><![CDATA[maildir]]></category>
		<category><![CDATA[SA]]></category>
		<category><![CDATA[sa-learn]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=324</guid>
		<description><![CDATA[SpamAssassin (SA) is a program used for email spam filtering based on content matching rules. The Bayesian classifier that comes with SpamAssassin can be trained to recognize spam (or ham) based on a few sample emails. SA breaks the spam email into tokens or group of tokens for processing. Once SA is fed a large [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F06%2Fhow-to-train-spamassassins-bayesian-filter-on-spam-or-ham%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2010%2F06%2Fhow-to-train-spamassassins-bayesian-filter-on-spam-or-ham%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>SpamAssassin (SA) is a program used for email spam filtering based on content matching rules. The Bayesian classifier that comes with SpamAssassin can be trained to recognize spam (or ham) based on a few sample emails. SA breaks the spam email into tokens or group of tokens for processing. Once SA is fed a large enough sample of spam tokens, it will start marking spam email with a higher score and thus block the spam. The same applies to ham except that the score is lower.</p>
<p>The sa-learn utility that comes with SA is the tool used to train SA on what is spam or what is ham. It is crucial to feed sa-learn with either spam or ham and not both at the same time. While sa-learn has several command line switches for various options, one only needs a couple of flags to have it process emails. The following two command lines are all one needs to get the job done:</p>
<p>To train SA on spam, run the following from the server in question:</p>
<blockquote><p><strong><code>sa-learn --showdots --mbox --spam spam-file</code></strong></p></blockquote>
<p>To train SA on ham, run the following from the server in question:</p>
<blockquote><p><strong><strong><code>sa-learn --showdots --mbox --ham ham-file</code></strong></strong></p></blockquote>
<p><em>spam-file</em> and <em>ham-file</em> are files in Mailbox format. So what if your inbox is of type Maildir? There is an extra step involved in converting the Maildir format to a Mailbox. The utility <em><a title="Mailbox to Maildir tool" href="http://batleth.sapienti-sat.org/projects/mb2md/">mb2md</a> </em>can do the job seamlessly. Once the Maildir is converted to Mailbox, simply replace &#8216;spam-file&#8217; in the command line above with the resulting Mailbox file from the conversion.</p>
<p><em><span style="font-style: normal;">That&#8217;s all folks! We hope this was useful.</span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2010/06/how-to-train-spamassassins-bayesian-filter-on-spam-or-ham/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.147 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-01-17 19:28:53 -->

