X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fconfig.cc;h=8775b00af8396280792e4af7049973b873f35586;hb=74c4ce6d88bcc643424c5d89cc8d30cd835e46c3;hp=368ed6696cc9d69a4a56a1bdb480c014b2faae63;hpb=35d559eb18d779822074a0781585642028e61ed8;p=notmuch diff --git a/lib/config.cc b/lib/config.cc index 368ed669..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; @@ -593,6 +579,8 @@ _notmuch_config_key_to_string (notmuch_config_key_t key) return "user.other_email"; case NOTMUCH_CONFIG_USER_NAME: return "user.name"; + case NOTMUCH_CONFIG_AUTOCOMMIT: + return "database.autocommit"; default: return NULL; } @@ -638,6 +626,8 @@ _notmuch_config_default (notmuch_database_t *notmuch, notmuch_config_key_t key) return email; case NOTMUCH_CONFIG_NEW_IGNORE: return ""; + case NOTMUCH_CONFIG_AUTOCOMMIT: + return "8000"; case NOTMUCH_CONFIG_HOOK_DIR: case NOTMUCH_CONFIG_BACKUP_DIR: case NOTMUCH_CONFIG_OTHER_EMAIL: