Mercurial > dovecot > core-2.2
diff src/director/user-directory.h @ 14292:817ef4c9f1f3
Added director_username_hash setting to specify what part of the username is hashed.
The default is "%u" meaning the full username. Another potentially useful
value is "%d" for hashing only the domain (i.e. redirect users from the same
domain always to same server so they can safely access each others'
shared mailboxes).
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 05 Mar 2012 17:28:06 +0200 |
parents | 79f9dce5d5fd |
children | 7a26c427fc78 |
line wrap: on
line diff
--- a/src/director/user-directory.h Mon Mar 05 14:27:02 2012 +0200 +++ b/src/director/user-directory.h Mon Mar 05 17:28:06 2012 +0200 @@ -42,7 +42,8 @@ /* Create a new directory. Users are dropped if their time gets older than timeout_secs. */ -struct user_directory *user_directory_init(unsigned int timeout_secs); +struct user_directory * +user_directory_init(unsigned int timeout_secs, const char *username_hash_fmt); void user_directory_deinit(struct user_directory **dir); /* Look up username from directory. Returns NULL if not found. */ @@ -59,7 +60,8 @@ void user_directory_remove_host(struct user_directory *dir, struct mail_host *host); -unsigned int user_directory_get_username_hash(const char *username); +unsigned int user_directory_get_username_hash(struct user_directory *dir, + const char *username); /* Returns TRUE if user still potentially has connections. */ bool user_directory_user_has_connections(struct user_directory *dir,