X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fconfig.cc;fp=lib%2Fconfig.cc;h=8775b00af8396280792e4af7049973b873f35586;hp=7ecc3c7b4ba25f9a65202b4bedc11056b954b600;hb=7556bb7da27621895327b84d22abba2519c24ba7;hpb=dc8262bd336f1c406e5705ec8cb5029f1bacd524 diff --git a/lib/config.cc b/lib/config.cc index 7ecc3c7b..8775b00a 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -543,25 +543,11 @@ _get_username_from_passwd_file (void *ctx) static const char * _get_email_from_passwd_file (void *ctx) { - - char hostname[256]; - struct hostent *hostent; - const char *domainname; char *email; char *username = _get_username_from_passwd_file (ctx); - gethostname (hostname, 256); - hostname[255] = '\0'; - - hostent = gethostbyname (hostname); - if (hostent && (domainname = strchr (hostent->h_name, '.'))) - domainname += 1; - else - domainname = "(none)"; - - email = talloc_asprintf (ctx, "%s@%s.%s", - username, hostname, domainname); + email = talloc_asprintf (ctx, "%s@localhost", username); talloc_free (username); return email;