<?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>Out of Control® &#187; Servers</title>
	<atom:link href="http://www.outofcontrol.ca/category/servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.outofcontrol.ca</link>
	<description>Keeping you in control</description>
	<lastBuildDate>Mon, 19 Jul 2010 14:30:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Debugging MailScanner: cleaning messages</title>
		<link>http://www.outofcontrol.ca/2008/12/19/debugging-mailscanner-cleaning-messages/</link>
		<comments>http://www.outofcontrol.ca/2008/12/19/debugging-mailscanner-cleaning-messages/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 15:01:53 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[anti-virus]]></category>
		<category><![CDATA[mailscanner]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=167</guid>
		<description><![CDATA[Last week I did a short post on testing MailScanner to be sure it was scanning properly. An alert reader pointed out that I missed the easy solution, which was to simply use 'MailScanner --lint' to check if MailScanner was running properly. Since I wrote that article, I found that my MailScanner was again hogging [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/">Last week</a> I did a short post on testing MailScanner to be sure it was scanning properly. An alert reader pointed out that I missed the easy solution, which was to simply use 'MailScanner --lint' to check if MailScanner was running properly.</p>
<p>Since I wrote that article, I found that my MailScanner was again hogging the CPU. Last time it was an issue with f-prot interaction, this time it is a problem apparently with MailScanner. </p>
<p>Here is what I did to debug this issue, and <a href="http://thread.gmane.org/gmane.mail.virus.mailscanner/67315/focus=67326">here is the post</a> that helped me learn more about MailScanner.</p>
<p>First thing was to check top:</p>
<div class="igBar"><span id="lcode-7"><a href="#" onclick="javascript:showPlainTxt('code-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-7">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">7078</span> root&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">25</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span> <span style="color:#800000;color:#800000;">28936</span>&nbsp; 23m <span style="color:#800000;color:#800000;">1960</span> R&nbsp; &nbsp;<span style="color:#800000;color:#800000;">99</span>&nbsp; <span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">6</span>&nbsp; &nbsp;<span style="color:#800000;color:#800000;">3</span>:<span style="color:#800000;color:#800000;">19</span>.<span style="color:#800000;color:#800000;">60</span> MailScanner </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>When I did a strace -p 7078 I saw nothing. Literally. So that was not much help. Next up, see what ps has for me:</p>
<div class="igBar"><span id="lcode-8"><a href="#" onclick="javascript:showPlainTxt('code-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-8">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ps -ax | grep MailScanner</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">07</span>:<span style="color:#800000;color:#800000;">40</span>:<span style="color:#800000;color:#800000;">59</span> root@secure site1<span style="color:#006600; font-weight:bold;">&#93;</span># ps ax | grep MailScanner</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#800000;color:#800000;">7077</span> ?&nbsp; &nbsp; &nbsp; &nbsp; Ss&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">0</span>:<span style="color:#800000;color:#800000;">00</span> MailScanner: master waiting for children, sleeping</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#800000;color:#800000;">7078</span> ?&nbsp; &nbsp; &nbsp; &nbsp; R&nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">14</span>:<span style="color:#800000;color:#800000;">43</span> MailScanner: cleaning messages</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#800000;color:#800000;">7085</span> ?&nbsp; &nbsp; &nbsp; &nbsp; S&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>:<span style="color:#800000;color:#800000;">00</span> MailScanner: waiting for messages</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#800000;color:#800000;">7123</span> ?&nbsp; &nbsp; &nbsp; &nbsp; S&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>:<span style="color:#800000;color:#800000;">00</span> MailScanner: waiting for messages</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#800000;color:#800000;">7127</span> ?&nbsp; &nbsp; &nbsp; &nbsp; S&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>:<span style="color:#800000;color:#800000;">00</span> MailScanner: waiting for messages</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#800000;color:#800000;">7170</span> ?&nbsp; &nbsp; &nbsp; &nbsp; S&nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">0</span>:<span style="color:#800000;color:#800000;">00</span> MailScanner: waiting for messages </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>There is my stuck process, and apparently it is stuck cleaning messages. But which messages? The MailScanner working directory has more than one email in it, and to be picky I would prefer not to delete a valid email. Next step to be thorough is to do an strace on MailScanner itself and see what it is up to. You will see a lot of output, and then finally you should see a list of PID's coupled with the email that is stuck:</p>
<div class="igBar"><span id="lcode-9"><a href="#" onclick="javascript:showPlainTxt('code-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-9">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">strace -f /usr/sbin/MailScanner</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> open<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/qfmBJAmQ7J011131"</span>, O_RDWR|O_LARGEFILE<span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">7</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> ioctl<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfddf558<span style="color:#006600; font-weight:bold;">&#41;</span> = -<span style="color:#800000;color:#800000;">1</span> ENOTTY <span style="color:#006600; font-weight:bold;">&#40;</span>Inappropriate ioctl for device<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> _llseek<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, <span style="color:#800000;color:#800000;">0</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, SEEK_CUR<span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> fstat64<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, <span style="color:#006600; font-weight:bold;">&#123;</span>st_mode=S_IFREG|<span style="color:#800000;color:#800000;">0600</span>, st_size=<span style="color:#800000;color:#800000;">1182</span>, ...<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> fcntl64<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, F_SETFD, FD_CLOEXEC<span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> fcntl64<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, F_SETLK64, <span style="color:#006600; font-weight:bold;">&#123;</span>type=F_WRLCK, whence=SEEK_SET, start=<span style="color:#800000;color:#800000;">0</span>, len=<span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#125;</span>, 0x99a50a8<span style="color:#006600; font-weight:bold;">&#41;</span> = -<span style="color:#800000;color:#800000;">1</span> EAGAIN <span style="color:#006600; font-weight:bold;">&#40;</span>Resource temporarily unavailable<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> close<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>pid <span style="color:#800000;color:#800000;">24167</span><span style="color:#006600; font-weight:bold;">&#93;</span> open<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/qfmBJE3lHG021993"</span>, O_RDWR|O_LARGEFILE<span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">7</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Note the different PID on these files that seem to cause MailScanner to loop indefinitely: [pid 24167]. Now we can run a trace on that PID:</p>
<div class="igBar"><span id="lcode-10"><a href="#" onclick="javascript:showPlainTxt('code-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-10">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">strace -p <span style="color:#800000;color:#800000;">24167</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">open<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/qfmBJAmQ7J011131"</span>, O_RDWR|O_LARGEFILE<span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">7</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ioctl<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfddf558<span style="color:#006600; font-weight:bold;">&#41;</span> = -<span style="color:#800000;color:#800000;">1</span> ENOTTY <span style="color:#006600; font-weight:bold;">&#40;</span>Inappropriate ioctl for device<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_llseek<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, <span style="color:#800000;color:#800000;">0</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, SEEK_CUR<span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fstat64<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, <span style="color:#006600; font-weight:bold;">&#123;</span>st_mode=S_IFREG|<span style="color:#800000;color:#800000;">0600</span>, st_size=<span style="color:#800000;color:#800000;">1182</span>, ...<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fcntl64<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, F_SETFD, FD_CLOEXEC<span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fcntl64<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span>, F_SETLK64, <span style="color:#006600; font-weight:bold;">&#123;</span>type=F_WRLCK, whence=SEEK_SET, start=<span style="color:#800000;color:#800000;">0</span>, len=<span style="color:#800000;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#125;</span>, 0x99a50a8<span style="color:#006600; font-weight:bold;">&#41;</span> = -<span style="color:#800000;color:#800000;">1</span> EAGAIN <span style="color:#006600; font-weight:bold;">&#40;</span>Resource temporarily unavailable<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">close<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">7</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">open<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/qfmBJE3lHG021993"</span>, O_RDWR|O_LARGEFILE<span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color:#800000;color:#800000;">7</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now we will get more looping text, but this time it will show the emails that MailScanner is stuck  on:</p>
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showPlainTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-11">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/qfmBJAmQ7J011131</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/qfmBJE3lHG021993 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>While MailScanner is still running, you can go to the MailScanner working directory and see a list of folders named after the MailScanner PID's:</p>
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showPlainTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /home/virtual/FILESYSTEMTEMPLATE/services/mailscanner/MailScanner.<span style="">work</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">53</span>:<span style="color:#800000;color:#800000;">51</span> root@secure MailScanner.<span style="">work</span><span style="color:#006600; font-weight:bold;">&#93;</span># ls -la</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">total <span style="color:#800000;color:#800000;">28</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">drwx------ <span style="color:#800000;color:#800000;">7</span> root root <span style="color:#800000;color:#800000;">4096</span> Dec <span style="color:#800000;color:#800000;">19</span> <span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">13</span> .</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">drwxr</span>-xr-x <span style="color:#800000;color:#800000;">4</span> root root <span style="color:#800000;color:#800000;">4096</span> Mar <span style="color:#800000;color:#800000;">20</span>&nbsp; <span style="color:#800000;color:#800000;">2008</span> ..</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">drwx</span>------ <span style="color:#800000;color:#800000;">2</span> root root <span style="color:#800000;color:#800000;">4096</span> Dec <span style="color:#800000;color:#800000;">19</span> <span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">39</span> <span style="color:#800000;color:#800000;">24167</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">drwx------ <span style="color:#800000;color:#800000;">2</span> root root <span style="color:#800000;color:#800000;">4096</span> Dec <span style="color:#800000;color:#800000;">19</span> <span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">46</span> <span style="color:#800000;color:#800000;">26134</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">drwx------ <span style="color:#800000;color:#800000;">2</span> root root <span style="color:#800000;color:#800000;">4096</span> Dec <span style="color:#800000;color:#800000;">19</span> <span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">29</span> <span style="color:#800000;color:#800000;">26135</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">drwx------ <span style="color:#800000;color:#800000;">2</span> root root <span style="color:#800000;color:#800000;">4096</span> Dec <span style="color:#800000;color:#800000;">19</span> <span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">46</span> <span style="color:#800000;color:#800000;">26136</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">drwx------ <span style="color:#800000;color:#800000;">2</span> root root <span style="color:#800000;color:#800000;">4096</span> Dec <span style="color:#800000;color:#800000;">19</span> <span style="color:#800000;color:#800000;">08</span>:<span style="color:#800000;color:#800000;">47</span> <span style="color:#800000;color:#800000;">26137</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Go into the problem PID's directory and you will see a list of files that make up the email that is stuck. This might help you determine why the email is stuck. In my case, there was a virus attached to an email, which, <a href="http://thread.gmane.org/gmane.mail.virus.mailscanner/67315/focus=67326">like the this post pointed out</a>, was also causing MailScanner to loop. </p>
<p>Yes, you can easily just go to /home/virtual/FILESYSTEMTEMPLATE/services/sendmail/mqueue/ and delete all the emails in the queue and restart MailScanner, but I wanted to be sure that one of the emails was really the problem.</p>
<p>This little how-to does not fix the real issue of MailScanner getting stuck in an endless loop, but merely solves the current issue of MailScanner hogging the CPU. We can fully expect the issue to rear its ugly little head again at some point. Hopefully by that time, we will have solved the root issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/12/19/debugging-mailscanner-cleaning-messages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Test your servers Virus filters &#8211; don&#8217;t assume</title>
		<link>http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/</link>
		<comments>http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:45:26 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[anti-virus]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=162</guid>
		<description><![CDATA[On one of our RHEL5 servers running Ensim, we noticed after the last big update of RHEL using 'yum update', that MailScanner was capped out, using tons of our CPU power. In the past when this happens I usually find it is ClamAV acting up. However, we were using on this server a free version [...]]]></description>
			<content:encoded><![CDATA[<p>On one of our RHEL5 servers running Ensim, we noticed after the last big update of RHEL using 'yum update', that MailScanner was capped out, using tons of our CPU power. In the past when this happens I usually find it is ClamAV acting up. However, we were using on this server a free version of <a href="http://www.f-prot.com/">f-prot</a>. I took a chance and purchased the latest greatest mail server version of f-prot and installed it. Bingo, the problem went away. </p>
<p>Why f-prot? It works and it is easier on the server. I have noticed that the server load with f-prot is noticeably lower than when using ClamAV.</p>
<p>Once the new version of f-prot was properly installed, I wanted to test that it worked as it should. A <a href="http://www.nightowlswebspace.com/">friend</a> suggested to test the virus scanner I should put it to a real-world test using one of <a href="http://www.declude.com/articles.asp?ID=100">Declude.com</a>'s free tools. </p>
<p><a href="http://www.declude.com/Articles.asp?ID=99">This test</a> would actually send an email to my server with a file that was made to get caught be anti-virus filters.</p>
<p>The test worked well, too bad my anti-virus f-prot filter didn't. After a quick check I realized I had not modified one path in my MailScanner rules file to point to the new f-prot location. After I fixed that, I ran the test again, and sure enough, my anti-virus filter was working as it should.</p>
<p>Lesson learnt? Never assume your new software works, test it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/12/16/test-your-servers-virus-filters-dont-assume/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Install custom Pear packages on 1and1</title>
		<link>http://www.outofcontrol.ca/2008/12/16/install-custom-pear-packages-on-1and1/</link>
		<comments>http://www.outofcontrol.ca/2008/12/16/install-custom-pear-packages-on-1and1/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:20:02 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=160</guid>
		<description><![CDATA[Canadians find the weather really interesting. Don't we? I mean, after all, it changes every day from a cool -19°C in the morning to a toasty +6°C in the afternoon. Okay, so maybe not every day do we get extremes like that, But Canadians still seem fascinated with the weather. For me, I am fascinated [...]]]></description>
			<content:encoded><![CDATA[<p>Canadians find the weather really interesting. Don't we? I mean, after all, it changes every day from a cool -19°C in the morning to a toasty +6°C in the afternoon. Okay, so maybe not every day do we get extremes like that, But Canadians still seem fascinated with the weather. </p>
<p>For me, I am fascinated with part of the weather, namely METAR data and using it to mash up Google map stuff. I haven't actually done any mashups but I plan too. To help me with my fascination, I was thinking of trying out the PEAR Services_Weather package. Installing this is super easy on my own servers, just enter 'pear install Services_Weather' and poof, there it is. On a 1and1 account, if you have never installed any non-mainstream packages for PEAR, you are in for a short shock. 1and1 won't let you install your own packages by default. Luckily there is a work around, and it is really quite simple. </p>
<p><strong>You need an account with SSH access to do this.</strong></p>
<p>First, take a look at the current configuration in your 1and1 account:</p>
<div class="igBar"><span id="lcode-17"><a href="#" onclick="javascript:showPlainTxt('code-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-17">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pear config-show</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Configuration <span style="color:#006600; font-weight:bold;">&#40;</span>channel pear.<span style="">php</span>.<span style="">net</span><span style="color:#006600; font-weight:bold;">&#41;</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">=====================================</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Auto-discover new Channels&nbsp; &nbsp; &nbsp;auto_discover&nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Default Channel&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default_channel&nbsp; pear.<span style="">php</span>.<span style="">net</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">HTTP Proxy Server Address&nbsp; &nbsp; &nbsp; http_proxy&nbsp; &nbsp; &nbsp; &nbsp;&lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR server <span style="color:#006600; font-weight:bold;">&#91;</span>DEPRECATED<span style="color:#006600; font-weight:bold;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp;master_server&nbsp; &nbsp; pear.<span style="">php</span>.<span style="">net</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Default Channel Mirror&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;preferred_mirror pear.<span style="">php</span>.<span style="">net</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Remote Configuration File&nbsp; &nbsp; &nbsp; remote_config&nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR executables directory&nbsp; &nbsp; &nbsp;bin_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/bin</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR documentation directory&nbsp; &nbsp;doc_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/lib/php/doc</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PHP extension directory&nbsp; &nbsp; &nbsp; &nbsp; ext_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/lib/php/extensions/no-debug-non-zts-<span style="color:#800000;color:#800000;">20020429</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR directory&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;php_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/lib/php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR Installer cache directory cache_dir&nbsp; &nbsp; &nbsp; &nbsp; /tmp/pear/cache</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR data directory&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/lib/php/data</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR Installer download&nbsp; &nbsp; &nbsp; &nbsp; download_dir&nbsp; &nbsp; &nbsp;/tmp/pear/cache</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">directory</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PHP CLI/CGI binary&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;php_bin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/bin/php</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="">ini</span> location&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;php_ini&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR Installer temp directory&nbsp; temp_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/tmp/pear/temp</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR test directory&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; test_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/lib/php/test</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Cache TimeToLive&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cache_ttl&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">3600</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Preferred Package State&nbsp; &nbsp; &nbsp; &nbsp; preferred_state&nbsp; stable</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Unix file mask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;umask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">22</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Debug Log Level&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; verbose&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR password <span style="color:#006600; font-weight:bold;">&#40;</span>for&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;password&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">maintainers<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Signature Handling Program&nbsp; &nbsp; &nbsp;sig_bin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/bin/gpg</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Signature Key Directory&nbsp; &nbsp; &nbsp; &nbsp; sig_keydir&nbsp; &nbsp; &nbsp; &nbsp;/usr/etc/pearkeys</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Signature Key Id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sig_keyid&nbsp; &nbsp; &nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Package Signature Type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sig_type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gpg</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR username <span style="color:#006600; font-weight:bold;">&#40;</span>for&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;username&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">maintainers<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">User Configuration File&nbsp; &nbsp; &nbsp; &nbsp; Filename&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/kunden/homepages/X/dXXXXXXXX/htdocs/.<span style="">pearrc</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">System Configuration File&nbsp; &nbsp; &nbsp; Filename&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/etc/pear.<span style="">conf</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
The important lines to use are directory entries. Note that they are all out of reach in /usr/bin and /usr/lib. We can't install in there! So how do we install our PEAR package? Easy. Set PEAR up to work from our own home directory.</p>
<div class="igBar"><span id="lcode-18"><a href="#" onclick="javascript:showPlainTxt('code-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-18">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pear config-create $HOME .<span style="">pearrc</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pear install -o PEAR </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The first command tells pear to create a local config file. The next command simply tells PEAR to install itself according to the local config file you just created. Don't forget to include the new path in your PHP files with something like:</p>
<div class="igBar"><span id="lcode-19"><a href="#" onclick="javascript:showPlainTxt('code-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-19">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ini_set<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'include_path'</span>,<span style="color:#CC0000;">'/kunden/homepages/NN/dNNNNNNNN/htdocs/pear/php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now when you run pear config-show you should see something like this:</p>
<div class="igBar"><span id="lcode-20"><a href="#" onclick="javascript:showPlainTxt('code-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-20">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Auto-discover new Channels&nbsp; &nbsp; &nbsp;auto_discover&nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Default Channel&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default_channel&nbsp; pear.<span style="">php</span>.<span style="">net</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">HTTP Proxy Server Address&nbsp; &nbsp; &nbsp; http_proxy&nbsp; &nbsp; &nbsp; &nbsp;&lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR server <span style="color:#006600; font-weight:bold;">&#91;</span>DEPRECATED<span style="color:#006600; font-weight:bold;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp;master_server&nbsp; &nbsp; pear.<span style="">php</span>.<span style="">net</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Default Channel Mirror&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;preferred_mirror pear.<span style="">php</span>.<span style="">net</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Remote Configuration File&nbsp; &nbsp; &nbsp; remote_config&nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR executables directory&nbsp; &nbsp; &nbsp;bin_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /kunden/homepages/NN/dNNNNNNNN/htdocs/pear</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR documentation directory&nbsp; &nbsp;doc_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/docs</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PHP extension directory&nbsp; &nbsp; &nbsp; &nbsp; ext_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/ext</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR directory&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;php_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/php</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR Installer cache directory cache_dir&nbsp; &nbsp; &nbsp; &nbsp; /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/cache</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR data directory&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/kunden/homepages/NN/dNNNNNNNN/htdocs/pear/data</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR Installer download&nbsp; &nbsp; &nbsp; &nbsp; download_dir&nbsp; &nbsp; &nbsp;/tmp/pear/cache</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">directory</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PHP CLI/CGI binary&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;php_bin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/bin/php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="">ini</span> location&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;php_ini&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR Installer temp directory&nbsp; temp_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/tmp/pear/temp</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR test directory&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; test_dir&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/kunden/homepages/NN/dNNNNNNNN/htdocs/pear/tests</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Cache TimeToLive&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cache_ttl&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">3600</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Preferred Package State&nbsp; &nbsp; &nbsp; &nbsp; preferred_state&nbsp; stable</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Unix file mask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;umask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">22</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Debug Log Level&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; verbose&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR password <span style="color:#006600; font-weight:bold;">&#40;</span>for&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;password&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">maintainers<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Signature Handling Program&nbsp; &nbsp; &nbsp;sig_bin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /usr/bin/gpg</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Signature Key Directory&nbsp; &nbsp; &nbsp; &nbsp; sig_keydir&nbsp; &nbsp; &nbsp; &nbsp;/usr/etc/pearkeys</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Signature Key Id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sig_keyid&nbsp; &nbsp; &nbsp; &nbsp; &lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Package Signature Type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sig_type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gpg</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">PEAR username <span style="color:#006600; font-weight:bold;">&#40;</span>for&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;username&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;not set&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">maintainers<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">User Configuration File&nbsp; &nbsp; &nbsp; &nbsp; Filename&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/kunden/homepages/NN/dNNNNNNNN/htdocs/.<span style="">pearrc</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">System Configuration File&nbsp; &nbsp; &nbsp; Filename&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/etc/pear.<span style="">conf</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This little how-to would not have been so easy to figure out without the aid of <a href="http://www.thecodecave.com/article116">thecodecase.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/12/16/install-custom-pear-packages-on-1and1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Block spam bots and evil web scrapers</title>
		<link>http://www.outofcontrol.ca/2008/11/12/block-spam-bots-and-evil-web-scrapers/</link>
		<comments>http://www.outofcontrol.ca/2008/11/12/block-spam-bots-and-evil-web-scrapers/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 21:27:15 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=149</guid>
		<description><![CDATA[I noticed on one server today a huge CPU load. A quick look at Netstat showed that most of the current traffic was coming from someone in Africa. I crossed referenced the IP address from Netstat with the access log files on the various sites on the server and saw that it had a UserAgent [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed on one server today a huge CPU load. A quick look at Netstat showed that most of the current traffic was coming from someone in Africa. I crossed referenced the IP address from Netstat with the access log files on the various sites on the server and saw that it had a UserAgent of 'DTS Agent'.  A quick Google showed this to be a scraper for email contacts. </p>
<p>It was time that I added a little something for these spam bots to help reduce their ability to see my sites. Simply adding the following code to an .htaccess file in the root of the site structure would help to curb evil good for nothing spam bots:</p>
<p>[Last Updated: <em>April 7th 2009</em>]</p>
<div class="igBar"><span id="lcode-22"><a href="#" onclick="javascript:showPlainTxt('code-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-22">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteEngine On</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RewriteCond %<span style="color:#006600; font-weight:bold;">&#123;</span>HTTP:User-Agent<span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>?:Alexibot|Art-Online|asterias|BackDoorbot|Black.<span style="">Hole</span>|BlackWidow|BlowFish|botALot|BuiltbotTough|Bullseye|BunnySlippers|Cegbfeieh|Cheesebot|CherryPicker|ChinaClaw|CopyRightCheck|cosmos|Crescent|Custo|DISCo|DittoSpyder|DownloadsDemon|eCatch|EirGrabber|EmailCollector|EmailSiphon|EmailWolf|EroCrawler|ExpresssWebPictures|ExtractorPro|EyeNetIE|FlashGet|Foobot|FrontPage|GetRight|GetWeb!|Go-Ahead-Got-It|Go!Zilla|GrabNet|Grafula|Harvest|hloader|HMView|httplib|HTTrack|humanlinks|ImagesStripper|ImagesSucker|IndysLibrary|InfonaviRobot|InterGET|Internet\sNinja|Jennybot|JetCar|JOC\sWeb\sSpider|Kenjin.<span style="">Spider</span>|Keyword.<span style="">Density</span>|larbin|LeechFTP|Lexibot|libWeb/clsHTTP|LinkextractorPro|LinkScan/<span style="color:#800000;color:#800000;">8</span>.1a.<span style="">Unix</span>|LinkWalker|lwp-trivial|Mass\sDownloader|Mata.<span style="">Hari</span>|Microsoft.<span style="">URL</span>|MIDown\stool|MIIxpc|Mister.<span style="">PiX</span>|Mister\sPiX|moget|Mozilla/<span style="color:#800000;color:#800000;">3</span>.<span style="">Mozilla</span>/<span style="color:#800000;color:#800000;">2</span>.<span style="color:#800000;color:#800000;">01</span>|Mozilla.*NEWT|Navroad|NearSite|NetAnts|NetMechanic|NetSpider|Net\sVampire|NetZIP|NICErsPRO|NPbot|Octopus|Offline.<span style="">Explorer</span>|Offline\sExplorer|Offline\sNavigator|Openfind|Pagerabber|Papa\sFoto|pavuk|pcBrowser|Program\sShareware\s1|ProPowerbot/<span style="color:#800000;color:#800000;">2</span>.<span style="color:#800000;color:#800000;">14</span>|ProWebWalker|ProWebWalker|psbot/<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>|QueryN.<span style="">Metasearch</span>|ReGet|RepoMonkey|RMA|SiteSnagger|SlySearch|SmartDownload|Spankbot|spanner|Superbot|SuperHTTP|Surfbot|suzuran|Szukacz/<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">4</span>|tAkeOut|Teleport|Teleport\sPro|Telesoft|The.<span style="">Intraformant</span>|TheNomad|TightTwatbot|Titan|toCrawl/UrlDispatcher|toCrawl/UrlDispatcher|True_Robot|turingos|Turnitinbot/<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">5</span>|URLy.<span style="">Warning</span>|VCI|VoidEYE|WebAuto|WebBandit|WebCopier|WebEMailExtrac.*|WebEnhancer|WebFetch|WebGo\sIS|Web.<span style="">Image</span>.<span style="">Collector</span>|Web\sImage\sCollector|WebLeacher|WebmasterWorldForumbot|WebReaper|WebSauger|Website\seXtractor|Website.<span style="">Quester</span>|Website\sQuester|Webster.<span style="">Pro</span>|WebStripper|Web\sSucker|WebWhacker|WebZip|Wget|Widow|<span style="color:#006600; font-weight:bold;">&#91;</span>Ww<span style="color:#006600; font-weight:bold;">&#93;</span>eb<span style="color:#006600; font-weight:bold;">&#91;</span>Bb<span style="color:#006600; font-weight:bold;">&#93;</span>andit|WWW-Collector-E|WWWOFFLE|Xaldon\sWebSpider|Xenu<span style="color:#CC0000;">'s|Zeus|DTS<span style="color:#000099; font-weight:bold;">\s</span>Agent) [NC]</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">RewriteRule .* - [F]</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">ErrorDocument 403 /403.html</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;"> </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;"># IF THE UA STARTS WITH THESE</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(aesop_com_spiderman|backweb|bandit|batchftp|bigfoot) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(black.?hole|blackwidow|blowfish|botalot|buddy|builtbottough|bullseye) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(cheesebot|cherrypicker|chinaclaw|collector|copier|copyrightcheck) HTTP_SAFE_BADBOT&nbsp; </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(cosmos|crescent|diibot|dittospyder|dragonfly) HTTP_SAFE_BADBOT&nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(drip|easydl|ebingbong|ecatch|eirgrabber|emailcollector|emailsiphon) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(emailwolf|erocrawler|exabot|eyenetie|filehound|flashget|flunky) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(frontpage|getright|getweb|go.?zilla|go-ahead-got-it|gotit|grabnet) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(grafula|harvest|hloader|hmview|httrack|humanlinks|ilsebot) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(infonavirobot|infotekies|interget|iria|jennybot|jetcar) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(justview|jyxobot|kenjin|keyword|larbin|leechftp|lexibot|lftp) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(likse|linkscan|linkwalker|lnspiderguy|magnet|mag-net|markwatch) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(mata.?hari|memo|microsoft.?url|midown.?tool|miixpc|mirror|missigua) HTTP_SAFE_BADBOT&nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(mister.?pix|moget|mozilla.?newt|nameprotect|navroad|backdoorbot|nearsite) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(net.?vampire|netants|netmechanic|netspider|nextgensearchbot) HTTP_SAFE_BADBOT </span></div>
</li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(attach|nicerspro|nimblecrawler|npbot|octopus|offline.?explorer) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(offline.?navigator|openfind|outfoxbot|pagegrabber|pavuk) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(pcbrowser|php.?version.?tracker|pockey|propowerbot|prowebwalker) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(psbot|pump|queryn|recorder|realdownload|reaper|true_robot) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(repomonkey|internetseer|sitesnagger|siphon|slysearch|smartdownload) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(snake|snapbot|snoopy|sogou|spacebison|spankbot|spanner|sqworm|superbot) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(superhttp|surfbot|asterias|suzuran|szukacz|takeout|teleport) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(telesoft|the.?intraformant|thenomad|tighttwatbot|titan|urldispatcher) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(turingos|urly.?warning|vacuum|voideye|whacker) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(widow|wisenutbot|wwwoffle|xaldon|xenu|zeus|zyborg|anonymouse) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*web(zip|emaile|enhancer|fetch|go.?is|auto|bandit|clip|copier|reaper|sauger|site.?quester|whack) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">SetEnvIfNoCase ^User-Agent$ .*(dts<span style="color:#000099; font-weight:bold;">\s</span>agent) HTTP_SAFE_BADBOT </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This code is a cleaned up version of the code found <a href="http://www.helicontech.com/ape/doc/mod_rewrite.htm" title="Use mod_write to blck spambots">here</a> and <a href="http://www.askapache.com/htaccess/blocking-bad-bots-and-scrapers-with-htaccess.html" title="Use setenvif to block spambots">here</a>. Note that you really should look through all the User Agents and be sure you are not blocking someone or some software that you would like to keep. The list above is far from complete, but is a good start.</p>
<p>For a fairly up-to-date list of User Agents you will find a <a href="http://www.user-agents.org/" title="User-Agent database">useful User Agent database here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/11/12/block-spam-bots-and-evil-web-scrapers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up my own RHEL server&#8230; again</title>
		<link>http://www.outofcontrol.ca/2008/05/06/setting-up-my-own-rhel-server-again/</link>
		<comments>http://www.outofcontrol.ca/2008/05/06/setting-up-my-own-rhel-server-again/#comments</comments>
		<pubDate>Tue, 06 May 2008 22:04:33 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/?p=127</guid>
		<description><![CDATA[If you have followed my story over the past few months, you will know that I got out of hosting. This has been an excellent move over all as it frees up a lot of my time to do what I like best, develope websites and tinker. As I have a fair number of sites [...]]]></description>
			<content:encoded><![CDATA[<p>If you have followed my story over the past few months, you will know that I got out of hosting. This has been an excellent move over all as it frees up a lot of my time to do what I like best, develope websites and tinker. </p>
<p>As I have a fair number of sites I did not want to host them all where placed my clients, as I could not afford that much. So I looked around and tried out a number of low price hosting options. As it turns out, they are low priced for a reason--commen sense right? </p>
<p>So, this week I rented another server at ThePlanet. I find their network unbeatable, and their tech support excellent when needed. Never had a billing issue either. This week ThePlanet had a sale on which made getting a Dual 3.2Ghz with 2GB of RAM and 2.5Terabytes of bandwidth for only $147 a good thing. This is a plain RHEL5 box with no control panel. Something I wanted to try for sometime.</p>
<p>Over the next few weeks I will write up my experience, whether good or bad, smart or stupid, right here.</p>
<p>Phase one involved installing a few items:</p>
<ul>
<li><a href="#trac">Install Trac</a></li>
<li><a href="#svn">Install Subversion (SVN)</a></li>
<li><a href="#watchdog">Install watchdog</a></li>
<li><a href="#apf">Install APF firewall</a></li>
<li><a href="#bfd">Install BFD brute force detection</a></li>
<li><a href="#mysql">Install MySQL 5</a></li>
<li><a href="#sendmail">Remove Sendmail</a></li>
<li><a href="#exim">Install Exim</a></li>
</ul>
<p><a name="trac"></a><br />
<strong>Install Trac:</strong></p>
<div class="igBar"><span id="lcode-30"><a href="#" onclick="javascript:showPlainTxt('code-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-30">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/local/src/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mkdir trac</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd trac</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//dag.wieers.com/rpm/packages/clearsilver/clearsilver-0.10.4-2.el5.rf.i386.rpm</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//dag.wieers.com/rpm/packages/trac/trac-0.10.4-1.el5.rf.noarch.rpm</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//dag.wieers.com/rpm/packages/clearsilver/python-clearsilver-0.10.4-2.el5.rf.i386.rpm</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rpm -Uvh *.<span style="">rpm</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><a name="svn"></a><br />
<strong>Install Subversion:</strong></p>
<div class="igBar"><span id="lcode-31"><a href="#" onclick="javascript:showPlainTxt('code-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-31">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/local/src/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mkdir subversion</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd subversion</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//dag.wieers.com/rpm/packages/subversion/mod_dav_svn-1.4.6-0.1.el5.rf.i386.rpm</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//dag.wieers.com/rpm/packages/subversion/subversion-1.4.6-0.1.el5.rf.i386.rpm</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//dag.wieers.com/rpm/packages/subversion/subversion-devel-1.4.6-0.1.el5.rf.i386.rpm</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rpm -Uvh *.<span style="">rpm</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Note: you may need to install a few additional items from yum like apr-devel if I remember correctly. </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><a name="watchdog"></a><br />
<strong>Install watchdog:</strong><br />
cd /usr/local/src<br />
wget http://dag.wieers.com/rpm/packages/watchdog/watchdog-5.3.1-1.el5.rf.i386.rpm<br />
rpm -Uvh watchdog-5.3.1-1.el5.rf.i386.rpm</p>
<p><a name="apf"></a><br />
<strong>Install APF fire</strong>wall</p>
<div class="igBar"><span id="lcode-32"><a href="#" onclick="javascript:showPlainTxt('code-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-32">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/local/src</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//www.r-fx.ca/downloads/apf-current.tar.gz</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tar -zxvf apf-current.<span style="">tar</span>.<span style="">gz</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd apf-<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">9</span>.<span style="color:#800000;color:#800000;">6</span>-<span style="color:#800000;color:#800000;">3</span>/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sh install.<span style="">sh</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">You will then need to configure the /etc/apf/conf.<span style="">apf</span> file to make sure you have the proper ports opened up. <span style="">Might</span> as well toss your IP into the /etc/apf/allow_hosts.<span style="">rules</span> files to ensure you don<span style="color:#CC0000;">'t lock yourself out at some point. Obviously only works if you have a static IP. </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><a name="bfd"></a><br />
<strong>Install BFD Brute force Detection</strong></p>
<div class="igBar"><span id="lcode-33"><a href="#" onclick="javascript:showPlainTxt('code-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-33">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/local/src/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http:<span style="color:#FF9933; font-style:italic;">//www.r-fx.ca/downloads/bfd-current.tar.gz</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tar -zxvf bfd-current.<span style="">tar</span>.<span style="">gz</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd bfd-<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">9</span>/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sh install.<span style="">sh</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><a name="mysql"></a><br />
<strong>Install MySQL:</strong><br />
This is a straight yum install and I recommend staying with this to make future upgrades easier.</p>
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showPlainTxt('code-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum install mysql-server</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum install mysql-devel</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum install mysql-client</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum install mysql-client-community</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.<span style="">d</span>/mysqld start</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/usr/bin/mysqladmin -u root password <span style="color:#CC0000;">'new-password'</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Make sure you enter your desired password here!</p>
<p><a name="sendmail"></a><br />
<strong>Remove sendmail:</strong><br />
Why remove sendmail? I want to use something a little newer and after polling my <a href="http://justaguy.ca/">friends</a>, I have chosen exim. This may change in the future, but for now this is my choice.</p>
<div class="igBar"><span id="lcode-35"><a href="#" onclick="javascript:showPlainTxt('code-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-35">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum remove sendmail </div>
</li>
</ol>
</div>
</div>
</div>
<p>
That was it! Cool!</p>
<p><a name="exim"></a><br />
Install Exim:</p>
<div class="igBar"><span id="lcode-36"><a href="#" onclick="javascript:showPlainTxt('code-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-36">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">yum install exim </div>
</li>
</ol>
</div>
</div>
</div>
<p>
That was it! Cool again. </p>
<p>I have not gone into the setting up and configure of each app on the system. Other posts on my site will cover some of those things, and for Exim configuration, I will try to do my best to document my progress. Happy or otherwise.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/05/06/setting-up-my-own-rhel-server-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t do it, do even fix it right. Don&#8217;t pay Dreamhost</title>
		<link>http://www.outofcontrol.ca/2008/04/04/dont-do-it-do-even-fix-it-right-dont-pay-dreamhost/</link>
		<comments>http://www.outofcontrol.ca/2008/04/04/dont-do-it-do-even-fix-it-right-dont-pay-dreamhost/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 00:34:18 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2008/04/04/dont-do-it-do-even-fix-it-right-dont-pay-dreamhost/</guid>
		<description><![CDATA[Short post tonight. Really tired after fighting a long cold and stressful weak. However, I just wanted to say: Don't do it, Don't even fix it right. Don't pay the Dreamhost man! (ala Chris de Burgh's Ferry man). I wanted to try a few different hosting companies. Dreamhost looked interesting as it offered SVN repositories, [...]]]></description>
			<content:encoded><![CDATA[<p>Short post tonight. Really tired after fighting a long cold and stressful weak. However, I just wanted to say:</p>
<p>Don't do it, Don't even fix it right. Don't pay the Dreamhost man! (ala Chris de Burgh's Ferry man).</p>
<p>I wanted to try a few different hosting companies. <a href="http://www.dreamhost.com/">Dreamhost</a> looked interesting as it offered SVN repositories, for $8 a month. People said they were pretty good. Well, for the past week or so they have been anything but. They claim a file server is down or something, but all I know is mail doesn't work, server loads run between 10 and 80, SSH works half the time, and my sites take forever to load! Then they post in their server status that the problem is fixed. According to me and all the other posts I read, the problem is still very much there, thank you very much. I post trouble tickets to support and so far out of three requests I have one answer. First post took over 12 hours to answer, second post went missing apparently, and the third post is now at 6 hours about and nothing. (shhh, I think they went out to get drunk.)</p>
<p>If you read <a href="http://blog.dreamhost.com/2008/03/21/good-reminiscing-friday/">Dreamhost's blog</a>, you will see they made a huge accounting error a couple of months ago which they refer to the "Fat finger incident, and they now tell the world that the error has cost them hundreds of thousands of dollars. Or at least that is what I got from the post. And they tell this whole story with humour. So perhaps they are losing their shirts and can't afford to replace their equipment anymore, who knows. All speculation from this frustrated and very 'Out of Control' programmer.</p>
<p>Who knows, maybe after they fix this issue, everything will be perfect!</p>
<p>I wish you all a great weekend and bid you all a G'night! I am off for a cold one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/04/04/dont-do-it-do-even-fix-it-right-dont-pay-dreamhost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Getting Ensim sendmail to listen on an alternate port</title>
		<link>http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/</link>
		<comments>http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 19:27:23 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/</guid>
		<description><![CDATA[Updated: March 30th 2008 Setup a new server today! This time, instead of using port 465 and setting up the SSL certs etc, I wanted something a little easier to use. So, according to RFC 2476 at this link, I can use port 587. On our Ensim 10.3 box which runs on RHEL 5, this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="#march30"><i>Updated: March 30th 2008</i></a></p>
<p>Setup a new server today! This time, instead of using port 465 and setting up the SSL certs etc, I wanted something a little easier to use. So, according to <a href="http://www.apps.ietf.org/rfc/rfc2476.html#sec-3.1">RFC 2476 at this link</a>, I can use port 587.</p>
<p>On our Ensim 10.3 box which runs on RHEL 5, this is an easy change to make. Note this should work equally well on RHEL4 and Ensim 4.0.x and Ensim 4.1.x.</p>
<p>As usual, lets modify the sendmail.mc file and NOT try to modify sendmail.cf, as a lot of others suggest. Modifying sendmail.cf will cause your changes to be lost next time you upgrade Ensim. </p>
<div class="igBar"><span id="lcode-45"><a href="#" onclick="javascript:showPlainTxt('code-45'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-45">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /usr/lib/opcenter/sendmail/install</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp sendmail.<span style="">mc</span> sendmail.<span style="">mc</span>.<span style="">GOOD</span> # Always make a backup before proceeding!</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pico -w sendmail.<span style="">mc</span> # Or us vi or whatever your favourite editor is. </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Next, you will scroll down until you find this line:</p>
<div class="igBar"><span id="lcode-46"><a href="#" onclick="javascript:showPlainTxt('code-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-46">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dnl DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=smtp,Addr=<span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>, Name=MTA<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and immediately below it, add this line:</p>
<div class="igBar"><span id="lcode-47"><a href="#" onclick="javascript:showPlainTxt('code-47'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-47">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=<span style="color:#800000;color:#800000;">587</span>,Name=MTA<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>A couple of things here worth mentioning. You don't have to use port 587, you can use pretty much any available port you want. If you wish to RFC compliant however, then port 587 is the right port to use as an alternative sendmail port.  Also, for those of us not familiar with the sendmail.mc file, the dnl in front of the line, basically comments the line out. To uncomment the line, simply move the dnl to the end of the line. </p>
<p>Don't uncomment that first DAEMON_OPTIONS line unless you want to block every one on the internet from being able to send email from your server. Uncommenting that line essentially tells the server to listen to port 25 (SMTP) on the localhost (127.0.0.1) only, and ignore all other IP's address (the world!). </p>
<p>Alright, so by now you have made the changes above and are ready to get sendmail.cf updated.</p>
<div class="igBar"><span id="lcode-48"><a href="#" onclick="javascript:showPlainTxt('code-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-48">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp /etc/mail/sendmail.<span style="">cf</span> /etc/mail/sendmail.<span style="">cf</span>.<span style="">GOOD</span> # Remember, always make a backup!</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">m4 sendmail.<span style="">mc</span>&gt; /etc/mail/sendmail.<span style="">cf</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.<span style="">d</span>/sendmail restart </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you use a firewall, be sure to unblock port 587! Many people seem to over look this one (myself included!) and struggle trying to figure out why this little fix doesn't work. </p>
<p>If you have comments or suggestions, I would love to hear them on this topic.</p>
<hr />
<a name="march30"></a><br />
<i>Update: March 30th 2008</i><br />
Some people have discovered that turning on this feature causes email to stop sending email out from the server with the following error:</p>
<div class="igBar"><span id="lcode-49"><a href="#" onclick="javascript:showPlainTxt('code-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-49">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stat=Deferred: Connection refused by <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This can be resolved by add this code immediately before this line DAEMON_OPTIONS(`Port=587,Name=MTA')dnl:</p>
<div class="igBar"><span id="lcode-50"><a href="#" onclick="javascript:showPlainTxt('code-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-50">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=smtp,Addr=<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>, Name=MTA<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Further more, I noticed that sendmail now has the 587 line already in the sendmail.mc file, but it is simply commented out. So instead of all of the above, you can look for this line:</p>
<div class="igBar"><span id="lcode-51"><a href="#" onclick="javascript:showPlainTxt('code-51'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-51">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dnl DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=submission, Name=MSA, M=Ea<span style="color:#CC0000;">')dnl </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and replace it for these two line:</p>
<div class="igBar"><span id="lcode-52"><a href="#" onclick="javascript:showPlainTxt('code-52'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-52">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DAEMON_OPTIONS<span style="color:#006600; font-weight:bold;">&#40;</span>`Port=smtp,Addr=<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>, Name=MTA<span style="color:#CC0000;">')dnl</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea'</span><span style="color:#006600; font-weight:bold;">&#41;</span>dnl </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/03/29/getting-ensim-sendmail-to-listen-on-an-alternate-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merging SVN repos while retaining history</title>
		<link>http://www.outofcontrol.ca/2008/03/11/merging-svn-repos-while-retaining-history/</link>
		<comments>http://www.outofcontrol.ca/2008/03/11/merging-svn-repos-while-retaining-history/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 14:20:43 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2008/03/11/merging-svn-repos-while-retaining-history/</guid>
		<description><![CDATA[Here is a quick little how-to on merging separate Subversion (SVN) repositories into one, while keeping the history in tact. Note that the checkin ID's will change, but you do have a little control over how Subversion will show the change logs. For this tutorial, we want to merge: old1, old2, old3 and old4 into [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick little how-to on merging separate Subversion (SVN) repositories into one, while keeping the history in tact. Note that the checkin ID's will change, but you do have a little control over how Subversion will show the change logs.</p>
<p>For this tutorial, we want to merge:</p>
<p>old1, old2, old3 and old4</p>
<p>into a new single repository called</p>
<p>newrepo</p>
<p>First you will need to create a temporary directory to do the work in. You must have enough space in this directory to handle at least two times the current size of your repository. </p>
<p>We will, for the purposes of this Subversion Tutorial, be working in /home/temp/.</p>
<div class="igBar"><span id="lcode-58"><a href="#" onclick="javascript:showPlainTxt('code-58'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-58">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /home/temp</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mkdir svnworking </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now lets move over to our subversion repository and create the new repository that will house our final merged repository:</p>
<div class="igBar"><span id="lcode-59"><a href="#" onclick="javascript:showPlainTxt('code-59'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-59">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cd /home/vhost/home/svn/repositories</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin create newrepos</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chown -R apache: newrepos </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The next step is to create root folders in our new 'newrepo' SVN repository. You want to create one new root folder for each repository that you will be merging in:</p>
<div class="igBar"><span id="lcode-60"><a href="#" onclick="javascript:showPlainTxt('code-60'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-60">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svn mkdir -m <span style="color:#CC0000;">"Initial project Root Folders"</span> \</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">file:<span style="color:#FF9933; font-style:italic;">//home/vhost/home/svn/repositories/newrepo/old1 \</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">file:<span style="color:#FF9933; font-style:italic;">//home/vhost/home/svn/repositories/newrepo/old2 \</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">file:<span style="color:#FF9933; font-style:italic;">//home/vhost/home/svn/repositories/newrepo/old3 \</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">file:<span style="color:#FF9933; font-style:italic;">//home/vhost/home/svn/repositories/newrepo/old4 </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Note: the backslashes are there to allow me to split command onto separate lines. If you plan on putting the command to create the root repos onto one line, then don't use the backslashes.</p>
<p>The next step is to disable Subversion, which will vary depending on how you have it setup. Once the SVN repository is turned off, we are ready to dump the contents of all our Subversion repositories to our temporary location we created above.</p>
<div class="igBar"><span id="lcode-61"><a href="#" onclick="javascript:showPlainTxt('code-61'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-61">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin dump old1&gt; /home/temp/svnworking/old1.<span style="">repos</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin dump old2&gt; /home/temp/svnworking/old2.<span style="">repos</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin dump old3&gt; /home/temp/svnworking/old3.<span style="">repos</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin dump old4&gt; /home/temp/svnworking/old4.<span style="">repos</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Depending on how large your repositories are, the dumping process could take awhile to process.  Once it is complete, the last step is to simply reload your dumped repositories in the order that you want to maintain the update messages. </p>
<p>In your old repositories you theoretically had each repository check-in number starting at 1 and sequentially going up from there. When you remerge the repositories, you can only have a single first check-in. In our example we will re-merge the repositories in this order: old1, old4, old2 and finally old3. Lets assume for a moment that old1 had 100 check-ins, old2 had 54 check-ins, old3 had 1004 check-ins and old4 had 5 check-ins.</p>
<p>Once our merger is complete our check-in numbers will now go like this:</p>
<p>old1 will start at 1 and finish at 100.<br />
old4 will start at 101 and finish at 105<br />
old2 will start at 106 and finish at 159<br />
old3 will start at 160 and finish at 1163</p>
<div class="igBar"><span id="lcode-62"><a href="#" onclick="javascript:showPlainTxt('code-62'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-62">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin load /home/vhost/home/svn/repositories/newrepos --parent-dir old1 &lt;/home/temp/svnworking/old1.<span style="">repos</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin load /home/vhost/home/svn/repositories/newrepos --parent-dir old4 &lt;/home/temp/svnworking/old4.<span style="">repos</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin load /home/vhost/home/svn/repositories/newrepos --parent-dir old2 &lt;/home/temp/svnworking/old2.<span style="">repos</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">svnadmin load /home/vhost/home/svn/repositories/newrepos --parent-dir old3 &lt;/home/temp/svnworking/old3.<span style="">repos</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Feel free to ask questions or suggest modifications to my method posted here. Due to my schedule I may not be able to respond very quickly. If you require further assistance right away with your Subversion Repositories, please visit <a href="http://www.subversion.tigris.org/">http://www.subversion.tigris.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2008/03/11/merging-svn-repos-while-retaining-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use fuser to diagnose umount issues</title>
		<link>http://www.outofcontrol.ca/2007/05/08/use-fuser-to-diagnose-umount-issues/</link>
		<comments>http://www.outofcontrol.ca/2007/05/08/use-fuser-to-diagnose-umount-issues/#comments</comments>
		<pubDate>Tue, 08 May 2007 13:19:53 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[RHEL and Ensim]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2007/05/08/use-fuser-to-diagnose-umount-issues/</guid>
		<description><![CDATA[This morning I discovered that a drive on one of my machines was in read only mode. So I figured the easiest way to resolve the issue is to unmount the drive and re-mount it again. When I tried to umount the drive I got this error: PLAIN TEXT CODE: # umount /mnt/sdb umount: /mnt/sdb: [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I discovered that a drive on one of my machines was in read only mode. So I figured the easiest way to resolve the issue is to unmount the drive and re-mount it again. When I tried to umount the drive I got this error:</p>
<div class="igBar"><span id="lcode-64"><a href="#" onclick="javascript:showPlainTxt('code-64'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-64">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># umount /mnt/sdb</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">umount: /mnt/sdb: device is busy </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>A quick search on Google found me <a href="http://www.idevelopment.info/data/Unix/General_UNIX/GENERAL_Troubleshootingthedeviceisbusy.shtml">this article</a> which was quite useful.</p>
<p>Basically using the fuser command in Linux we can see which user or pid is accessing files on parition. Usage is quite simple:</p>
<p>fuser -u /mnt/sdb will show me which users are currently using files on the partition.</p>
<p>/sbin/fuser -m /mnt/sdb<br />
/mnt/sdb:             7638c</p>
<p>Using the -m flag, we can get the current pid using files. The 'c' in both cases signifies that this is the current directory of the user or pid. </p>
<p>In my case a Bash file was currently running on the parition I was trying to umount. Once it finished the drive unmounted with no problems. </p>
<p>Unfortunately, there is usually a reason that a drive drops into read only mode. This case was no different. I looked at dmesg from the command line to fine that my drive had some hardware failures and need replacing. Luckily I have lots of current back-ups!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2007/05/08/use-fuser-to-diagnose-umount-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kill A Watt part III</title>
		<link>http://www.outofcontrol.ca/2007/02/27/kill-a-watt-part-iii/</link>
		<comments>http://www.outofcontrol.ca/2007/02/27/kill-a-watt-part-iii/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 21:15:01 +0000</pubDate>
		<dc:creator>plattapuss</dc:creator>
				<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.outofcontrol.ca/2007/02/27/kill-a-watt-part-iii/</guid>
		<description><![CDATA[Well, a week has passed and I have my consumption usage for my computer set up. With normal usage, my entire computer set up, not counting my large Tektronix color laser printer, uses a whopping 63KWh each week. Or 3276KWh per year. Now, lucky for me, I live in Quebec and our electricity only costs [...]]]></description>
			<content:encoded><![CDATA[<p>Well, a week has passed and  I have my consumption usage for my computer set up. With normal usage, my entire computer set up, not counting my large Tektronix color laser printer, uses a whopping 63KWh each week. Or 3276KWh per year. Now, lucky for me, I live in Quebec and our electricity only costs about 5.2 cents per KWh. So my yearly consumption is roughly $170 per year. Considering me entire electricity bill last year totaled about $900, that works out to almost 19% of my electricity goes to just my computer system. </p>
<p>Starting this past Saturday night at 8pm, I have been tracking my consumption in conservation mode. So far, after 68 hours my usage totals 12KWh. Not bad considering last week at this time, I had used roughly 25KWh at this point. </p>
<p>Once I reach the end of the week, I will once again post my usage consumption and give you a little feedback on what I like and dislike about the Kill-A-Watt device.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outofcontrol.ca/2007/02/27/kill-a-watt-part-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
