Hi Lamont, I think I've mislead you with the uname() comment.  Yes, I
agree postfix calls glibc's gethostname() and it's that which calls
uname(), but the fault appears to lie with postfix's check_myhostname().
It's got two definitions but they appear the same apart from comments.
It includes

    /*
     * If the local machine name is not in FQDN form, try to append the
     * contents of $mydomain. Use a default domain as a final workaround.
     */
    name = get_hostname();
    if ((dot = strchr(name, '.')) == 0) {
        if ((domain = mail_conf_lookup_eval(VAR_MYDOMAIN)) == 0)
            domain = DEF_MYDOMAIN;
        name = concatenate(name, ".", domain, (char *) 0);
    }

and my ltrace output above does include the strchr(),
mail_conf_lookup_eval(), and concatenate().  So I think it's this that's
appending "localdomain".

The documentation, fully quoted above, says "The default is to use the
fully-qualified domain name from gethostname()."  However, gethostname()
is returning just "blake" but postfix doesn't use that and instead goes
and tacks on ".localdomain".  Either the code or the documentation seems
wrong.

** Changed in: postfix (Ubuntu)
Sourcepackagename: glibc => postfix

-- 
Postfix myhostname defaults to uname() not gethostname().
https://bugs.launchpad.net/bugs/180551
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to