Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2009 21:26:17 -0700
From:      Gregory Shapiro <gshapiro@freebsd.org>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Jails, loopback interfaces and sendmail
Message-ID:  <20090605042617.GC639@monkeyboy.local>
In-Reply-To: <20090604223448.GD465@rugsucker.smi.sendmail.com>
References:  <4A27D38B.6040108@erdgeist.org> <20090604203905.B12292@maildrop.int.zabbadoz.net> <20090604212123.GK59532@rugsucker.smi.sendmail.com> <20090604220734.H12292@maildrop.int.zabbadoz.net> <20090604223448.GD465@rugsucker.smi.sendmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Now that you mention it, we are already using separate FreeBSD files in
> src/etc/sendmail/freebsd{,.submit}.mc so I can do something different
> for FreeBSD.  I think we are still in code slush and not freeze for 8.0.
> I'll double check and if so, make the change tonight (with a note in
> UPDATING).  As I recall, nobody reported a problem resolving localhost
> under FreeBSD.

I'm going to hold off making this change.  It looks like sendmail will
also add the domain in searching since the name isn't qualified:

        /*
        **  Build the search list.
        **      If there is at least one dot in name, start with a null
        **      domain to search the unmodified name first.
        **      If name does not end with a dot and search up local domain
        **      tree desired, append each local domain component to the
        **      search list; if name contains no dots and default domain
        **      name is desired, append default domain name to search list;
        **      else if name ends in a dot, remove that dot.
        */

This leads to lookups that can cause problems:

dns_getcanonname(localhost, trymx=0)
dns_getcanonname: trying localhost.gshapiro.net (AAAA)
        NO: errno=0, h_errno=4
dns_getcanonname: trying localhost.gshapiro.net (A)
        YES
dns_getcanonname: localhost.gshapiro.net
getmxrr([localhost]) returns 1 value(s):
        localhost.gshapiro.net.

We will have to look deeper, perhaps changing the code not to add the
default domain/search list in the case of "localhost".

For now, users who want to use localhost instead of 127.0.0.1 can make
the following change to their /etc/mail/`hostname`.submit.mc:

@@ -22,6 +22,5 @@
 define(`confTIME_ZONE', `USE_TZ')dnl
 define(`confDONT_INIT_GROUPS', `True')dnl
 define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl
-dnl
-dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
-FEATURE(`msp', `[127.0.0.1]')dnl
+DAEMON_OPTIONS(`Name=NoMTA, Addr=localhost, M=E')dnl
+FEATURE(`msp', `[localhost]')dnl




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090605042617.GC639>