# methods. NFS users: flock doesn't work, remember to change mmap_disable.
#lock_method = fcntl
-# Show more verbose process titles (in ps). Currently shows user name and
-# IP address. Useful for seeing who are actually using the IMAP processes
-# (eg. shared mailboxes or if same uid is used for multiple accounts).
-#verbose_proctitle = no
-
# Valid UID range for users, defaults to 500 and above. This is mostly
# to make sure that users can't log in as daemons or other system users.
# Note that denying root logins is hardcoded to dovecot binary and can't
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =
+# Show more verbose process titles (in ps). Currently shows user name and
+# IP address. Useful for seeing who are actually using the IMAP processes
+# (eg. shared mailboxes or if same uid is used for multiple accounts).
+#verbose_proctitle = no
+
##
## Dictionary server settings
##
static struct setting_define imap_setting_defines[] = {
DEF(SET_BOOL, mail_debug),
DEF(SET_BOOL, shutdown_clients),
- DEF(SET_BOOL, verbose_proctitle),
DEF(SET_UINT, imap_max_line_length),
DEF(SET_UINT, imap_idle_notify_interval),
static struct imap_settings imap_default_settings = {
MEMBER(mail_debug) FALSE,
MEMBER(shutdown_clients) FALSE,
- MEMBER(verbose_proctitle) FALSE,
/* RFC-2683 recommends at least 8000 bytes. Some clients however don't
break large message sets to multiple commands, so we're pretty
struct imap_settings {
bool mail_debug;
bool shutdown_clients;
- bool verbose_proctitle;
/* imap: */
unsigned int imap_max_line_length;
DEF(SET_BOOL, version_ignore),
DEF(SET_BOOL, mail_debug),
DEF(SET_BOOL, auth_debug),
+ DEF(SET_BOOL, verbose_proctitle),
DEF(SET_UINT, first_valid_uid),
DEF(SET_UINT, last_valid_uid),
MEMBER(version_ignore) FALSE,
MEMBER(mail_debug) FALSE,
MEMBER(auth_debug) FALSE,
+ MEMBER(verbose_proctitle) FALSE,
MEMBER(first_valid_uid) 500,
MEMBER(last_valid_uid) 0,
bool version_ignore;
bool mail_debug;
bool auth_debug;
+ bool verbose_proctitle;
unsigned int first_valid_uid, last_valid_uid;
unsigned int first_valid_gid, last_valid_gid;
env_put(t_strconcat("IP=", net_ip2addr(&request->remote_ip), NULL));
}
+static const char **
+get_extra_args(struct service *service,
+ const struct service_process_auth_request *request,
+ const char *const *auth_args)
+{
+ const char **extra;
+
+ if (!service->set->master_set->verbose_proctitle || request == NULL)
+ return NULL;
+
+ extra = t_new(const char *, 2);
+ extra[0] = t_strdup_printf("[%s %s]", auth_args[0],
+ net_ip2addr(&request->remote_ip));
+ return extra;
+}
+
struct service_process *
service_process_create(struct service *service, const char *const *auth_args,
const struct service_process_auth_request *request)
service_dup_fds(service, fd[1], request == NULL ? -1 :
request->fd, auth_args != NULL);
drop_privileges(service, auth_args, request);
- process_exec(service->executable, NULL);
+ process_exec(service->executable,
+ get_extra_args(service, request, auth_args));
}
switch (service->type) {
static struct setting_define pop3_setting_defines[] = {
DEF(SET_BOOL, mail_debug),
DEF(SET_BOOL, shutdown_clients),
- DEF(SET_BOOL, verbose_proctitle),
DEF(SET_BOOL, pop3_no_flag_updates),
DEF(SET_BOOL, pop3_enable_last),
static struct pop3_settings pop3_default_settings = {
MEMBER(mail_debug) FALSE,
MEMBER(shutdown_clients) FALSE,
- MEMBER(verbose_proctitle) FALSE,
MEMBER(pop3_no_flag_updates) FALSE,
MEMBER(pop3_enable_last) FALSE,
struct pop3_settings {
bool mail_debug;
bool shutdown_clients;
- bool verbose_proctitle;
/* pop3: */
bool pop3_no_flag_updates;