# UNIX socket path to master authentication server to find users.
# This is used by imap (for shared users) and lda.
-#auth_socket_path = /var/run/dovecot/auth-master
+#auth_socket_path = /var/run/dovecot/auth-userdb
auth default {
# Space separated list of wanted authentication mechanisms:
# X509_NAME_get_text_by_NID() which returns the subject's DN's
# CommonName.
#ssl_username_from_cert = no
-
- # It's possible to export the authentication interface to other programs:
- #socket listen {
- #master {
- # Master socket provides access to userdb information. It's typically
- # used to give Dovecot's local delivery agent access to userdb so it
- # can find mailbox locations.
- #path = /var/run/dovecot/auth-master
- #mode = 0600
- # Default user/group is the one who started dovecot-auth (root)
- #user =
- #group =
- #}
- #client {
- # The client socket is generally safe to export to everyone. Typical use
- # is to export it to your SMTP server so it can do SMTP AUTH lookups
- # using it.
- #path = /var/run/dovecot/auth-client
- #mode = 0660
- #}
- #}
}
# If you wish to use another authentication server than dovecot-auth, you can
checking the socket path name. */
struct sockaddr_un sa;
socklen_t addrlen = sizeof(sa);
- size_t len;
+ const char *suffix;
if (getsockname(conn->listen_fd, (void *)&sa, &addrlen) < 0)
i_fatal("getsockname(%d) failed: %m", conn->listen_fd);
conn->listen_fd);
}
- len = strlen(sa.sun_path);
- if (len > 7 && strcmp(sa.sun_path + len - 7, "-master") == 0)
+ suffix = strrchr(sa.sun_path, '-');
+ if (strcmp(suffix, "master") == 0)
*type = AUTH_SOCKET_MASTER;
else
*type = AUTH_SOCKET_CLIENT;
static struct mail_user_settings mail_user_default_settings = {
MEMBER(base_dir) PKG_RUNDIR,
- MEMBER(auth_socket_path) "auth-master",
+ MEMBER(auth_socket_path) "auth-userdb",
MEMBER(mail_uid) "",
MEMBER(mail_gid) "",