| IPv6 Network - The Sendmail Mail Transfer Agent | | Print | |
IPv6 Network - The Sendmail Mail Transfer Agent
Ten years of experience as a sendmail user has taught me that trying to understand the sendmail configuration process in terms of system administration leads to madness. As black magic, however, it makes a lot of sense. So I’m not in the best position to tell others how to do this. I wouldn’t recommend installing sendmail on a system that doesn’t come with it, unless you really know what you’re doing. Still, I got the sendmail that came with FreeBSD 4.9 to use IPv6, so I can at least share how that’s done. In FreeBSD 5.4, sendmail is configured to use IPv6 by default. Listing 6-5 shows the relevant lines in a .mc file. Under FreeBSD, that would be the /etc/mail/<host.name.tld>.mc file.
Listing 6-5. sendmail IPv6-relevant .mc Configuration
DAEMON_OPTIONS(`Name=MTA-IPv4, Family=inet')
DAEMON_OPTIONS(`Name=MTA-IPv6, Family=inet6')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
The third line makes sendmail work around DNS servers that respond incorrectly to AAAA queries. After adding the IPv6 lines to the .mc file, you should use the m4 utility to create a .cf sendmail configuration file. FreeBSD has a Makefile in /etc/mail that will do this when you type make in that directory.
Under Red Hat ES Linux, this mostly works the same way, except that the .mc file may be named sendmail.mc, and you need the sendmail-cf package to generate the .cf file from the .mc file. However, Linux suffers from IPv4-mapped problems, so you should only enable the IPv6 MTA, which will also accept connections over IPv4. If you enable both IPv4 and IPv6, sendmail will complain about a “wedged” socket in /var/log/maillog and quit. If you are brave enough to edit the .cf file by hand, you can add lines like the ones in Listing 6-6 to the appropriate .cf file to make sendmail IPv6-aware.
Listing 6-6. sendmail IPv6-relevant .cf Configuration
# SMTP daemon options
O DaemonPortOptions=Name=MTA-IPv4, Family=inet
O DaemonPortOptions=Name=MTA-IPv6, Family=inet6
# name resolver options
O ResolverOptions=WorkAroundBrokenAAAA
After editing the configuration file, you must restart sendmail. FreeBSD will do this for you with a make restart, but a good old-fashioned killall -HUP sendmail works, too. Note that within the context of SMTP (and thus sendmail configuration files, including the access file), literal IPv6 addresses are represented as IPv6:address, such as IPv6:2001:db8:31:1::2 (RFC 2821). This means that the localhost address becomes IPv6:::1. However, sendmail versions older than 8.12 use the [2001:db8:31:1::2] format.
| Users' Comments (0) |
|
No comment posted






