Comment 10 for bug 2019195

Revision history for this message
Paride Legovini (paride) wrote :

Hi Scott, thanks for chiming it!

We may digress on whether not handling a trailing dot in myhostname is a postfix bug or not, but I think it's going to be a mostly academic discussion. In practice nobody is going to set myhostname to a host with a trailing dot.

What is setting myhostname to a value with a trailing dot is d/postfix.postinst. I think that should be fixed, stripping the trailing dot to myhostname after doing:

  myhostname=$(hostname --fqdn 2>/dev/null || echo "")

as `hostname --fqdn` is meant to return a FQDN which definitely can have a trailing dot. This could be done by something like:

  myhostname=${myhostname%.}

(By grepping debian/* I found 5 occurrences of `hostname --fqdn`, I suspect all would need a similar treatment.)

In other words I think the right thing to do here it to consider this a packaging bug.