Home > Server Admin > IPv6 support for qmail-jms1

IPv6 support for qmail-jms1

August 7th, 2009

This post is part of a series of posts dedicated to IPv6 support for qmail:

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 qmail:

  • DNS lookups should prefer AAAA records, falling back to A records only if AAAA records are not available
  • All code referencing IP addresses should support IPv4 and IPv6 addresses
  • SPF queries should support IPv6 addresses

The fujiwara patch

A qmail IPv6 patch 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 Daniel Bernstein’s site. It does not include support for SPF queries as SPF is not included in the original version of qmail.

John Simpson’s combined patch

I use John Simpson’s combined patch for my qmail installs. This patch adds support for SPF as well as many other things. I have modified the fujiwara patch to apply on top of John’s combined patch as well as support SPF queries.

You can download my modified patch: qmail-1.03-jms1.7.08-ipv6.patch. Installing it is simple:

$ wget http://cr.yp.to/software/qmail-1.03.tar.gz
$ wget http://qmail.jms1.net/patches/qmail-1.03-jms1.7.08.patch
$ wget http://www.bltweb.net/qmail/qmail-1.03-jms1.7.08-ipv6.patch
$ tar -xzf qmail-1.03.tar.gz
$ mv qmail-1.03 qmail-1.03-jms1.7.08
$ cd qmail-1.03-jms1.7.08
$ patch < ../qmail-1.03-jms1.7.08.patch
$ patch -p1 < ../qmail-1.03-jms1.7.08-ipv6.patch
$ sed -ie ’1s/$/ -DINET6/’ conf-cc
$ make
$ make man
$ sudo make setup check

Configuration and running

No special configuration is needed for this patch.

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 tcpserver or sslserver patches.

Email addresses on my bltweb.net domain are IPv6 enabled thanks to a free IPv6 tunnel provided by Hurricane Electric. Feel free to send me an email once you are IPv6 enabled!

Summary

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 gentoo-overlay.

Once you have compiled qmail with IPv6 support, you should re-visit my main qmail IPv6 post for information about testing and using your new IPv6 qmail install.

Brandon Server Admin ,

  1. October 6th, 2009 at 08:38 | #1

    Thanks for the patch, works great :)

  2. qmail admin
    January 1st, 2010 at 07:22 | #2

    very useful, thanks!

  3. qmail admin
    January 2nd, 2010 at 07:44 | #3

    i have a question – how can i using this patch tell qmail-remote which IP address from a local pool use to deliver for ipv4 and which for ipv6? i mean control/bindroutes file, currently i use:

    :127.18.11.22

    but when qmail will be ipv6 friendly, how to provide ipv6 address as well?

  4. January 5th, 2010 at 21:52 | #4

    @qmail admin
    Great question. Looks like I missed this functionality. I’m not sure when I’ll have time to work on this, but I’ll try to get to it soon.

  5. qmail admin
    January 13th, 2010 at 08:19 | #5

    Thanks, currently if you specify anything in control/bindroutes, qmail-remote is dying.

  1. October 6th, 2009 at 08:35 | #1
  2. July 30th, 2010 at 19:57 | #2