<?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>Brandon&#039;s Blog &#187; ipv6</title>
	<atom:link href="http://www.brandonturner.net/blog/tag/ipv6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brandonturner.net/blog</link>
	<description>Random thoughts on web applications, software development and Linux</description>
	<lastBuildDate>Thu, 08 Apr 2010 01:47:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IPv6 support for qmail-jms1</title>
		<link>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jms1/</link>
		<comments>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jms1/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:13:34 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=462</guid>
		<description><![CDATA[This post is part of a series of posts dedicated to IPv6 support for qmail: Qmail IPv6 support tcpserver and rblsmtpd sslserver jgreylist jms1 combined patch IPv6 support in qmail Supporting IPv6 in qmail largely revolves around DNS lookups. Patches for tcpserver and sslserver allow incoming connections over IPv6. In order to support IPv6 in [...]]]></description>
			<content:encoded><![CDATA[<p>This post is part of a series of posts dedicated to IPv6 support for qmail:</p>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6/">Qmail IPv6 support</a>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver and rblsmtpd</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-sslserver/">sslserver</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-jgreylist/">jgreylist</a></li>
<li><strong>jms1 combined patch</strong></li>
</ul>
</li>
</ul>
<h4>IPv6 support in qmail</h4>
<p>Supporting IPv6 in qmail largely revolves around DNS lookups.  Patches for <a href="/blog/2009/08/qmail-ipv6-tcpserver">tcpserver</a> and <a href="/blog/2009/08/qmail-ipv6-sslserver">sslserver</a> allow incoming connections over IPv6.  In order to support IPv6 in qmail:</p>
<ul class="noseparation">
<li>DNS lookups should prefer AAAA records, falling back to A records only if AAAA records are not available</li>
<li>All code referencing IP addresses should support IPv4 and IPv6 addresses</li>
<li>SPF queries should support IPv6 addresses</li>
</ul>
<h4>The fujiwara patch</h4>
<p>A <a href="http://member.wide.ad.jp/~fujiwara/files/qmail-1.03-v6-20021006.diff">qmail IPv6 patch</a> has existed since 2002 that covers the first two issues above.  It is written to apply cleanly on the base qmail-1.03 distributed on <a href="http://cr.yp.to/qmail.html">Daniel Bernstein&#8217;s site</a>.  It does not include support for SPF queries as SPF is not included in the original version of qmail.</p>
<h4>John Simpson&#8217;s combined patch</h4>
<p>I use John Simpson&#8217;s <a href="http://qmail.jms1.net/patches/combined.shtml">combined patch</a> for my qmail installs.  This patch adds support for <a href="http://www.openspf.org/">SPF</a> as well as many other things.  I have modified the fujiwara patch to apply on top of John&#8217;s combined patch as well as support SPF queries.</p>
<p>You can download my modified patch: <a href="http://www.bltweb.net/qmail/qmail-1.03-jms1.7.08-ipv6.patch">qmail-1.03-jms1.7.08-ipv6.patch</a>.  Installing it is simple:</p>
<div class="prompt">
$ <span class="cmd">wget <a href="http://cr.yp.to/software/qmail-1.03.tar.gz">http://cr.yp.to/software/qmail-1.03.tar.gz</a></span><br />
$ <span class="cmd">wget <a href="http://qmail.jms1.net/patches/qmail-1.03-jms1.7.08.patch">http://qmail.jms1.net/patches/qmail-1.03-jms1.7.08.patch</a></span><br />
$ <span class="cmd">wget <a href="http://www.bltweb.net/qmail/qmail-1.03-jms1.7.08-ipv6.patch">http://www.bltweb.net/qmail/qmail-1.03-jms1.7.08-ipv6.patch</a></span><br />
$ <span class="cmd">tar -xzf qmail-1.03.tar.gz</span><br />
$ <span class="cmd">mv qmail-1.03 qmail-1.03-jms1.7.08</span><br />
$ <span class="cmd">cd qmail-1.03-jms1.7.08</span><br />
$ <span class="cmd">patch &lt; ../qmail-1.03-jms1.7.08.patch</span><br />
$ <span class="cmd">patch -p1 &lt; ../qmail-1.03-jms1.7.08-ipv6.patch</span><br />
$ <span class="cmd">sed -ie 	&#8217;1s/$/ -DINET6/&#8217; conf-cc</span><br />
$ <span class="cmd">make</span><br />
$ <span class="cmd">make man</span><br />
$ <span class="cmd">sudo make setup check</span>
</div>
<h4>Configuration and running</h4>
<p>No special configuration is needed for this patch.</p>
<p>When applied, connections will prefer IPv6, transparently falling back to IPv4 if no IPv6 addresses are available.  This patch allows sending outbound messages over IPv6.  For inbound messages, you must apply the <a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver</a> or <a href="/blog/2009/08/qmail-ipv6-sslserver/">sslserver</a> patches.</p>
<p>Email addresses on my <code>bltweb.net</code> domain are IPv6 enabled thanks to a <a href="http://tunnelbroker.net">free IPv6 tunnel</a> provided by Hurricane Electric.  Feel free to send me an email once you are IPv6 enabled!</p>
<h4>Summary</h4>
<p>Feel free to leave any comments, corrections or questions below.  Remember Gentoo users can apply all of my qmail patches automatically by using the ebuilds in my <a href="/blog/gentoo-overlay/">gentoo-overlay</a>.</p>
<p>Once you have compiled qmail with IPv6 support, you should re-visit my main <a href="/blog/2009/08/qmail-ipv6/">qmail IPv6</a> post for information about testing and using your new IPv6 qmail install.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jms1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>IPv6 support for jgreylist</title>
		<link>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jgreylist/</link>
		<comments>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jgreylist/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:13:23 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=456</guid>
		<description><![CDATA[In this post I describe how to modify jgreylist to support IPv6 connections.  This is one step to supporting IPv6 in qmail.]]></description>
			<content:encoded><![CDATA[<p>This post is part of a series of posts dedicated to IPv6 support for qmail:</p>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6/">Qmail IPv6 support</a>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver and rblsmtpd</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-sslserver/">sslserver</a></li>
<li><strong>jgreylist</strong></li>
<li><a href="/blog/2009/08/qmail-ipv6-jms1/">jms1 combined patch</a></li>
</ul>
</li>
</ul>
<h4>jgreylist Changes</h4>
<p><a href="http://qmail.jms1.net/scripts/jgreylist.shtml">jgreylist</a> is a program provided by John Simpson to allow <a href="http://en.wikipedia.org/wiki/Greylisting">greylisting</a> in qmail.  John provides two versions, one written in Perl, and one written in C.  I chose to only patch the C version.</p>
<p>jgreylist works by using the unix timestamps of empty files to track when individual IP address or class C blocks last visited your qmail server.  John does a great job of explaining how this works on his <a href="http://qmail.jms1.net/scripts/jgreylist.shtml">jgreylist</a> page.  You should understand how his program, especially the C version, works and is configured before continuing.</p>
<p>Normally, the IP addresses are stored in a directory such as <code>/var/qmail/jgreylist</code>.  Each byte of the IP address is stored in a directory so that the IP address 127.0.0.1 would be stored in <code>/var/qmail/jgreylist/127/000/000/001</code>.  To reduce the number of files needed, by default <code>jgreylist</code> actually only stores the first 3 bytes, so 127.0.0.1 would actually be stored in <code>/var/qmail/jgreylist/127/000/000</code>.  Which behavior <code>jgreylist</code> uses depends on the value of the <code>JGREYLIST_BY_IP</code> environment variable.</p>
<p>My patch changes the directory structure slightly.  All IPv4 addresses are stored inside an <code>ip4</code> directory.  IPv6 addresses are stored in an <code>ip6</code> directory.</p>
<p>IPv6 addresses are stored in directories for each byte in the address.  Unlike IPv4 addresses, each byte is represented in hex rather than decimal.  When <code>JGREYLIST_BY_IP</code> is a non-zero value, the entire address is stored.  Otherwise only the first 64 bits of the address is stored.  For example, the IPv6 <code>2001:470:1f0f:350::1</code> address would be stored in: <code>/var/qmail/jgreylist/ip6/20/01/04/70/1f/0f/03/50</code>.</p>
<h4>Download jgreylist with IPv6 support</h4>
<p>John distributes his <code>jgreylist</code> program using a single C file that you compile on your system.  I needed to pull in some additional files for the IPv6 stuff so I&#8217;ve repackaged John&#8217;s file with a Makefile and other dependencies.  This modified <code>jgreylist</code> must be run using an IPv6 patched <a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver</a> or <a href="/blog/2009/08/qmail-ipv6-sslserver">sslserver</a>.</p>
<p>You can download the package here: <a href="http://www.bltweb.net/qmail/jgreylist-0.8-ipv6.tar.gz">jgreylist-0.8-ipv6.tar.gz</a>.</p>
<p>Compiling and installing is easy:</p>
<div class="prompt">
$ <span class="cmd">wget <a href="http://www.bltweb.net/qmail/jgreylist-0.8-ipv6.tar.gz">http://www.bltweb.net/qmail/jgreylist-0.8-ipv6.tar.gz</a></span><br />
$ <span class="cmd">tar -xzf jgreylist-0.8-ipv6.tar.gz</span><br />
$ <span class="cmd">cd jgreylist-0.8-ipv6</span><br />
$ <span class="cmd">make</span><br />
$ <span class="cmd">sudo make install</span>
</div>
<p>After installing, you should follow John&#8217;s <a href="http://qmail.jms1.net/scripts/jgreylist.shtml">instructions</a> on configuring and running.</p>
<p>The <code>jgreylist-clean</code> perl script is included in the tar file above.  It required no changes.</p>
<h4>Summary</h4>
<p>If you have any comments, corrections or questions, feel free to post them below.  Remember Gentoo users can apply all of my qmail patches automatically by using the ebuilds in my <a href="/blog/gentoo-overlay/">gentoo-overlay</a>.  <code>jgreylist</code> is built in to the <code>qmail-jms1</code> ebuild, just use the <code>jgreylist<code> USE flag.</p>
<p>Once you've patched <code>jgreylist</code> you should move on to <a href="/blog/2009/08/qmail-ipv6-jms1/">patching qmail-jms1 or IPv6 support</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jgreylist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 support for sslserver</title>
		<link>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-sslserver/</link>
		<comments>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-sslserver/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:13:14 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=446</guid>
		<description><![CDATA[In this post I describe how to add IPv6 support to sslserver via a custom patch.  This is one step in enabling IPv6 support for qmail.]]></description>
			<content:encoded><![CDATA[<p>This post is part of a series of posts dedicated to IPv6 support for qmail:</p>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6/">Qmail IPv6 support</a>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver and rblsmtpd</a></li>
<li><strong>sslserver</strong></li>
<li><a href="/blog/2009/08/qmail-ipv6-jgreylist/">jgreylist</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-jms1/">jms1 combined patch</a></li>
</ul>
</li>
</ul>
<h4>ucspi-ssl</h4>
<p>The <a href="http://www.superscript.com/ucspi-ssl/index.html">ucspi-ssl</a> package provides the <code>sslserver</code> program.  <code>sslserver</code> accepts incoming SSL connections and passes them to another program such as <code>qmail-smtpd</code>.  <code>sslserver</code> is almost identical to tcpserver except that it deals with encrypted SSL traffic rather than clear text.</p>
<p>I could not find an IPv6 patch for <code>sslserver</code>, however I was able to port the <a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver patch</a> to <code>sslserver</code>.  You can easily apply my <a href="http://www.bltweb.net/qmail/ucspi-ssl-0.70-ipv6.patch">ucspi-ssl-0.70-ipv6.patch</a>:</p>
<div class="prompt">
$ <span class="cmd">wget <a href="http://www.superscript.com/ucspi-ssl/ucspi-ssl-0.70.tar.gz">http://www.superscript.com/ucspi-ssl/ucspi-ssl-0.70.tar.gz</a></span><br />
$ <span class="cmd">wget <a href="http://www.bltweb.net/qmail/ucspi-ssl-0.70-ipv6.patch">http://www.bltweb.net/qmail/ucspi-ssl-0.70-ipv6.patch</a></span><br />
$ <span class="cmd">tar -xzf ucspi-ssl-0.70.tar.gz</span><br />
$ <span class="cmd">cd host/superscript.com/net/ucspi-ssl-0.70</span><br />
$ <span class="cmd">patch -p1 < ../../../../ucspi-ssl-0.70-ipv6.patch</span><br />
$ <span class="cmd">package/compile</span><br />
$ <span class="cmd">sudo package/install</span>
</div>
<h4>sslserver</h4>
<p>To understand what the <code>sslserver</code> portion of the IPv6 patch does, you should be familiar with the <a href="http://www.superscript.com/ucspi-ssl/sslserver.html">sslserver man page</a> and read about how <code>tcpserver</code> handles IPv6 on <a href="http://www.fefe.de/ucspi/">Fefe&#8217;s ucspi-tcp</a> page.  Essentially, if a client connects via IPv4, <code>sslserver</code> exhibits it&#8217;s normal behavior.  If a client connects with IPv6, the <code>PROTO</code> environment variable will be set to &#8220;<code>SSL6</code>&#8221; instead of &#8220;<code>SSL</code>&#8220;.</p>
<p>The patch also supports using IPv6 addresses in your tcprules files.  A new rule may look like this:</p>
<div class="file">
# Don&#8217;t delay the greeting for my home server<br />
2001:470:1f0f:350::1:allow,GREETDELAY=&#8221;0&#8243;
</div>
<p>After applying this patch, you may notice that your logs are filled with addresses similar to: <code>::ffff:192.168.1.1</code>.  This is because internally <code>sslserver</code> treats every IP as an IPv6 address.  IPv4 addresses are represented using their <a href="http://en.wikipedia.org/wiki/IPv6#IPv4_mapped_addresses">IPv4 mapped address</a>.</p>
<h4>Summary</h4>
<p>If you have any comments, corrections, or questions, please feel free to leave a comment below.  Remember Gentoo users can apply all of my qmail patches automatically by using the ebuilds in my <a href="/blog/gentoo-overlay/">gentoo-overlay</a>.</p>
<p>Once you&#8217;ve patched <code>sslserver</code>, you should move on to <a href="/blog/2009/08/qmail-ipv6-jgreylist/">patching jgreylist for IPv6</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-sslserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 support for tcpserver and rblsmtpd</title>
		<link>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-tcpserver/</link>
		<comments>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-tcpserver/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:13:07 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=427</guid>
		<description><![CDATA[In this post I describe how to add IPv6 support to tcpserver and rblsmtpd via a custom patch.  This is one step in enabling IPv6 support for qmail.]]></description>
			<content:encoded><![CDATA[<p>This post is part of a series of posts dedicated to IPv6 support for qmail:</p>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6/">Qmail IPv6 support</a>
<ul class="noseparation">
<li><strong>tcpserver and rblsmtpd</strong></li>
<li><a href="/blog/2009/08/qmail-ipv6-sslserver/">sslserver</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-jgreylist/">jgreylist</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-jms1/">jms1 combined patch</a></li>
</ul>
</li>
</ul>
<h4>ucspi-tcp</h4>
<p>The <a href="http://cr.yp.to/ucspi-tcp.html">ucspi-tcp</a> package provides the <code>tcpserver</code> and <code>rblsmtpd</code> programs.  <code>tcpserver</code> accepts incoming TCP connections and passes them to another program such as <code>qmail-smtpd</code>.  <code>rblsmtpd</code> blocks connections from RBL listed IPs.</p>
<p>Thanks to Fefe, a <a href="http://www.fefe.de/ucspi/">patch</a> has been around for a while that adds IPv6 support to <code>tcpserver</code>.  Fefe&#8217;s patch does not touch <code>rblsmtpd</code>, however.</p>
<p>I&#8217;ve modified Fefe&#8217;s patch to patch rblsmtpd as well.  You can easily apply my <a href="http://www.bltweb.net/qmail/ucspi-tcp-0.88-ipv6.patch">ucspi-tcp-0.88-ipv6.patch</a>:</p>
<div class="prompt">
$ <span class="cmd">wget <a href="http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz">http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz</a></span><br />
$ <span class="cmd">wget <a href="http://www.bltweb.net/qmail/ucspi-tcp-0.88-ipv6.patch">http://www.bltweb.net/qmail/ucspi-tcp-0.88-ipv6.patch</a></span><br />
$ <span class="cmd">tar -xzf ucspi-tcp-0.88.tar.gz</span><br />
$ <span class="cmd">cd ucspi-tcp-0.88</span><br />
$ <span class="cmd">patch -p1 < ../ucspi-tcp-0.88-ipv6.patch</span><br />
$ <span class="cmd">make</span><br />
$ <span class="cmd">sudo make install</span>
</div>
<h4>tcpserver</h4>
<p>To understand what the <code>tcpserver</code> portion of the IPv6 patch does, you should read <a href="http://www.fefe.de/ucspi/">Fefe&#8217;s ucspi-tcp</a> page.  Essentially, if a client connects via IPv4, <code>tcpserver</code> exhibits it&#8217;s normal behavior.  If a client connects with IPv6, the <code>PROTO</code> environment variable will be set to &#8220;<code>TCP6</code>&#8220;.</p>
<p>The patch also supports using IPv6 addresses in your tcprules files.  A new rule may look like this:</p>
<div class="file">
# Ignore RBL lookups for home server<br />
2001:470:1f0f:350::1:allow:RBLSMTPD=&#8221;"
</div>
<p>After applying this patch, you may notice that your logs are filled with addresses similar to: <code>::ffff:192.168.1.1</code>.  This is because internally <code>tcpserver</code> treats every IP as an IPv6 address.  IPv4 addresses are represented using their <a href="http://en.wikipedia.org/wiki/IPv6#IPv4_mapped_addresses">IPv4 mapped address</a>.</p>
<h4>rblsmtpd</h4>
<p>When patching <code>rblsmtpd</code> for IPv6 support, I had to decide how to lookup IPv6 addresses.  As far as I know, there aren&#8217;t any IPv6 blacklists yet.  There isn&#8217;t a spec on how these addresses should be queried.  My patch will use a new namespace, <code>ipv6</code>, when querying RBLs as described <a href="http://mail-archives.apache.org/mod_mbox/spamassassin-dev/200508.mbox/%3C136001c5a72c$39cf6560$7d25a8c0@watson1%3E">here</a>.  This means if you connect via <code>2001:470:1f0f:350::1</code>, a <code>TXT</code> DNS lookup will be made to:</p>
<div style="padding-left: 8px;" class="prompt">
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.5.3.0.f.0.f.1.0.7.4.0.1.0.0.2.ipv6.rbl.example.org
</div>
<p>If anyone knows of a working RBL that differs, please let me know.</p>
<h4>Summary</h4>
<p>If you have any comments, corrections, or questions, please feel free to leave a comment below.  Remember Gentoo users can apply all of my qmail patches automatically by using the ebuilds in my <a href="/blog/gentoo-overlay/">gentoo-overlay</a>.</p>
<p>Once you&#8217;ve patched <code>tcpserver</code>, you should move on to <a href="/blog/2009/08/qmail-ipv6-sslserver/">patching ucspi-ssl (sslserver) for IPv6</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/08/qmail-ipv6-tcpserver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Qmail IPv6</title>
		<link>http://www.brandonturner.net/blog/2009/08/qmail-ipv6/</link>
		<comments>http://www.brandonturner.net/blog/2009/08/qmail-ipv6/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:12:56 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=423</guid>
		<description><![CDATA[In this series of posts I describe how to enable IPv6 support in qmail, including tcpserver, sslserver, rblsmtpd, qmail-smtpd, qmail-remote and jgreylist.]]></description>
			<content:encoded><![CDATA[<p>Adding IPv6 support to qmail can be a daunting task.  A <em>modern</em> qmail system includes several different components, with various patches and configuration options for each.  There are a few patches on the internet that claim to add IPv6 support for a specific component, but I had trouble finding patches for every piece of my qmail install.</p>
<p>I&#8217;m not trying to defend IPv6. I realize there are many people with strong feelings towards the subject, including <a href="http://cr.yp.to/djbdns/ipv6mess.html">qmail&#8217;s author</a>.  Switching to IPv6 is a monumental task.  It may never happen, but something needs to &#8211; we can&#8217;t keep NATing forever.</p>
<p>Many software projects have already added support for IPv6.  My Gentoo box has been on an IPv6 network, via Hurricane Electric&#8217;s free <a href="http://tunnelbroker.net">tunnel broker</a> service for a while now.  Mac OS X has support for IPv6, as do the latest versions of Windows.  Even Windows XP can support IPv6 if enabled.  <a href="http://www.postfix.org/IPV6_README.html">Postfix</a>, <a href="http://www.exim.org/exim-html-3.20/doc/html/spec_4.html#SEC24">Exim</a>, and <a href="http://www.sendmail.org/~ca/email/sm-810.html">Sendmail</a> all support IPv6.</p>
<p>In this series of posts, I will outline the steps I took to add IPv6 support to qmail.  I use John Simpson&#8217;s <a href="http://qmail.jms1.net/patches/combined-details.shtml">combined patch</a> for qmail as well as many other tools and methodologies described on his <a href="http://qmail.jms1.net/">site</a>, however many of the patches and instructions in these posts will work for other <em>versions</em> of qmail as well.</p>
<p><a name="components"></a></p>
<h4>Components</h4>
<p>John Simpson has an excellent illustration of a typical qmail system, <a href="http://qmail.jms1.net/qmail-system.pdf">Anatomy of a typical qmail system</a> [PDF], on his website.  The following articles describe the steps I took to enable IPv6 for each of the necessary components:</p>
<ul class="noseparation">
<li><a href="/blog/2009/08/qmail-ipv6-tcpserver/">tcpserver and rblsmtpd</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-sslserver/">sslserver</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-jgreylist/">jgreylist</a></li>
<li><a href="/blog/2009/08/qmail-ipv6-jms1/">jms1 combined patch</a></li>
</ul>
<p>For Gentoo users, the patches described in each of the above posts can be installed automatically using the ebuilds in my <a href="/blog/gentoo-overlay/">gentoo-overlay</a>.  For others, I&#8217;ve listed all the IPv6 patches on my <a href="http://www.bltweb.net/qmail/">qmail patches</a> page.</p>
<h4>Testing</h4>
<p>Testing your IPv6 enabled qmail setup can be a little confusing.  There aren&#8217;t that many IPv6 enabled mail servers out there.  Even worse, most people don&#8217;t have IPv6 connections.</p>
<p>Hurricane Electric provides a free <a href="http://tunnelbroker.net/">IPv6 tunnel broker</a> service that will allocate a /64 block of addresses that you can use.  I host my personal mail server on a <a href="http://www.linode.com/">Linode</a> which, despite being an excellent VPS, doesn&#8217;t have native IPv6.  To get around this I set up a tunnel broker and enabled AAAA entries in DNS.</p>
<p>To test my setup, I had to install two separate qmail installs on different servers.  Email addresses on my bltweb.net domain are now IPv6 enabled.  If you&#8217;d like to use them to test, feel free to shoot me an email.  Perhaps one day I&#8217;ll set up some type of reflector to automatically test.</p>
<h4>IPv6 email experience</h4>
<p>I&#8217;ve been running IPv6 mail servers at home and work for a few months now.  I haven&#8217;t been keeping detailed statistics, but for the most part the only connections I&#8217;ve seen over IPv6 thus far have been spam <img src='http://www.brandonturner.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Still, enabling IPv6 in qmail wasn&#8217;t as hard as I thought it was going to be, thanks to the pre-existing patches on the internet.  Hopefully more and more companies will start to enable IPv6 on their networks, such as <a href="http://www.personal.psu.edu/dvm105/blogs/ipv6/2009/06/netflix-streaming-over-ipv6.html">Netflix</a>.  While email may still be even further out it never hurts to be ready.</p>
<p>Hopefully these posts have helped you add IPv6 support to your qmail install.  Feel free to leave comments or questions below and I&#8217;ll do my best to address them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/08/qmail-ipv6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gentoo ebuild for qmail with JMS1 combined patch</title>
		<link>http://www.brandonturner.net/blog/2009/04/qmail-jms1-ebuild/</link>
		<comments>http://www.brandonturner.net/blog/2009/04/qmail-jms1-ebuild/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 05:07:00 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[ebuild]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://www.brandonturner.net/blog/?p=255</guid>
		<description><![CDATA[In a previous post, I introduced a patch to add DKIM and DomainKeys support to Qmail with John Simpson&#8217;s combined patch. In this post I&#8217;ll introduce the ebuild I wrote (well, modified) to allow easily installing qmail-jms1 on a Gentoo system. Though this ebuild makes installing qmail with John&#8217;s patch a little easier, it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.brandonturner.net/blog/2009/03/dkim-and-domainkeys-for-qmail/">previous post</a>, I introduced a patch to add DKIM and DomainKeys support to Qmail with <a href="http://qmail.jms1.net/patches/combined.shtml">John Simpson&#8217;s combined patch</a>.  In this post I&#8217;ll introduce the ebuild I wrote (well, modified) to allow easily installing <em>qmail-jms1</em> on a Gentoo system.</p>
<p>Though this ebuild makes installing qmail with John&#8217;s patch a little easier, it doesn&#8217;t make administering a qmail system child&#8217;s play.  Before merging this ebuild, you should read through <a href="http://qmail.jms1.net">John&#8217;s website</a>.  You may also want to read about <a href="http://www.gentoo.org/doc/en/qmail-howto.xml">netqmail on Gentoo</a>.  While this ebuild has nothing to do with netqmail, it does borrow some the conventions presented in the Gentoo doc concerning starting, stopping and controlling qmail.</p>
<p>I didn&#8217;t include any of John&#8217;s run scripts or configuration files.  Only the combined patch is applied to the base qmail image.  I&#8217;ve also included some additional patches I&#8217;ve found useful.  They are described in more detail on my <a href="http://www.bltweb.net/qmail">qmail patches page</a>.  Most of my extra patches are controlled by use flags (<code>dkim, ipv6</code>) and not applied by default.</p>
<p>For the impatient, here is a direct link to the ebuild:<br />
<a href="http://svn.bltweb.net/repos/public/gentoo_overlay/mail-mta/qmail-jms1/qmail-jms1-7.08-r1.ebuild">http://svn.bltweb.net/repos/public/gentoo_overlay/mail-mta/qmail-jms1/qmail-jms1-7.08-r1.ebuild</a></p>
<h4>Install my portage overlay</h4>
<p>The easiest way to use the qmail-jms1 ebuild is to use my <a href="http://www.brandonturner.net/blog/gentoo-overlay/">Gentoo Portage Overlay</a>.  Please see the <a href="http://www.brandonturner.net/blog/gentoo-overlay/">overlay page</a> for instructions on how to set it up.</p>
<p>You will need the following ebuilds from my overlay:</p>
<ul class="noseparation">
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/virtual/qmail/">virtual/qmail</a></li>
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/mail-mta/qmail-jms1/">mail-mta/qmail-jms1</a></li>
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/sys-apps/ucspi-tcp/">sys-apps/ucspi-tcp</a></li>
<li><a href="http://svn.bltweb.net/repos/public/gentoo_overlay/mail-filter/libdkim/">mail-filter/libdkim</a> (only needed if using the <code>dkim</code> use flag)</li>
</ul>
<h4>Install Qmail</h4>
<p>Once the overlay is set up, installing qmail-jms1 is easy.</p>
<p>Add the following to your <code>/etc/portage/package.keywords</code> file:</p>
<div class="file">
mail-mta/qmail-jms1<br />
sys-apps/ucspi-tcp<br />
mail-filter/libdkim<br />
# You may also need these:<br />
net-mail/dot-forward<br />
sys-process/daemontools<br />
sys-apps/ucspi-ssl<br />
virtual/checkpassword<br />
net-mail/checkpassword-pam
</div>
<p>Now install qmail-jms1:</p>
<div class="prompt">
$ <span class="cmd">emerge -pv qmail-jms1</span><br />
$ <span class="cmd">sudo emerge qmail-jms1</span>
</div>
<h4>Configure Qmail</h4>
<p>Yeah right&#8230;  There is plenty of documentation elsewhere for this.  Try <a href="http://qmail.jms1.net/">John&#8217;s website</a>.</p>
<h4>Start Qmail</h4>
<div class="prompt">
# <span class="cmd">ln -s /var/qmail/supervise/qmail-send /service/qmail-send</span><br />
# <span class="cmd">ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd</span><br />
# <span class="cmd">rc-update add svscan default</span><br />
# <span class="cmd">/etc/init.d/svscan start</span>
</div>
<p>&nbsp;<br />
&nbsp;<br />
That&#8217;s all I have for now.  Installing, configuring and administering qmail should not be taken lightly.  This ebuild has made it easier for me to set up and maintain my servers, however you should only consider using it if you are already familiar with setting up a qmail server.</p>
<p>Feel free to leave any comments, suggestions or problems below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonturner.net/blog/2009/04/qmail-jms1-ebuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
