bug-mailfromd


Search for: Advanced

Re: [Bug-mailfromd] ipv6 support?


Hi Brian,

The first version of Mailfromd with IPv6 support is available for
download from:

  ftp://download.gnu.org.ua/pub/alpha/mailfromd/mailfromd-7.99.90.tar.bz2

This version requires the recent Git snapshot of GNU Mailutils, which is
available from:

  ftp://download.gnu.org.ua/pub/alpha/mailutils/mailutils-2.99.90.tar.bz2

Please, note that the Mailfromd documentation is still in development and
does not describe all new features in this release.  If you have any
doubts, feel free to ask.

As usual, I'd appreciate any feedback.

1. How to build:

First, download and build mailutils-2.99.90.  If you use it only for
Mailfromd, configure it as follows:

  ./configure --disable-build-servers --disable-build-clients [other options]

This will build only libraries and development utilities, saving
both time and disk space.  Replace [other options] with any other
options you wish.

The final page of configure output should show the following line (among
others):

  IPv6 support .................. yes

Now, run make and make install, as usual.

Next, unpack and configure mailfromd.  Again, make sure the
configure output contains the above text.  

2. Using IPv6 addresses.

To make mailfromd listen on IPv6 address, use either the
traditional Sendmail address format:

   inet6:PORT@[ADDR]

or a usual URL format:

   inet6://[ADDR]:PORT

Note, that in both cases square brackets are required (RFC 2133).

For example, in mailfromd.conf:

  server milter {
    id myfilter;
    listen "inet6://[fe80::280:48ff:fefb:727d]:7777";
  }

3. Using IPv6 in MFL scripts.

When a connection is requested via an IPv6 socket, the
variables milter_server_family and milter_client_family receive
the value FAMILY_INET6.  The milter_server_address variable
contains the IPv6 address of the server in string representation.
Similarly, for the milter_client_address variable.

The same holds for arguments $2 and $4 to the `connect' handler,
if such is defined.

The `open' function can be used to connect to an IPv6 host, e.g.:

  number fd open("@ inet6://[::1]:25")

The `portprobe' function accepts family specification in its `host'
argument, e.g.:

  portprobe("inet6://[::1]")

returns true if the host ::1 listens on port 25.  

Regards,
Sergey