<?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>Katastrophos.net Blog &#187; Debian</title>
	<atom:link href="http://katastrophos.net/andre/blog/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://katastrophos.net/andre/blog</link>
	<description>Chaotic solutions and random thoughts from the restless mind of a notorious problem solver (TM), by Andre Beckedorf</description>
	<lastBuildDate>Fri, 30 Dec 2011 19:32:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Setting up the Inno Setup compiler on Debian</title>
		<link>http://katastrophos.net/andre/blog/2009/03/16/setting-up-the-inno-setup-compiler-on-debian/</link>
		<comments>http://katastrophos.net/andre/blog/2009/03/16/setting-up-the-inno-setup-compiler-on-debian/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 23:36:22 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Findings]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Quasar Media Player]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/?p=180</guid>
		<description><![CDATA[I&#8217;m currently setting up a nightly build system for Quasar on my Linux box which is running Debian. This system also cross-compiles Quasar for Windows. The Windows version of Quasar is going to be available in two fashions: one self-contained, portable version and one version that can be installed. I&#8217;m not a huge fan of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently setting up a nightly build system for Quasar on my Linux box which is running Debian. This system also cross-compiles Quasar for Windows.<br />
The Windows version of Quasar is going to be available in two fashions: one self-contained, portable version and one version that can be installed.<br />
I&#8217;m not a huge fan of installers. But when it comes to creating a setup program for a given Windows application I&#8217;m quite accustomed to <a href="http://www.innosetup.com" target="_blank">Inno Setup</a> having used it for years. Unfortunately there is no native Linux version of the Inno Setup compiler available for Linux. <a href="http://nsis.sourceforge.net" target="_blank">NSIS</a> exists as package for Debian but I am not fond of using it, largely because I am a Delphi guy. :)<br />
So, here is a small guide on how to get the Inno Setup compiler up and running on Debian:</p>
<p>First step is to install <a href="http://www.winehq.org" target="_blank">Wine</a> either as super user or by using <strong>sudo</strong>:</p>
<pre name="code" class="bash:nocontrols">
sudo apt-get install wine
</pre>
<p>As normal user fire up your X server and your favourite terminal application and get the latest <a href="http://www.innosetup.com/isdl.php#qsp" target="_blank">Inno Setup QuickStart pack</a>:</p>
<pre name="code" class="bash:nocontrols">
mkdir /tmp/innosetup
cd /tmp/innosetup
wget http://files.jrsoftware.org/ispack/ispack-5.2.3.exe
wine ./ispack-5.2.3.exe
</pre>
<p>This will start the installer in Wine. Note, for the installation you will need a running X11 server since the installer obviously is graphical. If you have not set up Wine before, the default location <strong>C:\Program Files\Inno Setup 5</strong> will install to <strong>~/.wine/drive_c/Programme/Inno Setup 5</strong>.</p>
<p>Luckily the Inno Setup compiler offers a command line interface, ISCC.exe, which will run in Wine without the necessity of having a X server running. So it is ideally suited for automated runs.</p>
<p>Here is a simple wrapper shell script called <strong>iscc</strong>:</p>
<pre name="code" class="bash:nocontrols">
#!/bin/sh
unset DISPLAY
scriptname=$1
[ -f "$scriptname" ] &#038;&#038; scriptname=$(winepath -w "$scriptname")
wine "C:\Program Files\Inno Setup 5\ISCC.exe" "$scriptname" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
</pre>
<p>I installed this script in my local bin directory (~/bin) and added it to the PATH environment variable.<br />
This will allow running the Inno Setup compiler from anywhere and it also makes it very easy to integrate into a build script. You can even feed a script via stdin, e.g. something like:</p>
<pre name="code" class="bash:nocontrols">
iscc - < ./myscript.iss</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2009/03/16/setting-up-the-inno-setup-compiler-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vpopmail &#8211; maildrop &#8211; SqWebMail mailfilter patch</title>
		<link>http://katastrophos.net/andre/blog/2006/10/03/vpopmail-maildrop-sqwebmail-mailfilter-patch/</link>
		<comments>http://katastrophos.net/andre/blog/2006/10/03/vpopmail-maildrop-sqwebmail-mailfilter-patch/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 21:27:27 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2006/10/03/vpopmail-maildrop-sqwebmail-mailfilter-patch/</guid>
		<description><![CDATA[On our production mail server we&#8217;re using a so called qmail toaster setup. It&#8217;s essentially the same setup as described by shupp.org. However, instead of using SquirrelMail for webmail, we opted for SqWebMail and maildrop. The nice thing about SqWebMail is that it offers a web interface for configuring the maildrop mailfilters. That way, every [...]]]></description>
			<content:encoded><![CDATA[<p>On our production mail server we&#8217;re using a so called <span>qmail</span> toaster setup. It&#8217;s essentially the same setup as described by shupp.org. However, instead of using <a target="_blank" href="http://www.squirrelmail.org/">SquirrelMail</a> for webmail, we opted for <a target="_blank" href="http://www.courier-mta.org/sqwebmail/">SqWebMail</a> and <a target="_blank" href="http://www.courier-mta.org/maildrop/">maildrop</a>. The nice thing about SqWebMail is that it offers a web interface for configuring the maildrop mailfilters. That way, every user can configure their filtering rules individually.
</p>
<p>The problem here is that vdelivermail (of <a target="_blank" href="http://www.inter7.com/index.php?page=vpopmail">vpopmail</a>) doesn&#8217;t support those mailfilter files. For that to work we need vdelivermail to call maildrop to process those files on an individual basis. However, this requires to setup the processing instructions for every mail account manually. Of course, this is unbearable on a large setup.
</p>
<p>We came up with a patch for vdelivermail that automatically chain-calls maildrop if it finds a mailfilter file in the domain&#8217;s account directory. Some parts are based on another patch which source I forgot. I mainly extended it to be less strict and to publish certain internal vpopmail/vdelivermail variables as environment variables that could be used inside the mailfilter &#8211; namely username, userdir, domainname, domaindir.
</p>
<p>If it finds the file in the domain&#8217;s directory, it will delegate the mail to the domain-wide mailfilter.<br />
The domain-wide mailfilter will delegate the mail to the users mailfilter if it exists. If not, it will simply do a standard mail delivery to the account&#8217;s INBOX.
</p>
<p>If vdelivermail can&#8217;t find any domain-wide mailfilter it will simply default to standard mail delivery to the account&#8217;s INBOX.
<p>Here is the patch against vpopmail 5.4.17:</p>
<p><a class="downloadlink" target="_blank" href="http://www.katastrophos.net/downloads/qmailtoaster/vpopmail-5.4.17-vdelivermail.c-maildrop.patch">vpopmail-5.4.17-vdelivermail.c-maildrop.patch</a>
<p>If you&#8217;re too lazy to patch the vpopmail sourcecode yourself, here is the already patched vdelivermail.c:</p>
<p><a class="downloadlink" href="http://www.katastrophos.net/downloads/qmailtoaster/vdelivermail-5.4.17-maildrop.c">vdelivermail-5.4.17-maildrop.c</a></p>
<p>(Rename it to vdelivermail.c and place it in the vpopmail source directory and compile.)
</p>
<p><span id="more-39"></span></p>
<p><strong>Our current mail server setup goes something like this:<br />
</strong></p>
<p><strong>qmail (with SMTP-AUTH + TLS) + vpopmail + </strong><strong>SpamAssassin / ClamAV</strong><strong> + maildrop + custom scripts + SqWebMail (for webmail) + Dovecot (for SSL IMAP)</strong>
</p>
<p>In our setup by default every account has the following hierarchy:</p>
<pre>
INBOX
  Spam
    learn no-spam
    learn spam
</pre>
<p>The Spam subfolder is automatically created by the domain-wide mailfilter once the first email hits the account.
</p>
<p>We&#8217;re using the following domain-wide filter (/home/vpopmail/domains/yourdomainname/mailfilter):</p>
<p><a class="downloadlink" target="_blank" href="http://www.katastrophos.net/downloads/qmailtoaster/mailfilter">mailfilter</a></p>
<p>Again, our modified vdelivermail takes care of checking the domain for that mailfilter as described above.</p>
<p>Here is our script used to create the Spam subfolders in the domain-wide mailfilter above:</p>
<p><a class="downloadlink" href="http://www.katastrophos.net/downloads/qmailtoaster/check-create-spamfolders.sh">check-create-spamfolders.sh</a></p>
<p>If you want to use it, make sure to adjust the paths in the file to your setup.</p>
<p>So, now consider that the Spam subfolders have been created. People can use these folders to instruct what mails are spam and what mails are ham (non-spam). They can use this mechanism to report missed spam mails or to correct mistakenly classified non-spam mails.</p>
<p>Now, we wanted to get information out of those folders and try to educate our SpamAssassin&#8217;s bayes filter. Here is what we start in our crontab every hour:</p>
<p><a class="downloadlink" href="http://www.katastrophos.net/downloads/qmailtoaster/sa-learn.sh">sa-learn.sh</a></p>
<p>This script will make a list of all account&#8217;s spam and ham folders in every domain under /home/vpopmail/domains and feed the mails therein into <a href="http://spamassassin.apache.org/full/3.0.x/dist/doc/sa-learn.html" target="_blank">sa-learn</a>. Again, if you want to use the script, make sure to adjust the paths to your setup.
</p>
<p>Since our server runs Debian installing SpamAssassin is pretty easy. We just had to make sure to start SpamAssassin&#8217;s <a href="http://spamassassin.apache.org/full/3.0.x/dist/doc/spamd.html" target="_blank">spamd</a> with the following adjusted settings in /etc/default/spamd.conf:</p>
<pre>
# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.
OPTIONS="-m 2 -H -u vpopmail --vpopmail --nouser-config"

# Set nice level of spamd
NICE="--nicelevel 10"
</pre>
<p>This will launch spamd globally for all vpopmail accounts. The bayes database is shared among all accounts and is stored in /home/vpopmail/.spamassassin/ with the following local.cf in /etc/spamassassin/local.cf:</p>
<p><a class="downloadlink" href="http://www.katastrophos.net/downloads/qmailtoaster/local.cf">local.cf</a>
<p>Having a global shared bayes database for your SpamAssassin is controversial. I won&#8217;t go into detail on why it&#8217;s good or bad to do so. All I can say is it&#8217;s working pretty well for us.</p>
<p>Currently, in our setup the SpamAssassin and ClamAV scanning is integrated into qmail via <a target="_blank" href="http://qmail-scanner.sourceforge.net/">Qmail-Scanner</a>. This has the disadvantage that antivirus filtering is done pretty deep down the processing chain. I plan to migrate this to <a target="_blank" href="http://inter7.com/?page=simscan">simscan</a>, which stops and rejects any virus mail at SMTP level and thus prevents them from entering the queue, i.e. nothing will get onto your box. Qmail-Scanner on the other hand puts virus mails into a global quarantine directory.
</p>
<p>As for IMAP access to mail accounts, we&#8217;ve previously used <a target="_blank" href="http://www.inter7.com/courierimap/">Courier IMAP</a> and just recently migrated all accounts to <a target="_blank" href="http://www.dovecot.org/">Dovecot</a>. Both servers are proven and very reliable. However, we found Dovecot to be more secure and way faster. This is especially noticeable when doing searches and threading on mailboxes. Also, Dovecot is easier to set up as there are fewer external dependencies than with Courier IMAP.<br />
Dovecot offers support for vpopmail. If you want to give it a try in your setup, make sure to enable this support via the &#8220;&#8211;with-vpopmail&#8221; switch when running configure.</p>
<p>As already stated above, we chose to use SqWebMail for webmail and mail filter configuration. By default the latter is disabled. You&#8217;ll have to explicitly enable the mail filter interface. Check the documentation on how to do that.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2006/10/03/vpopmail-maildrop-sqwebmail-mailfilter-patch/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

