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.
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
/* lookup_ eval(VAR_ MYDOMAIN) ) == 0)
* 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_
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.