<?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>Penguin on Rails &#187; Plesk</title>
	<atom:link href="http://www.cherpec.com/category/plesk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cherpec.com</link>
	<description>linux + ruby on rails = love</description>
	<lastBuildDate>Thu, 17 Jun 2010 14:06:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SpamAssassin FH_DATE_PAST_20XX bug</title>
		<link>http://www.cherpec.com/2010/02/spamassassin-fh_date_past_20xx-bug/</link>
		<comments>http://www.cherpec.com/2010/02/spamassassin-fh_date_past_20xx-bug/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 00:03:32 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[SpamAssassin]]></category>
		<category><![CDATA[SpamGuardian]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=655</guid>
		<description><![CDATA[Starting with January many I had many complaints from customers  regarding legitimate mail marked as SPAM hosted on Plesk/SpamGuardian machines.
After a small investigation I&#8217;ve found the problems were from SpamAssassin&#8217;s FH_DATE_PAST_20XX rule bug that caused mails to receive a high score if date is past 2010-01-01.
http://wiki.apache.org/spamassassin/Rules/FH_DATE_PAST_20XX
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5852
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6269
I didn&#8217;t wanted to run sa-update, so I&#8217;ve created [...]]]></description>
			<content:encoded><![CDATA[<p>Starting with January many I had many complaints from customers  regarding legitimate mail marked as SPAM hosted on Plesk/SpamGuardian machines.</p>
<p>After a small investigation I&#8217;ve found the problems were from SpamAssassin&#8217;s FH_DATE_PAST_20XX rule bug that caused mails to receive a high score if date is past 2010-01-01.</p>
<p><a href="http://wiki.apache.org/spamassassin/Rules/FH_DATE_PAST_20XX">http://wiki.apache.org/spamassassin/Rules/FH_DATE_PAST_20XX</a><br />
<a href="https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5852">https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5852</a><br />
<a href="https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6269">https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6269</a></p>
<p>I didn&#8217;t wanted to run sa-update, so I&#8217;ve created a config file to ignore this rule (I do love stability, so I&#8217;m more conservative <img src='http://www.cherpec.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>apollo ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /etc/mail/spamassassin/fh_date_past_20xx_fix.cf</span>
<span style="color: #666666; font-style: italic;"># https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6269</span>
score FH_DATE_PAST_20XX <span style="color: #000000;">0.0</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2010/02/spamassassin-fh_date_past_20xx-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4PSA SpamGuardian, Plesk 9 and syntax error near unexpected token &#8216;&gt;&gt;&#8217;</title>
		<link>http://www.cherpec.com/2009/04/4psa-spamguardian-plesk-9-and-syntax-error-near-unexpected-token/</link>
		<comments>http://www.cherpec.com/2009/04/4psa-spamguardian-plesk-9-and-syntax-error-near-unexpected-token/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 09:20:40 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[4psa]]></category>
		<category><![CDATA[centos 5]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[SpamGuardian]]></category>
		<category><![CDATA[syntax error]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=267</guid>
		<description><![CDATA[After Plesk upgrade we had to upgrade SpamGuardian too, but the scripts from the rpm contains syntax errors and the package can&#8217;t be installed:

&#91;root@andromeda tmp&#93;# rpm -Uvh --force 4psa-sguardian-psa9-3.5.0-090305.01.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:4psa-sguardian-psa9 ########################################### [100%]
/var/tmp/rpm-tmp.42581: line 315: syntax error near unexpected token `&#62;&#62;'
/var/tmp/rpm-tmp.42581: line 315: ` echo &#62;&#62; &#62;&#62; /etc/sguardian/sguardian.conf'

The solution is to install the rpm without [...]]]></description>
			<content:encoded><![CDATA[<p>After Plesk upgrade we had to upgrade <a href="http://www.4psa.com">SpamGuardian</a> too, but the scripts from the rpm contains syntax errors and the package can&#8217;t be installed:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>andromeda tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># rpm -Uvh --force 4psa-sguardian-psa9-3.5.0-090305.01.rhel5.i386.rpm</span>
Preparing... <span style="color: #666666; font-style: italic;">########################################### [100%]</span>
<span style="color: #000000;">1</span>:4psa-sguardian-psa9 <span style="color: #666666; font-style: italic;">########################################### [100%]</span>
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>rpm-tmp.42581: line <span style="color: #000000;">315</span>: syntax error near unexpected token <span style="color: #000000; font-weight: bold;">`&gt;&gt;</span><span style="color: #ff0000;">'
/var/tmp/rpm-tmp.42581: line 315: ` echo &gt;&gt; &gt;&gt; /etc/sguardian/sguardian.conf'</span></pre></div></div>

<p>The solution is to install the rpm without running PRE/POST install scripts:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>andromeda tmp<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># rpm -Uvh --force --noscripts 4psa-sguardian-psa9-3.5.0-090305.01.rhel5.i386.rpm</span></pre></div></div>

<p>Then we can extract scripts with mc (midnight commander), or rpm -qp &#8211;scripts
<package> and run them separately after correcting the syntax errors (comment lines containing &#8220;>> >>&#8221; string):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>andromeda scripts<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sh PREIN </span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>andromeda scripts<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># sh POSTIN </span>
===<span style="color: #000000; font-weight: bold;">&gt;</span> Installing 4PSA Spam Guardian
&nbsp;
===<span style="color: #000000; font-weight: bold;">&gt;</span> Regenerating Mail files
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mailsrv_conf_init... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_mailbox_restore... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mailsrv_entities_dump... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_auth_dump... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mailman_lists_dump... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_responder_restore... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_drweb_restore... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_kav_restore... not exsists
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_spf_restore... ok
==<span style="color: #000000; font-weight: bold;">&gt;</span> Checking <span style="color: #000000; font-weight: bold;">for</span>: mail_dk_restore... ok
Success
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2009/04/4psa-spamguardian-plesk-9-and-syntax-error-near-unexpected-token/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Munpack &#8211; File size limit exceeded</title>
		<link>http://www.cherpec.com/2009/04/munpack-file-size-limit-exceeded/</link>
		<comments>http://www.cherpec.com/2009/04/munpack-file-size-limit-exceeded/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 14:06:19 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[lfs]]></category>
		<category><![CDATA[mpack]]></category>
		<category><![CDATA[munpack]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[ulimit]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=219</guid>
		<description><![CDATA[We alreay know how to extract files from Plesk backup with mpack, but if you do receive &#8220;File size limit exceeded&#8221; error, it can be from the following reasons:

Your file system doesn&#8217;t have LFS (large file support) support
OS limits (limits on the system resources imposed by your administrator)
mpack is not compiled with LFS

Check that your [...]]]></description>
			<content:encoded><![CDATA[<p>We alreay know <a href="http://www.cherpec.com/2008/07/plesk-830-extract-files-from-backup/">how to extract files from Plesk backup</a> with <strong>mpack</strong>, but if you do receive &#8220;File size limit exceeded&#8221; error, it can be from the following reasons:</p>
<ul>
<li>Your file system doesn&#8217;t have LFS (large file support) support</li>
<li>OS limits (limits on the system resources imposed by your administrator)</li>
<li><strong>mpack</strong> is not compiled with LFS</li>
</ul>
<p>Check that your filesystem supports files bigger than 2GB (create a test file with &#8220;dd&#8221; command).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">if</span></span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=test.bin <span style="color: #007800;">bs</span>=1G <span style="color: #007800;">count</span>=<span style="color: #000000;">3</span> <span style="color: #666666; font-style: italic;"># create 3GB file</span></pre></div></div>

<p>Then check your file size limits  with <strong>ulimit</strong> command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">ulimit</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'^file size'</span>
<span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #c20cb9; font-weight: bold;">size</span>               <span style="color: #7a0874; font-weight: bold;">&#40;</span>blocks, -f<span style="color: #7a0874; font-weight: bold;">&#41;</span> unlimited</pre></div></div>

<p>You can adjust limits from /etc/security/limits.conf, read file comments on how to do it, or read this article:<br />
<a href="http://www.cyberciti.biz/faq/file-size-limit-exceeded-error-under-linux-and-solution/">http://www.cyberciti.biz/faq/file-size-limit-exceeded-error-under-linux-and-solution/</a></p>
<p>If none above limits you, then the problems comes from <strong>mpack</strong>,  it doesn&#8217;t have suport for large files (>2GB). </p>
<p>The guys from the Plesk recommends to <strong>grep</strong> the backup file, to find begin and end of the file in archive:<br />
<a href="http://kb.parallels.com/en/1757">http://kb.parallels.com/en/1757</a></p>
<p>This solutions is not appropriate for large backup files, we&#8217;ll just recompile <strong>mpack</strong> to support large files.</p>
<p>Grab <strong>mpack</strong>&#8217;s RPM source from the <a href="http://dag.wieers.com/">Dag</a>&#8217;s repository<br />
<a href="http://dag.wieers.com/rpm/packages/mpack/mpack-1.6-2.rf.src.rpm">http://dag.wieers.com/rpm/packages/mpack/mpack-1.6-2.rf.src.rpm</a></p>
<p>install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ rpm <span style="color: #660033;">-ivh</span> mpack-<span style="color: #000000;">1.6</span>-2.rf.src.rpm
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Then modify <strong>mpack.spec</strong> and add the following code after &#8220;%build&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-D_FILE_OFFSET_BITS=64&quot;</span></pre></div></div>

<p>Then rebuild the package and install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> rpm <span style="color: #660033;">-ba</span> mpack.spec
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>vitalie<span style="color: #000000; font-weight: bold;">@</span>silver ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> rpm <span style="color: #660033;">-Uvh</span> <span style="color: #660033;">--force</span> mpack-<span style="color: #000000;">1.6</span>-3.rf.i386.rpm
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>References:</p>
<ul>
<li><a href="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-pam_limits.html">Linux PAM</a></li>
<li><a href="http://jperalta.wordpress.com/2006/10/19/using-lfs/">jperalta.wordpress.com</a></li>
<li><a href="http://www.cyberciti.biz/faq/file-size-limit-exceeded-error-under-linux-and-solution/">www.cyberciti.biz</a>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2009/04/munpack-file-size-limit-exceeded/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>This site may harm your computer</title>
		<link>http://www.cherpec.com/2009/03/this-site-may-harm-your-computer/</link>
		<comments>http://www.cherpec.com/2009/03/this-site-may-harm-your-computer/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 12:40:00 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[badware]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[geoip]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[malicious]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=172</guid>
		<description><![CDATA[  Today the website of one of the clients was blacklisted by Google by containing malicious software that downloads and installs without user&#8217;s consent. Google displayed &#8220;This site may harm your computer&#8221; under website in the results page.
Analyzing site&#8217;s sources we found obfuscated JavaScript code inserted near body, html tags in .html, .php, .tpl [...]]]></description>
			<content:encoded><![CDATA[<p>  Today the website of one of the clients was blacklisted by Google by containing malicious software that downloads and installs without user&#8217;s consent. Google displayed &#8220;This site may harm your computer&#8221; under website in the results page.</p>
<p>Analyzing site&#8217;s sources we found obfuscated JavaScript code inserted near <strong>body</strong>, <strong>html</strong> tags in <strong>.html</strong>, <strong>.php</strong>, <strong>.tpl</strong> files and a <strong>.htaccess</strong> file with following content:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">RewriteEngine On
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>google.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC,OR<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>aol.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC,OR<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>msn.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC,OR<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>yahoo.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC,OR<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>yandex.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC,OR<span style="color: #7a0874; font-weight: bold;">&#93;</span>^M
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>rambler.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC,OR<span style="color: #7a0874; font-weight: bold;">&#93;</span>^M
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_REFERER<span style="color: #7a0874; font-weight: bold;">&#125;</span> .<span style="color: #000000; font-weight: bold;">*</span>ya.<span style="color: #000000; font-weight: bold;">*</span>$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteRule .<span style="color: #000000; font-weight: bold;">*</span> http:<span style="color: #000000; font-weight: bold;">//</span>real-antispyware.info<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>go.php?<span style="color: #007800;">sid</span>=<span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>R,L<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Hmm, visitors from search engines were redirected to real-antispyware.info. This website is a scam that shows some JavaScript animation fulling the user with a message that his computer is infected and prompts him to download and install a fake AntiVirus.</p>
<p>Analyzing IP addresses from ftp logs we found connections from Russia and China that altered client&#8217;s website. Somehow they got user&#8217;s ftp password (it can be done in so many ways: weak password, traffic sniffing, virus, keylogger, trojan, &#8230;) and they altered website files.  </p>
<p>You can use this simple Ruby script to analyze your ftp logs. By default it is configured for a Plesk server, and it will show suspicious lines (change IGNORE variables to fit your needs). You may need to install <a href="http://www.cherpec.com/2008/07/install-rubygems-on-centos-4/">rubygems</a> and <a href="http://geoip.rubyforge.org/">geoip</a> gem.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'geoip'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'zlib'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># hide logs from these countries</span>
<span style="color:#008000; font-style:italic;"># Example: RO US</span>
IGNORE_COUNTRIES = <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#123;</span>RO US<span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#008000; font-style:italic;"># free geoip database is not 100% accurate</span>
<span style="color:#008000; font-style:italic;"># we may need to ignore a few ip addresses</span>
IGNORE_IP = <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#123;</span>127.0.0.1 127.0.0.2<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
files = <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;/usr/local/psa/var/log/xferlog*&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
geoip = GeoIP.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'/var/lib/GeoIP/GeoIP.dat'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> ip2country<span style="color:#006600; font-weight:bold;">&#40;</span>geoip, ip<span style="color:#006600; font-weight:bold;">&#41;</span>
  country = geoip.<span style="color:#9900CC;">country</span><span style="color:#006600; font-weight:bold;">&#40;</span>ip<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">3</span><span style="color:#006600; font-weight:bold;">&#93;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
ip_list = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
files.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>filename<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&quot;</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Processing #{filename} ...&quot;</span>
&nbsp;
  <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>filename<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
    input = f
    input = <span style="color:#6666ff; font-weight:bold;">Zlib::GzipReader</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>f<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">extname</span><span style="color:#006600; font-weight:bold;">&#40;</span>filename<span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#996600;">&quot;.gz&quot;</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">while</span> line = input.<span style="color:#CC0066; font-weight:bold;">gets</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      ip = line.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\s<span style="color:#006600; font-weight:bold;">+/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">6</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
      <span style="color:#9966CC; font-weight:bold;">unless</span> ip_list.<span style="color:#9966CC; font-weight:bold;">include</span>? ip
        country = ip2country<span style="color:#006600; font-weight:bold;">&#40;</span>geoip, ip<span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">unless</span> IGNORE_COUNTRIES.<span style="color:#9966CC; font-weight:bold;">include</span>? country.<span style="color:#9900CC;">upcase</span> <span style="color:#9966CC; font-weight:bold;">or</span> IGNORE_IP.<span style="color:#9966CC; font-weight:bold;">include</span>? ip
          <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot; [#{country} : #{ip}] =&gt; #{line}&quot;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
        ip_list <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> ip
      <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Steps that needs to followed: </p>
<ol>
<li>Change FTP password</li>
<li>Upload a clean copy from the backups of the website</li>
<li>Submit the website in the <a href="http://www.google.com/webmasters/">Webmaster&#8217;s Tools</a> for reconsideration</li>
<li>Audit your company security: computers, firewalls, antiviruses, software, &#8230;</li>
</ol>
<p>You may find useful diagnose tool from the <a href="http://www.google.com">Google</a> (replace example.com with your domain):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">http:<span style="color: #000000; font-weight: bold;">//</span>www.google.com<span style="color: #000000; font-weight: bold;">/</span>safebrowsing<span style="color: #000000; font-weight: bold;">/</span>diagnostic?<span style="color: #007800;">site</span>=http:<span style="color: #000000; font-weight: bold;">//</span>example.com</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2009/03/this-site-may-harm-your-computer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plesk alternative port for relaying</title>
		<link>http://www.cherpec.com/2009/02/plesk-alternative-port-for-relaying/</link>
		<comments>http://www.cherpec.com/2009/02/plesk-alternative-port-for-relaying/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 14:32:11 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[RBL]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[xinetd]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=122</guid>
		<description><![CDATA[SMTP stands for Simple Mail Transfer Protocol, it was designed a long time ago when the Internet was a peaceful place. Today we are facing new challenges, so there should be new solutions. 
One of the problem is SPAM messages, spammers are keeping to bombard us everyday with junk mails. We did invented black/white list [...]]]></description>
			<content:encoded><![CDATA[<p><strong>SMTP</strong> stands for <em>Simple Mail Transfer Protocol</em>, it was designed a long time ago when the Internet was a peaceful place. Today we are facing new challenges, so there should be new solutions. </p>
<p>One of the problem is SPAM messages, spammers are keeping to bombard us everyday with junk mails. We did invented black/white list to protect us from them. </p>
<p>If your clients are connecting from an ip address that&#8217;s listed in <strong>RBL lists</strong> (it&#8217;s not uncommon for ISPs that are using dynamic ip addresses) they can&#8217;t send messages through your server if you are using RBLs.</p>
<p>Disabling RBLs checks it&#8217;s not an option, we&#8217;ll configure an alternative port for relaying on port 1025 for the clients listed in RBLs.</p>
<p>You can just copy your smtp_psa file and customize it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xinetd.d<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> smtp_psa smtp_alt_psa
<span style="color: #c20cb9; font-weight: bold;">vim</span> smtp_alt_psa</pre></div></div>

<p>You need to change service name from smtp to smtp-alt and remove <strong>rblsmptd</strong> command  and it&#8217;s <strong>-r</strong> parameters, finally it should something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/xinetd.d/smtp_alt_psa</span>
service smtp-alt
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
        socket_type     = stream
        protocol        = tcp
        <span style="color: #7a0874; font-weight: bold;">wait</span>            = no
        disable         = no
        user            = root
        instances       = UNLIMITED
        server          = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>tcp-env
        server_args     = <span style="color: #660033;">-Rt0</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>relaylock <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>qmail-smtpd <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>smtp_auth <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>cmd5checkpw <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>qmail<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Append the new service to /etc/services:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">smtp-alt        <span style="color: #000000;">1025</span><span style="color: #000000; font-weight: bold;">/</span>tcp        
smtp-alt        <span style="color: #000000;">1025</span><span style="color: #000000; font-weight: bold;">/</span>udp</pre></div></div>

<p>And restart the xinetd service:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>sirius xinetd.d<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/xinetd restart</span>
Stopping xinetd:                                           <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
Starting xinetd:                                           <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Verify your configuration with telnet command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>sirius xinetd.d<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># telnet localhost 1025</span>
Trying 127.0.0.1...
Connected to localhost.localdomain <span style="color: #7a0874; font-weight: bold;">&#40;</span>127.0.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span>.
Escape character is <span style="color: #ff0000;">'^]'</span>.
<span style="color: #000000;">220</span> sirius.example.net ESMTP
&nbsp;
<span style="color: #666666; font-style: italic;"># Ctr+] and quit to exit telnet</span></pre></div></div>

</pre>
<p>Now, instruct your clients to change port in SMTP settings from 25 to 1025, they will be able to send mails through your server even you are using RBL lists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2009/02/plesk-alternative-port-for-relaying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plesk rebuild Apache configuration files</title>
		<link>http://www.cherpec.com/2009/01/plesk-rebuild-apache-configuration-files/</link>
		<comments>http://www.cherpec.com/2009/01/plesk-rebuild-apache-configuration-files/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 11:37:51 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[rebuild]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=83</guid>
		<description><![CDATA[Sometimes you need to rebuild all your httpd.include files, it can be done with websrvmng command:

/usr/local/psa/admin/bin/websrvmng -av

]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to rebuild all your <strong>httpd.include</strong> files, it can be done with <strong>websrvmng</strong> command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>admin<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>websrvmng <span style="color: #660033;">-av</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2009/01/plesk-rebuild-apache-configuration-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bind restricting recursion</title>
		<link>http://www.cherpec.com/2008/12/bind-restricting-recursion/</link>
		<comments>http://www.cherpec.com/2008/12/bind-restricting-recursion/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 09:24:11 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[named]]></category>
		<category><![CDATA[recursion]]></category>
		<category><![CDATA[recursive]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=38</guid>
		<description><![CDATA[If your server allows recursive queries it can be exploited by malicious users. It should be restricted only to ip addresses from your local nets. 
To accomplish this, edit your /etc/named.conf and specify in &#8220;options&#8221; section which ACL are allowed to run recursive queries with allow-recursion option:

# /etc/named.conf
acl localnets &#123; 127.0.0.1; 192.168.0.0/24; &#125;;
&#160;
options &#123;
...
allow-recursion &#123; [...]]]></description>
			<content:encoded><![CDATA[<p>If your server allows recursive queries it can be exploited by malicious users. It should be restricted only to ip addresses from your local nets. </p>
<p>To accomplish this, edit your /etc/named.conf and specify in &#8220;options&#8221; section which ACL are allowed to run recursive queries with <strong>allow-recursion</strong> option:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/named.conf</span>
acl localnets <span style="color: #7a0874; font-weight: bold;">&#123;</span> 127.0.0.1; 192.168.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
options <span style="color: #7a0874; font-weight: bold;">&#123;</span>
...
allow-recursion <span style="color: #7a0874; font-weight: bold;">&#123;</span> localnets; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
...
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>then restart <strong>bind</strong> server:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span><span style="color: #c20cb9; font-weight: bold;">red</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /etc/init.d/named restart</span>
Stopping named: .                     <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
Starting named:                       <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>In <strong>Plesk</strong> it can be done from the Control Panel:<br />
Server->DNS Settings->DNS Preferences->Allow recursion<br />
and choose localhost or localnets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/12/bind-restricting-recursion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto enable antivirus for all accounts in Plesk</title>
		<link>http://www.cherpec.com/2008/10/howto-enable-antivirus-for-all-accounts-in-plesk/</link>
		<comments>http://www.cherpec.com/2008/10/howto-enable-antivirus-for-all-accounts-in-plesk/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 18:52:44 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[AntiVirus]]></category>
		<category><![CDATA[Dr.Web]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=22</guid>
		<description><![CDATA[To enable AntiVirus for all accounts in Plesk you can use the following script:

#!/bin/bash
&#160;
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa&#60;&#60;-EOT
UPDATE mail 
  SET virusfilter = 'any'
  WHERE postbox = 'true' AND virusfilter != 'any'
EOT

You can  run it daily from the cron to keep your mailboxes protected.
]]></description>
			<content:encoded><![CDATA[<p>To enable AntiVirus for all accounts in <strong>Plesk</strong> you can use the following script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
mysql <span style="color: #660033;">-uadmin</span> -p<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>.psa.shadow<span style="color: #000000; font-weight: bold;">`</span> psa<span style="color: #cc0000; font-style: italic;">&lt;&lt;-EOT
UPDATE mail 
  SET virusfilter = 'any'
  WHERE postbox = 'true' AND virusfilter != 'any'
EOT</span></pre></div></div>

<p>You can  run it daily from the <strong>cron</strong> to keep your mailboxes protected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/10/howto-enable-antivirus-for-all-accounts-in-plesk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Plesk password recovery</title>
		<link>http://www.cherpec.com/2008/08/plesk-password-recovery/</link>
		<comments>http://www.cherpec.com/2008/08/plesk-password-recovery/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 15:57:21 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[password recovery]]></category>
		<category><![CDATA[psa]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=18</guid>
		<description><![CDATA[If you forgot your admin password in Plesk, you&#8217;ll need to connect to your server with ssh and you can find the password in the file /etc/psa/.psa.shadow .

&#91;root@apollo ~&#93;# cat /etc/psa/.psa.shadow
&#60;admin_pass&#62;

To find mailbox&#8217;s password in Plesk, connect to your server with ssh, then use the following SQL query to reveal mailbox password (replace MAILBOX_NAME with [...]]]></description>
			<content:encoded><![CDATA[<p>If you forgot your admin password in Plesk, you&#8217;ll need to connect to your server with ssh and you can find the password in the file /etc/psa/.psa.shadow .</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>apollo ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /etc/psa/.psa.shadow</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>admin_pass<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>To find mailbox&#8217;s password in Plesk, connect to your server with ssh, then use the following SQL query to reveal mailbox password (replace MAILBOX_NAME with your mailbox name):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>apollo ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mysql -u admin -p`cat /etc/psa/.psa.shadow` psa</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...<span style="color: #7a0874; font-weight: bold;">&#93;</span>
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> SELECT m.mail_name, d.name, a.password FROM mail AS m LEFT JOIN <span style="color: #7a0874; font-weight: bold;">&#40;</span>domains AS d, accounts AS a<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
ON <span style="color: #7a0874; font-weight: bold;">&#40;</span>m.dom_id = d.id AND m.account_id = a.id<span style="color: #7a0874; font-weight: bold;">&#41;</span> WHERE m.mail_name=<span style="color: #ff0000;">'MAILBOX_NAME'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/08/plesk-password-recovery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using squirrelmail in Plesk</title>
		<link>http://www.cherpec.com/2008/08/using-squirrelmail-in-plesk/</link>
		<comments>http://www.cherpec.com/2008/08/using-squirrelmail-in-plesk/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 18:22:08 +0000</pubDate>
		<dc:creator>Vitalie Cherpec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[plesk 8.3]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[squirrelmail]]></category>
		<category><![CDATA[webmail]]></category>

		<guid isPermaLink="false">http://www.cherpec.com/?p=17</guid>
		<description><![CDATA[Configuring apache for squirrelmail following  this tutorial is not enough. You&#8217;ll need to configure squirrelmail too. Edit your /etc/squirrelmail/config_local.php file and paste the following configuration:

// courier-imap settings
$imap_server_type       = 'courier';
$default_folder_prefix  = 'INBOX.';
$trash_folder           = 'Trash';
$sent_folder     [...]]]></description>
			<content:encoded><![CDATA[<p>Configuring apache for <strong>squirrelmail</strong> following  this <a href="http://kb.parallels.com/en/1775">tutorial</a> is not enough. You&#8217;ll need to configure squirrelmail too. Edit your /etc/squirrelmail/config_local.php file and paste the following configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// courier-imap settings</span>
<span style="color: #000088;">$imap_server_type</span>       <span style="color: #339933;">=</span> <span style="color: #0000ff;">'courier'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$default_folder_prefix</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'INBOX.'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$trash_folder</span>           <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Trash'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sent_folder</span>            <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Sent'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$draft_folder</span>           <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Drafts'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$show_prefix_option</span>     <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$default_sub_of_inbox</span>   <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$show_contain_subfolders_option</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$optional_delimiter</span>     <span style="color: #339933;">=</span> <span style="color: #0000ff;">'.'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$delete_folder</span>          <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$force_username_lowercase</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// other settings</span>
<span style="color: #000088;">$default_charset</span>        <span style="color: #339933;">=</span> <span style="color: #0000ff;">'iso-8859-1'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lossy_encoding</span>         <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sendmail_args</span>          <span style="color: #339933;">=</span> <span style="color: #0000ff;">'-i -t'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$encode_header_key</span>      <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$hide_auth_header</span>       <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$plugins</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'filters'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$abook_global_file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$abook_global_file_writeable</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$addrbook_global_dsn</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$addrbook_global_table</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'global_abook'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$addrbook_global_writeable</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$addrbook_global_listing</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cherpec.com/2008/08/using-squirrelmail-in-plesk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
