How to configure sendmail to run with IPv6
Authors: Gopi Garge, Vaibhav Sharma - Exocore Consulting P Ltd.
E-mail: gopi, email@example.com
Date: 31 Aug 2002
History: This document originated out of a query to the IPv6 list
Assumptions: Reader familiarity with sendmail source distributions and
typical sendmail idiosyncrasies.
has had support for IPv6 for a long time now. The current version
is 8.12.6 and the v6 support has been there since version 8.9.x (??)
The host/server that you want to enable v6 support for sendmail must have
enabled on it. If you use Linux, you can run xinetd-ipv6.
v6 enabled on your host along with the v4 stack, each interface will
a total of three addresses:
an IPv4 address, say 192.168.1.19
an IPv6 link local address, autoconfigured with the MAC address
an IPv6 site local address that would typically encode your v4 address,
can view these addresses by running ifconfig.
Enabling v6 for sendmail:
happens in the sendmail configuration files. It is a good practise
understand how to use the .mc
and convert them to .cf
files using m4.
v6 for sendmail, we mean that an instance of the sendmail daemon
must listen on a v6 socket and respond to incoming connections on
this v6 socket. Such a v6 socket will be bound to a port and an
option that sendmail provides to define these parameters is
( -O on the command line; use man
the option name DaemonPortOptions. This option can take upto eight
(keyword, value) pairs . These are the options which the daemon
can use to gather information on what ports/sockets to bind to.
corresponding .mc file macro is DAEMON_OPTIONS. Here are the example entries
to make in such a .mc
DAEMON_OPTIONS(`Name=MTA-v6, Family=inet6, port=smtp, Addr=::1')
DAEMON_OPTIONS(`Name=MTA-v6, Family=inet6, port=smtp, Addr=fec0:ffff:192:168::19')
keyword, value pairs mentioned here are self-explanatory. The 'Name'
has a value that is used as a string label to identify the daemon instance in
the logs. When you have both a v4 and a v6 stack, you might want to
know how many connections came in via the v4 stack and how many via the v6
stack. 'Name' helps in such a situation. A typical log entry is shown below:
31 12:10:19 hostname sendmail: NOQUEUE: [::1] did not issue MAIL/EXPN/VRFY/ETRN
during connection to MTA-v6
the DAEMON_OPTIONS to the end of your .mc file, making sure that you change
the IPv6 address appropriately. Now, generate the .cf
file using m4. Replace the working copy of the .cf file with the one you
generated and restart the sendmail daemon. Watch maillog for errors. If there
are none, test by using a
telnet ::1 25
to get the sendmail daemon prompt.
Quick and Dirty hack:
Edit your sendmail.cf
Add the following lines with the appropriate IPv6 interface address
just below the section SMTP
sendmail v6 listner - Added 310802
DaemonPortOptions=Name=MTA-v6, Family=inet6, port=smtp, Addr=::1
DaemonPortOptions=Name=MTA-v6, Family=inet6, port=smtp, Addr=fec0:ffff:192:168::19
Restart or HUP sendmail and watch for errors
The Sendmail Reference Guide - pp 60,61
Everything here is Copyright © The Author of the Piece
Anything else is Copyright © 2004 The Bangalore Linux User Group
All Rights Reserved.
Comments? Feedback? Mail The
Website sponsored and maintained by