The patch works both with stock Postfix and IPv6-patched Postfix. People using my TLS+IPv6 patch for Postfix 2.1.x will find a single reject file (src/smtpd/smtpd.c) that can easily be fixed. TLS and IPv6 support have been integrated into Postfix 2.2 so no patch issues with 2.2.x.
Important: this patch works with libspf2 version 2.0.x. Later versions introduce API changes and I haven't updated the patch for that yet.
Note: on the libspf2.org download page there's a "Postfix patch for libspf2" (with different version numbering) which is really this patch. This page will be more uptodate than the libspf2.org page though.
Patch 5 is identical to patch 4 but for a small change to compile cleanly with GCC 3.4.x.
Comments welcome, see the README file for contact address.