On Tue, Sep 23, 2008 at 04:52:01PM +0200, Peter Rabbitson wrote:
> Wietse Venema wrote:
> > Peter Rabbitson:
> >> Hi,
> >>
> >> I encountered a weird behavior with Postfix when specifying
> >> smtp:localhost as a transport destination. After long debugging, tcpdump
> >> revealed that postfix directly asks for 'localhost.<local dns suffix>',
> >> as specified in /etc/hosts:search without first asking for 'localhost'.
> >> Is this intended behavior, or is this an omission? I am using stock
> >> Debian Postfix 2.5.5-1.1
> >
> > The Postfix SMTP client sets the RES_DEFNAMES flag when it invokes
> > the resolver(3) system library routines to look up the destination
> > host IP address.
> >
> > According to my manual pages,
> >
> > RES_DEFNAMES If set, res_search() will append the default domain name
> > to single-component names (those that do not contain a
> > dot). This option is enabled by default.
> >
>
> As far as I can tell this is a flag set in dns_lookup.c, which can not
> be controlled by external methods. So short from recompiling postfix,
> one either has to use [127.0.0.1] in place of localhost, or remove
> search xxx from /etc/resolv.conf, correct?
When you want to deliver to [127.0.0.1], you may as well say so, the
indirection through "localhost" adds no value. So [127.0.0.1] is your
best approach.
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[EMAIL PROTECTED]>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.