<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:atom="http://www.w3.org/2005/Atom">

    <channel>
        <title>Zakame::Blog</title>
        <link>http://blog.zakame.net/</link>
        <description>Zak B. Elep's little weblog</description>
        <managingEditor>zakame@zakame.net (Zak B. Elep)</managingEditor>
        <webMaster>zakame@zakame.net (Zak B. Elep)</webMaster>
        <pubDate>Wed, 04 Jun 2008 10:10:38 +0000</pubDate>
        <language>en</language>
        <generator>blosxom 2.0.2</generator>
        <atom:link href="http://blog.zakame.net/rss" rel="self" type="application/rss+xml" />
        <sy:updatePeriod>hourly</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>
        <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>


        <item>
            <title>Making Net-Akismet play with TypePad AntiSpam</title>
            <link>http://blog.zakame.net/hacks/net-akismet-patch</link>
            <guid isPermaLink="true">http://blog.zakame.net/hacks/net-akismet-patch</guid>
            <pubDate>Wed, 04 Jun 2008 10:10:38 +0000</pubDate>
            <category>akismet</category>
            <category>blosxom</category>
            <category>perl</category>
            <category>www</category>
            <description>&lt;p&gt;I've been getting a lot of blog spam lately; it appears that &lt;a href="http://www.akismet.com"&gt;Akismet&lt;/a&gt; is
slipping.  Fortunately, there's a new Akismet-compatible alternative at
&lt;a href="http://antispam.typepad.com"&gt;TypePad AntiSpam&lt;/a&gt; which I read about from Justin Mason's &lt;a href="http://taint.org/2008/05/30/165032a.html"&gt;post&lt;/a&gt;.  And it
being perl, I decided to try it out here on my blog (never mind it being
&lt;a href="http://blosxom.sourceforge.net"&gt;Blosxom&lt;/a&gt;, as long as it uses Frank Hecker's &lt;a href="http://hecker.org/blosxom/feedback"&gt;feedback plugin&lt;/a&gt; that in
turn uses &lt;a href="http://search.cpan.org/perldoc?Net::Akismet"&gt;Net::Akismet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But alas, the current version of Net::Akismet doesn't support user-supplied
REST endpoints, so I added &lt;a href="http://rt.cpan.org/Ticket/Attachment/469764/231662/0001-Add-support-for-user-supplied-Akismet-services.patch"&gt;it&lt;/a&gt;, and promptly filed a report on the
&lt;a href="http://rt.cpan.org/Ticket/Display.html?id=36427"&gt;CPAN&lt;/a&gt;.  Hopefully it gets included in the next release very soon.&lt;/p&gt;

&lt;p&gt;As for the Blosxom feedback plugin, tweaking it to use the new feature in
Net::Akismet was a cinch, so only the real test (of incoming spam filtered by
TypePad) remains.  Hopefully it does work.&lt;/p&gt;

&lt;p&gt;[PS: Looks like the first line in blosxom posts don't like package-like names such as Net::Akismet (during editing my blog title disappeared on the render!)  Needs to be looked at later...]&lt;/p&gt;

            </description>
        </item>

        <item>
            <title>Where's the Open?</title>
            <link>http://blog.zakame.net/news/wheres-the-open</link>
            <guid isPermaLink="true">http://blog.zakame.net/news/wheres-the-open</guid>
            <pubDate>Wed, 14 May 2008 11:31:08 +0000</pubDate>
            <category>community</category>
            <category>debian</category>
            <category>linux</category>
            <category>openssh</category>
            <category>openssl</category>
            <description>&lt;p&gt;Ok, so it seems that the whirlwind on &lt;a href="http://blog.zakame.net/news/openssl-remote-dsa-1571"&gt;OpenSSL&lt;/a&gt; has settled down a bit.
Posts about it are coming from everywhere, ranging from &lt;a href="http://www.links.org/?p=327"&gt;rants on package
maintenance&lt;/a&gt; to blame-pointing on both &lt;a href="http://advogato.org/person/branden/diary/5.html"&gt;upstream&lt;/a&gt; and &lt;a href="http://blog.technologeek.org/2008/05/13/107"&gt;packager&lt;/a&gt;
sides.  And, of course, &lt;a href="http://it.slashdot.org/article.pl?sid=08/05/13/1533212"&gt;Slashdot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Where does all this leave the end user with?  Well, probably not much except to
regenerate weak SSH keys with the new &lt;code&gt;openssh-server&lt;/code&gt; (now enhanced with
&lt;code&gt;openssh-blacklist&lt;/code&gt;, see the new &lt;a href="http://lists.debian.org/debian-security-announce/2008/msg00153.html"&gt;advisory&lt;/a&gt;) and hope to $DEITY all gets
well soon.  And maybe, just maybe, a minor suspicion that other Debian-packaged
software may be "tainted" with a similar blemish (that being having patches
that are supposed to fix something, applied &lt;em&gt;with upstream's blessing&lt;/em&gt;, and yet
not really audited enough to ensure functionality &lt;strong&gt;AND&lt;/strong&gt; security of the
system is maintained.)&lt;/p&gt;

&lt;p&gt;Obviously, there's going to be some adjustments to be made on the Debian side.
But I do hope to $DEITY that major revamps ought to happen on the OpenSSL side
as well, in particular on clarifying their public channels to reaching upstream
developers (read: publish &lt;code&gt;openssl-team@openssl.org&lt;/code&gt; in a legitimate way, being
the legitimate upstream contact endpoint it is,) and keeping a closer eye on
the vendors who package their software (yeah, it may not be an obligation at
all for OpenSSL, but heck, their vendors are &lt;em&gt;users&lt;/em&gt;, too!)  Upstream may be
free not to partake on a &lt;a href="http://www.debian.org/social_contract"&gt;social contract&lt;/a&gt; like Debian's, but it shouldn't
escape from them the fact that vendors nevertheless aggregate continuing and
potential users (aside from being users themselves) for their benefit.&lt;/p&gt;

&lt;p&gt;More importantly though, is that delivering FOSS is a community effort.  Sure,
its easy to put blame now, but in the end, the blame isn't as important as the
real cause and effects of the problem/bug/issue are.  Better to move on and
work together towards a real fix, rather than the bickering that currently
passes as FOSS entertainment.&lt;/p&gt;

            </description>
        </item>

        <item>
            <title>OpenSSL Ouch</title>
            <link>http://blog.zakame.net/news/openssl-remote-dsa-1571</link>
            <guid isPermaLink="true">http://blog.zakame.net/news/openssl-remote-dsa-1571</guid>
            <pubDate>Tue, 13 May 2008 16:32:44 +0000</pubDate>
            <category>debian</category>
            <category>linux</category>
            <category>openssh</category>
            <category>openssl</category>
            <category>perl</category>
            <category>remote</category>
            <category>vulnerability</category>
            <description>&lt;p&gt;I won't repeat it here, but there's &lt;a href="http://lists.debian.org/debian-security-announce/2008/msg00152.html"&gt;DSA-1571-1&lt;/a&gt; waiting for your attention,
especially if you made some material out of &lt;code&gt;openssl&lt;/code&gt; over the last couple of
years or so.  Yes, you read it right: &lt;strong&gt;COUPLE&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Upgrading to the new OpenSSL is easy.  Generating new keys is another story.&lt;/p&gt;

&lt;p&gt;To save (or add to, depending on how you handle this) your pain, there is a
&lt;a href="http://security.debian.org/project/extra/dowkd/dowkd.pl.gz"&gt;simple checker&lt;/a&gt; that can currently see if your OpenSSH or OpenVPN public
keys are weak enough to warrant replacement.  I await a version that can handle
X.509 certificates too (though I only just generated a new one today, before
the announcement, so that means I have to do it again (and get its CSR to
&lt;a href="http://www.cacert.org"&gt;CACert&lt;/a&gt; for signing, etc.)&lt;/p&gt;

&lt;p&gt;And yeah, if you're running &lt;a href="http://packages.debian.org/openssh-server"&gt;openssh-server&lt;/a&gt;, consider regenerating your
host RSA and DSA keys, e.g.:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# mv /etc/ssh/ssh_host_{dsa,rsa}_key* /some/place/else
# dpkg-reconfigure -plow openssh-server
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That should regenerate your keys &lt;em&gt;and&lt;/em&gt; restart openssh-server once the new keys
are installed to &lt;code&gt;/etc/ssh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;hard&lt;/em&gt; part (of making sure all the keys of your systems are updated and
tested) is still up to you, however.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: &lt;a href="http://wiki.debian.org/SSLkeys"&gt;The Debian wiki&lt;/a&gt; has up-to-date information regarding other
packages that generate SSH/SSL keys at postinst.  Please refer to that while
the &lt;a href="http://www.debian.org/security/key-rollover/"&gt;key-rollover&lt;/a&gt; page isn't up yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE 2&lt;/strong&gt;: &lt;a href="http://packages.debian.org/openssh-server"&gt;openssh-server&lt;/a&gt; is updated (with corresponding
&lt;a href="http://lists.debian.org/debian-security-announce/2008/msg00153.html"&gt;DSA-1576-1&lt;/a&gt;) that is linked to the updated OpenSSL library.  Be sure to
upgrade!  The new package also pulls in &lt;a href="http://security.debian.org/pool/updates/main/o/openssh-blacklist/"&gt;openssh-blacklist&lt;/a&gt;, a new package
that contains the database needed by the new &lt;code&gt;ssh-vulnkey&lt;/code&gt; for checking SSH
public keys.&lt;/p&gt;

            </description>
        </item>

        <item>
            <title>Adding Some Blog Bling</title>
            <link>http://blog.zakame.net/news/blog-bling</link>
            <guid isPermaLink="true">http://blog.zakame.net/news/blog-bling</guid>
            <pubDate>Sun, 11 May 2008 01:46:53 +0000</pubDate>
            <category>blosxom</category>
            <category>perl</category>
            <category>www</category>
            <description>&lt;p&gt;I added some more &lt;em&gt;bling&lt;/em&gt; to this blog last night, like a spiffy new CSS theme
(based on &lt;a href="http://blosxom.ookee.com/blosxom/flavours/twocolumncss-zip"&gt;twocolumncss&lt;/a&gt;) and a handful of plugins to improve feed generation,
readable and extensionless URIs, and support for comments and trackbacks.
Blosxom indeed is such a flexible toolkit for making a blog! :D&lt;/p&gt;

&lt;p&gt;That said, I did find one or two quirks in the plugins existing in the
&lt;a href="http://blosxom.cvs.sourceforge.net/blosxom/blosxom2/"&gt;blosxom&lt;/a&gt; and &lt;a href="http://blosxom.cvs.sourceforge.net/blosxom/blosxom2-plugins/"&gt;blosxom-plugins&lt;/a&gt; CVS repository; I'll post patches to my
git mirrors of these repositories.  I'll probably add some more features on
some of the plugins I used too (that reminds me, I should put up a list
somewhere.)&lt;/p&gt;

            </description>
        </item>

        <item>
            <title>Apache2 Worker MPM on Low Memory Servers</title>
            <link>http://blog.zakame.net/tips/apache2-worker-lowmem</link>
            <guid isPermaLink="true">http://blog.zakame.net/tips/apache2-worker-lowmem</guid>
            <pubDate>Sat, 10 May 2008 02:42:53 +0000</pubDate>
            <category>apache2</category>
            <category>debian</category>
            <category>linux</category>
            <category>lowmem</category>
            <description>&lt;p&gt;If you're running &lt;a href="http://httpd.apache.org"&gt;Apache2&lt;/a&gt; on a memory-constrained system (like in a
virtual machine,) you may want to choose the &lt;a href="http://httpd.apache.org/docs/2.2/mod/prefork.html"&gt;prefork MPM&lt;/a&gt; to save memory at
the cost of more process forks.  However, if you have more than one CPU on that
same machine, you may also want to consider using the threaded &lt;a href="http://httpd.apache.org/docs/2.2/mod/worker.html"&gt;worker MPM&lt;/a&gt;
and tweak its &lt;code&gt;MaxClients&lt;/code&gt; and &lt;code&gt;ThreadsPerChild&lt;/code&gt; settings from the default
configuration.&lt;/p&gt;

&lt;p&gt;On a typical &lt;code&gt;apache2&lt;/code&gt; installation on a &lt;a href="http://www.debian.org"&gt;Debian&lt;/a&gt; system, the worker MPM
configuration looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mpm_worker_module&amp;gt;
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxRequestsPerChild   0
&amp;lt;/IfModule&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Using these default settings on a resource-constrained system (say a server
with 128MB of RAM but with no swap) would be overkill, and the web server
processes will definitely eat up all of that memory, leaving little or no room
for even simple CGI scripts.&lt;/p&gt;

&lt;p&gt;In my setup, I experimented with tweaking the values above to get apache2 to
serve without eating up too much precious memory.  I found that the important
values to consider here are &lt;code&gt;MaxClients&lt;/code&gt;, which dictate how many clients can
connect simultaneously to my server, and &lt;code&gt;ThreadsPerChild&lt;/code&gt;, which specifies how
many threads of execution can run in a child/worker process.  My resulting
config becomes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;IfModule mpm_worker_module&amp;gt;
    MaxClients           15
    MinSpareThreads       3
    MaxSpareThreads       7
    ThreadsPerChild       3
    MaxRequestsPerChild 200
&amp;lt;/IfModule&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this setup, I free up a significant amount of RAM from apache2's hold whle
maximizing my thread usage in each worker process; at the same time, I avoid
keeping each child process for too long by setting a maximum number of requests
each worker can serve, preventing the workers to bloat too much when handling
CGI.&lt;/p&gt;

&lt;p&gt;I also tweaked the &lt;code&gt;KeepAliveTimeout&lt;/code&gt; setting to just 2 seconds (instead of the
default 15) so that each worker process can go to the next request quickly and
preventing them from being tied up to a connection for too long.  I also set
the &lt;code&gt;Timeout&lt;/code&gt; to 30 seconds.&lt;/p&gt;

            </description>
        </item>

        <item>
            <title>Some Exim4 hacks</title>
            <link>http://blog.zakame.net/tips/exim4-hacks</link>
            <guid isPermaLink="true">http://blog.zakame.net/tips/exim4-hacks</guid>
            <pubDate>Mon, 28 Apr 2008 15:03:10 +0000</pubDate>
            <category>debian</category>
            <category>exim</category>
            <category>linux</category>
            <category>mail</category>
            <description>&lt;p&gt;&lt;a href="http://www.exim.org"&gt;Exim&lt;/a&gt; is the stock MTA in &lt;a href="http://www.debian.org"&gt;Debian&lt;/a&gt;, and rightly so, since  its pretty
much the most flexible MTA around (note: I did say "most flexible," not "most
secure.")  It is also very easy to set up, thanks to its debconf integration
and sane configuration interface; however, there may be some bits that still
needs that extra tweaking that a dialog or menu interface can't reach:&lt;/p&gt;

&lt;h4&gt;Setting the Right mailserver hostname&lt;/h4&gt;

&lt;p&gt;Most mailservers typically go by a hostname of "mail" or "mx," for various
reasons.  Of course, this requires setting the right DNS entry for your domain,
but Exim may miss this and use the internal hostname of your mailserver
instead.  There are quite a lot of ways to set the "right" mailserver name in
Exim, but in Debian, it is recommended that one &lt;em&gt;DOESN'T&lt;/em&gt; set it via the
&lt;code&gt;primary_hostname&lt;/code&gt; variable, as this can mess up other places in the Exim
configuration and complicate matters.  Instead, one can use
&lt;code&gt;smtp_active_hostname&lt;/code&gt; in the global options:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smtp_active_hostname = mail.foobar.net
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Changing Received: header&lt;/h4&gt;

&lt;p&gt;If one changes the mailserver hostname like above, then it also probably needs
to change some headers as well, like the "Received:" header.  Again, this is a
global options setting, controlled by &lt;code&gt;received_header_text&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;received_header_text = Received: \
&amp;#036;{if def:sender_rcvhost {from &amp;#036;sender_rcvhost\n\t}\
{&amp;#036;{if def:sender_ident {from &amp;#036;sender_ident}}\
&amp;#036;{if def:sender_helo_name {(helo=&amp;#036;sender_helo_name)\n\t}} }}\
by &amp;#036;smtp_active_hostname \
&amp;#036;{if def:received_protocol {with &amp;#036;received_protocol}} \
&amp;#036;{if def:tls_cipher {(&amp;#036;tls_cipher)\n\t}}\
(Exim &amp;#036;version_number)\n\t\
&amp;#036;{if def:sender_address {(envelope-from &amp;lt;&amp;#036;sender_address&amp;gt;)\n\t}}\
id &amp;#036;message_id\
&amp;#036;{if def:received_for {\n\tfor &amp;#036;received_for}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that this changes the header when your Exim receives mail; when your Exim
&lt;em&gt;sends&lt;/em&gt; mail to another mailserver, you'll have to ensure that the header made
by the destination mailserver has its hostname matching your own.  Thus, you
need to fix the "remote_smtp" transport a bit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;remote_smtp:
  debug_print = "T: remote_smtp for &amp;#036;local_part@&amp;#036;domain"
  driver = smtp
  # to disable TLS on outgoing connections, uncomment this
  # hosts_avoid_tls = *
  helo_data = &amp;#036;smtp_active_hostname    # use the variable we set earlier
  # use the interface our Exim is running on and where the mailserver name points to
  interface = 1.2.3.4
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Changing Message-Id&lt;/h4&gt;

&lt;p&gt;Finally, one can change the "Message-Id" header to match the new hostname
above, via another global options variable,
&lt;code&gt;message_id_header_domain&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;message_id_header_domain = &amp;#036;smtp_active_hostname
&lt;/code&gt;&lt;/pre&gt;

            </description>
        </item>

        <item>
            <title>Subdomains for Blog and Code</title>
            <link>http://blog.zakame.net/news/blog-and-code</link>
            <guid isPermaLink="true">http://blog.zakame.net/news/blog-and-code</guid>
            <pubDate>Sun, 27 Apr 2008 16:41:15 +0000</pubDate>
            <category>git</category>
            <category>www</category>
            <description>&lt;p&gt;I have reorganized the site a bit.  This &lt;a href="http://blog.zakame.net"&gt;blog&lt;/a&gt; is now on its own subdomain 
(and www currently redirects to it.)  My existing and new projects (under their
own &lt;a href="http://git.or.cz"&gt;git&lt;/a&gt; trees) are now on &lt;a href="http://code.zakame.net"&gt;the code subdomain&lt;/a&gt;, with gitweb as root.&lt;/p&gt;

&lt;p&gt;I'll probably put up a wiki as the main www, and maybe even lists (in case some
of my projects go gold heh.)&lt;/p&gt;

            </description>
        </item>

        <item>
            <title>Hello, World</title>
            <link>http://blog.zakame.net/news/hello</link>
            <guid isPermaLink="true">http://blog.zakame.net/news/hello</guid>
            <pubDate>Sat, 26 Apr 2008 07:44:21 +0000</pubDate>
            <category>blosxom</category>
            <category>cgi-app</category>
            <category>morphlabs</category>
            <category>perl</category>
            <category>ubuntu</category>
            <description>&lt;p&gt;You have reached my little site.  There's not much here at the moment, but do
drop by every now and then; its a work in progress.&lt;/p&gt;

&lt;p&gt;As you can see, this site is quite spartan, and that's the way I like it.  I'm
currently using &lt;a href="http://www.blosxom.com"&gt;blosxom&lt;/a&gt; for this ephemeral blog site, despite the
prevalence of database-backed blogging and CMS software with all the Web 2.0,
AJAX, and Web Services bullshit.  Those are not for me, at least for the
moment; nor do I want to encourage a "community" around my site, whatever that
is, as I have better things to do than exchange pleasantries.&lt;/p&gt;

&lt;p&gt;That said, I know that the blosxom code is rather old and the plugins available
for it seem to be disappearing.  Since its in Perl, however, I think I can take
a crack at writing my own plugins (and possibly improving blosxom itself.)  I 
might probably rewrite it in &lt;a href="http://www.blosxom.com"&gt;CGI::Application&lt;/a&gt;, if it comes to that.&lt;/p&gt;

&lt;p&gt;By the way, in case you're wondering: I'm Zak B. Elep, and I go by &lt;em&gt;zakame&lt;/em&gt; on
the Internets.  I actually have an older, more dynamic, and friendlier weblog
at &lt;a href="http://zakame.spunge.org/blog"&gt;spunge.org&lt;/a&gt;, where it all started; more on that later.&lt;/p&gt;

&lt;p&gt;And yeah, the standard disclaimers for blogging applies: this site contains my
own personal opinions on various matters (and maybe some real, hard facts, from
time to time,) and in now way should these opinions be construed as official
statements of &lt;a href="http://www.ubuntu.com"&gt;organizations&lt;/a&gt; or &lt;a href="http://www.mor.ph"&gt;companies&lt;/a&gt; I'm connected with.  They
have their own PR reps: talk to them if you need "official" shit.&lt;/p&gt;

&lt;p&gt;That's all for the moment: I'll go play out with some code.&lt;/p&gt;

            </description>
        </item>

    </channel>
</rss>
