Source: postfix
Version: postinst fails if /e/resolv.conf search domain starts with a "."
Severity: normal
X-Debbugs-Cc: par...@debian.org

Dear Postfix maintainers,

When the /etc/resolv.conf search domain considered by postfix.postinst
to configure postfix as an "Internet site" (the default debconf option),
e.g.:

  search .example.com

the installation fails with:


Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: 
debian-sid..example.com
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad 
parameter value: debian-sid..example.com
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error 
exit status 75
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)


Note the double dot in "debian-sid..example.com". Having domain start
with a dot is not explicitly mentioned by resolv.conf(5), but the syntax
is accepted by the glibc resolver, see:

https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/res_query.c;h=ebbe5a6a4ed86abe3fccd4a134bfcf6f613c9bbb;hb=HEAD#l385

(thanks sergiodj@d.o for digging this up).

The postfix.postinst file should tolerate those domains and strip off
leading dots, as the glibc resolver does:

https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/res_query.c;h=ebbe5a6a4ed86abe3fccd4a134bfcf6f613c9bbb;hb=HEAD#l411

The above was verified on an up-to-date Sid system with postfix 3.5.6-1+b1.

Paride

Reply via email to