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?

Peter

Reply via email to