<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<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/"
>

<channel>
	<title>fdiv.net</title>
	<link>http://fdiv.net</link>
	<description>the floating point divide</description>
	<pubDate>Sun, 14 Sep 2008 01:21:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>qmail setup, 2006.10.20</title>
		<link>http://fdiv.net/server/qmail-setup-20061020/</link>
		<comments>http://fdiv.net/server/qmail-setup-20061020/#comments</comments>
		<pubDate>Sat, 21 Oct 2006 14:06:39 +0000</pubDate>
		<dc:creator>bbinkovitz</dc:creator>
		
	<category>Uncategorized</category>
		<guid>http://fdiv.net/server/qmail-setup-20061020/</guid>
		<description><![CDATA[	Here&#8217;s the path I took to install http://www.qmailrocks.org/ on fedora core 5 x86_64 running on an Athlon 64.
	
	 pre-install
	
	 yum install php-imap

	 yum install php-mysql

	 cpan Digest::SHA1

	 cpan Digest::HMAC

	 cpan Net::DNS

	 cpan Time::HiRes

	 cpan HTML::Tagset

	 cpan HTML::Parser

	
	
	 downloaded, compiled, etc. according to the qmailrocks redhat howto with the following exceptions:
	
	 skipped installing the autoresponder &#8212; [...]]]></description>
			<content:encoded><![CDATA[	<p>Here&#8217;s the path I took to install <a href="http://www.qmailrocks.org/">http://www.qmailrocks.org/</a> on <a href="http://fedora.redhat.com/">fedora core 5</a> x86_64 running on an Athlon 64.</p>
	<ul>
	<li> pre-install
	<ul>
	<li> yum install php-imap
</li>
	<li> yum install php-mysql
</li>
	<li> cpan Digest::SHA1
</li>
	<li> cpan Digest::HMAC
</li>
	<li> cpan Net::DNS
</li>
	<li> cpan Time::HiRes
</li>
	<li> cpan HTML::Tagset
</li>
	<li> cpan HTML::Parser
</li>
	</ul>
	</li>
	<li> downloaded, compiled, etc. according to the <a href="http://www.qmailrocks.org/install_rh.htm">qmailrocks redhat howto</a> with the following exceptions:
	<ul>
	<li> skipped installing the autoresponder &#8212; we don&#8217;t want any autoresponder functionality.
</li>
	<li> installed vpopmail WITH mysql integration.
</li>
	<li> mysql integration failed with some compilation errors.  It looks like this is a 64-bit compatibility issue &#8212; it seems to be trying to link against 32-bit libraries and the ld line is failing.  I don&#8217;t have time to troubleshoot this now.
</li>
	<li> went back and installed autoresponder because it was required for another install.  Sigh.
</li>
	<li> skipped vqadmin because it gave us inscrutable compile errors and wouldn&#8217;t install.
</li>
	</ul>
	</li>
	<li> tested SMTP with no problems
</li>
	<li> Post-install add-ons
	<ul>
	<li> Clam Antivirus
	<ul>
	<li> Clam is not installing properly due to dependency conflicts. Upon further investigation, certain perl modules were missing. ran:
	<ul>
	<li> cpan Time::HiRes &#8212; for some reason this did an install when i ran it this time, although earlier it had said it was UTD.
</li>
	<li> cpan The Pod::Usage
</li>
	<li> cpan Parse::Syslog
</li>
	<li> cpan Statistics::Distributions
</li>
	</ul>
	</li>
	<li> Clam is now not able to install because the qmailrocks RPMs won&#8217;t work on the 64-bit processor, so i&#8217;m yumming them.
	<ul>
	<li> yum install perl-suidperl
</li>
	<li> yum install clamav clamav-milter clamav-server clamav-update
</li>
	</ul>
	</li>
	<li> <a href="/server/qmail-setup-20061020/clam-readme/">ClamReadMe</a>
	<ul>
	<li> [root@leikata etc]# mv /etc/clamd.conf /etc/clamd.d/softpixel.conf
</li>
	<li> [root@leikata etc]# ln -s /etc/clamd.d/softpixel.conf /etc/clamd.conf
</li>
	<li> replaced all &#8220;&lt;SERVICE&gt;&#8221; tags with &#8220;softpixel&#8221; (also removing brackets) in the clamd.conf file.
</li>
	<li> [root@leikata template]# mv clamd.logrotate /etc/logrotate.d
</li>
	<li> replaced all &#8220;&lt;SERVICE&gt;&#8221; tags with &#8220;softpixel&#8221; (also removing brackets) in the clamd.logrotate
</li>
	<li> [root@leikata clamd.d]# mkdir /var/log/clamav/
</li>
	<li> [root@leikata clamd.d]# touch /var/log/clamav/clamd.softpixel
</li>
	<li> [root@leikata clamd.d]# chgrp qscand /var/log/clamav/clamd.softpixel
</li>
	<li> [root@leikata clamd.d]# chmod 0620 /var/log/clamav/clamd.softpixel
</li>
	</ul>
	</li>
	<li> Setting the updater:
	<ul>
	<li> [root@leikata clamav]# touch /var/log/clamav/clam-update.log
</li>
	<li> [root@leikata clamav]# chmod 775 /var/log/clamav/clam-update.log
</li>
	<li> [root@leikata clamav]# chown qscand:qscand /var/log/clamav/clam-update.log
</li>
	<li> [root@leikata log]# chown qscand:qscand -R /var/lib/clamav
</li>
	<li> [root@leikata log]# /usr/bin/freshclam -l /var/log/clamav/clam-update.log
</li>
	<li> it updated.
</li>
	</ul>
	</li>
	</ul>
	</li>
	<li> SpamAssasin
	<ul>
	<li> cpan Mail::SpamAssassin
</li>
	<li> <a href="/server/qmail-setup-20061020/varlogmaillog-qmailscanner-error/">/var/log/maillog qmail-scanner error and troubleshooting</a>
</li>
	</ul>
	</li>
	<li> Qmail Scanner
	<ul>
	<li> [root@leikata qlogtools-3.1]# vi /usr/local/qmailanalog/bin/zfailures &lt;&#8211; replaced the &#8220;sort +2&#8243; pipe with &#8220;sort -n -r -k 2&#8243; &#8212; the version of sort included with fedora doesn&#8217;t support the &#8220;+2&#8243; syntax.
</li>
	<li> [root@leikata qlogtools-3.1]# vi /usr/local/qmailanalog/bin/zdeferrals &lt;&#8211; replaced the &#8220;sort +2&#8243; pipe with &#8220;sort -n -r -k 2&#8243;
</li>
	</ul>
	</li>
	</ul>
	</li>
	</ul>
	<p>After this, we discovered clamd wasn&#8217;t starting properly at boot-time.  SELinux was bitching:</p>
	<div class="code"><code>kernel: audit(1161390036.976:4): avc:  denied  { search } for  pid=2356 comm="clamd.softpixel" scontext=system_u:system_r:clamd_t:s0 tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir<br />
kernel: audit(1161390036.976:5): avc:  denied  { search } for  pid=2356 comm="clamd.softpixel" name="sys" dev=proc ino=4026531867 scontext=system_u:system_r:clamd_t:s0 tcontext=system_u:object_r:sysctl_t:s0 tclass=dir<br />
kernel: audit(1161390037.268:6): avc:  denied  { append } for  pid=2356 comm="clamd.softpixel" name="clamd.softpixel" dev=dm-0 ino=2851961 scontext=system_u:system_r:clamd_t:s0 tcontext=root:object_r:var_log_t:s0 tclass=file<br />
kernel: audit(1161390037.272:7): avc:  denied  { sys_tty_config } for  pid=2356 comm="clamd.softpixel" capability=26 scontext=system_u:system_r:clamd_t:s0 tcontext=system_u:system_r:clamd_t:s0 tclass=capability<br />
</code></div>
	<p>Clamd started happily when we disabled SELinux protection for it:</p>
	<ul>
	<li>in system-config-securitylevel, under SELinux / Modify SELinux Policy, I checked:
	<ul>
	<li>Other / clamscan_disable_trans</li>
	<li>SELinux Service Protection / Disable SELinux protection for clamd daemon</li>
	</ul>
	</li>
	</ul>
	<p>Of course, I first tried to create a new policy allowing exactly what clamd was needing (which would be way preferable to disabling SELinux), but I got the following error&#8230;</p>
	<div class="code"><code># audit2allow -M local -l -i aud<br />
[root@leikata ~]# semodule -i local.pp<br />
libsepol.permission_copy_callback: Module local depends on permission search in class file, not satisfied<br />
libsemanage.semanage_link_sandbox: Link packages failed<br />
semodule:  Failed!<br />
</code></div>
	<p>&#8230; and haven&#8217;t been able to figure this out yet.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://fdiv.net/server/qmail-setup-20061020/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
