<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>Parallels knowledgebase (KB)</title>
<link>http://kb.parallels.com/</link>
<description>Parallels knowledgebase (KB)</description>
<language>en</language>
<copyright>Copyright 2008 Parallels</copyright>
<pubDate>Wed, 10 Sep 2008 00:00:00 +0600</pubDate>
<lastBuildDate>Wed, 10 Sep 2008 00:00:00 +0600</lastBuildDate>
<webMaster>rt-team@parallels.com</webMaster>

<item>
<title><![CDATA[Parallels Plesk Panel uses patched Qmail. How do I compile Qmail with my own patches?]]></title>
<link>http://kb.parallels.com/en/1161</link>
<description><![CDATA[<div id="article">
	




	<div id="kb" class="kb">
		<div class="article-container">
			<h2 class="title">Parallels Plesk Panel uses patched Qmail. How do I compile Qmail with my own patches?</h2>
			<div class="ab-frame"><div class="bl"><div class="br"><div class="tl"><div class="tr"><!-- frame -->
				<div class="articleProperty">
					<div>Article ID: 1161&nbsp;</div>
					<div>Last Review: May,5 2009</div>
					<tr>
						<td>Author: </td>
						<td>Bezborodova Anastasiya</td>
					</tr>
					<br/>
					<tr>
						<td>Last updated by: </td>
						<td>Bezborodova Anastasiya</td>
					</tr>
					<strong>APPLIES TO:</strong>
					<div class="articleApplies">
						<ul>
							<li>Plesk 8.x for Linux/Unix</li>
							<li>Plesk 9.x for Linux/Unix</li>
						</ul>
					</div>
				</div><!-- articleProperty -->
			</div></div></div></div></div><!-- frame -->

			<div class="article-internal-flag"></div>

			<div id="article-content">
				<div class="article-part">
					<h2>Resolution</h2>
					You should download Qmail sources, for example from http://qmail.org/, apply Plesk patches which are attached to this article, apply your own patches and compile Qmail. Here the steps that should be done:<br /><br /> <ol> <li>Review your custom patches and Plesk patches to find out what custom patch changes and when it should be applied: before Plesk patches or after them or in the middle before/after some specific patch.<br /><strong> NOTE:</strong> for Plesk 8.3 and above qmail patches should be applied in alphabetical order. For Plesk 8.2 first apply all <span style='font-family: courier new,courier;font-size: 12px;'>patch*</span> files, and then <span style='font-family: courier new,courier;font-size: 12px;'>fr49-quota-patch</span>, for example:<br /> <div class="commandline"><code># cd qmail-1.03<br /> # for patch in ../patches/patch* ; do patch -p0 &lt; $patch ; done<br /> # patch -p0 &lt; ../patches/fr49-quota-patch</code></div></li> <br /> <li>Change <span style='font-family: courier new,courier;font-size: 12px;'>conf-users</span> and <span style='font-family: courier new,courier;font-size: 12px;'>conf-groups</span> files to match changes applied in <span style='font-family: courier new,courier;font-size: 12px;'>patch-pe</span> and <span style='font-family: courier new,courier;font-size: 12px;'>patch-pf</span> patches. Those files should contain records in format '<strong>groupname GID</strong>' or '<strong>username UID</strong>'. Below are the commands that will put correct records into these files.<br /><strong> NOTE:</strong> these commands should be ran on system where qmail is already installed, i.e. where Plesk is already installed.<br /><div class="commandline"><code># grep -E '^(qmail|alias)' /etc/passwd | awk 'BEGIN {FS=&quot;:&quot;; OFS=&quot; &quot;;} {if ($1 == &quot;qmaill&quot;) {print $1,$3,&quot;\nroot 0&quot;} else {print $1,$3}}' &gt; conf-users<br /> # grep -E '^(qmail|nofiles)' /etc/group | awk 'BEGIN {FS=&quot;:&quot;; OFS=&quot; &quot;;} {print $1,$3}' &gt; conf-groups</code></div></li> <br /> <li>Configure linker flags (inside qmail source directory after patches are applied):<br /><div class="commandline"><code># pkg-config --libs openssl &gt; ssl.lib<br /> # echo &quot;/var/qmail&quot; &gt; conf-qmail</code></div></li> <br /> <li>Now you can run <span style='font-family: courier new,courier;font-size: 12px;'>`make`</span>,</li> <br /> <li>After compilation you should NOT overwrite all existing qmail files with new ones, i.e. do not run <span style='font-family: courier new,courier;font-size: 12px;'>`make install`</span>, installed configuration files and init script should remain untouched. Instead, only needed qmail binaries should be replaced with new compiled ones:<br /><br /> <ul> <li>Stop Qmail and DrWeb services from Plesk panel (not from shell!),</li> <li>Stop xinetd(inetd) service from shell,</li> <li>Replace files according to your Plesk version:<br /><strong> For Plesk 8.2:</strong> copy compiled <span style='font-family: courier new,courier;font-size: 12px;'>qmail-queue</span>, <span style='font-family: courier new,courier;font-size: 12px;'>qmail-remote</span>, <span style='font-family: courier new,courier;font-size: 12px;'>qmail-local</span> into Qmail <span style='font-family: courier new,courier;font-size: 12px;'>bin/</span> directory plus make their copies with <span style='font-family: courier new,courier;font-size: 12px;'>.origin</span> suffix, f.e.:<br /><div class="commandline"><code># cp qmail-queue /var/qmail/bin/qmail-queue<br /> # cp qmail-queue /var/qmail/bin/qmail-queue.origin<br /> # cp qmail-local /var/qmail/bin/qmail-local<br /> # cp qmail-local /var/qmail/bin/qmail-local.origin<br /> # cp qmail-remote /var/qmail/bin/qmail-remote<br /> # cp qmail-remote /var/qmail/bin/qmail-remote.origin</code></div><br /><strong> For Plesk 8.3 and above:</strong> copy compiled <span style='font-family: courier new,courier;font-size: 12px;'>qmail-queue</span>, <span style='font-family: courier new,courier;font-size: 12px;'>qmail-remote</span>, <span style='font-family: courier new,courier;font-size: 12px;'>qmail-local</span> into Qmail <span style='font-family: courier new,courier;font-size: 12px;'>bin/</span> directory with <span style='font-family: courier new,courier;font-size: 12px;'>.moved</span> suffix (do NOT replace current files!), f.e.:<br /><div class="commandline"><code># cp qmail-queue /var/qmail/bin/qmail-queue.moved<br /> # cp qmail-local /var/qmail/bin/qmail-local.moved<br /> # cp qmail-remote /var/qmail/bin/qmail-remote.moved</code></div> Do not forget to restore original owners/permissions for the files replaced. Because files owners/permissions may differ on different operating systems we cannot provide exact commands. Before replacing the binaries remember original owners/permissions and restore them afterwards.</li> <li>Start xinetd(inetd) service</li> <li>Start Qmail and DrWeb services.</li> </ul></li> </ol>
				</div>
				<div class="article-part">
					<h2>Additional information</h2>
					<strong>NOTE:</strong> Before starting the recompilation it is recommended to learn original qmail documentation for specification of the recompilation procedure.<br /><br />
				</div>
			</div>
		</div><!-- article-container -->

			<h2>Attachments:</h3>
			<ul class="AttachedFiles">
					<li><a href="http://kb.parallels.com/Attachments/806/Attachments/plesk83_qmail_patches.tgz">plesk83_qmail_patches.tgz</a>(46Kb)</li>
					<li><a href="http://kb.parallels.com/Attachments/806/Attachments/plesk82_qmail_patches.tgz">plesk82_qmail_patches.tgz</a>(53Kb)</li>
					<li><a href="http://kb.parallels.com/Attachments/806/Attachments/plesk84_qmail_patches.tgz">plesk84_qmail_patches.tgz</a>(60Kb)</li>
					<li><a href="http://kb.parallels.com/Attachments/806/Attachments/plesk92_qmail_patches.tgz">plesk92_qmail_patches.tgz</a>(40Kb)</li>
					<li><a href="http://kb.parallels.com/Attachments/806/Attachments/plesk90_qmail_patches.tgz">plesk90_qmail_patches.tgz</a>(39Kb)</li>
					<li><a href="http://kb.parallels.com/Attachments/806/Attachments/plesk86_qmail_patches.tgz">plesk86_qmail_patches.tgz</a>(61Kb)</li>
			</ul>

			<br/><br/>

			<div id="SubscriptionLink24Article" class="subscriptionLink2">
<a href="http://kb.parallels.com/subscriptions/index.html?Type=Article&ArticleID=1161&ArticleLanguage=en&Product=&Category="><img src="http://kb.parallels.com/images/mail.png" width="15" height="15" alt="Subscription for changes to this article"></a>
<a href="http://kb.parallels.com/subscriptions/index.html?Type=Article&ArticleID=1161&ArticleLanguage=en&Product=&Category=">Subscription for changes to this article</a>

<script type="text/javascript">

$(document).ready(function() {
	$('#SubscriptionLink24Article a').each(function(){
		$(this).click(function(event) {
			event.preventDefault();
			MainPageContentHide();
			$('#subscription').html('');
			$.get('/Stuff/Subscription', {
													'Type' : 'Article',
													'ArticleID' : '1161',
													'ArticleLanguage' : 'en',
													'Product' : '',
													'Category' : ''
												}, function(data) {
																	$('#subscription').html(data);
																	$('#subscription').show();
																	SUBbuildsubmenus_product();
																});
		});
	});
});

</script>

</div>





	</div><!-- kb -->

</div><!-- article -->


]]></description>
<author>Bezborodova Anastasiya</author>
<guid isPermaLink="false">806 LastUpdated: 2009-05-05 03:05:09</guid>
<pubDate>2008-10-06 09:11:06</pubDate>
</item>
</channel>
</rss>



