.row &%daemon_startup_sleep%& "time to sleep between tries"
.row &%extra_local_interfaces%& "not necessarily listened on"
.row &%local_interfaces%& "on which to listen, with optional ports"
+.row &%notifier_socket%& "override compiled-in value"
.row &%pid_file_path%& "override compiled-in value"
.row &%queue_run_max%& "maximum simultaneous queue runners"
.endtable
transport driver.
+.new
+.option notifier_socket main string "$spool_directory/exim_daemon_notify"
+This option gives the name for a unix-domain socket on which the daemon
+listens for work and information-requests.
+Only installations running multiple daemons sharing a spool directory
+should need to modify the default.
+
+The option is expanded before use.
+If the platform supports Linux-style abstract socket names, the result
+is used with a nul byte prefixed.
+Otherwise, it should be a full path name and use a directory accessible
+to Exim.
+
+If the Exim command line uses a &%-oX%& option and does not use &%-oP%&
+then a notifier socket is not created.
+.wen
+
+
.option openssl_options main "string list" "+no_sslv2 +no_sslv3 +single_dh_use +no_ticket +no_renegotiation"
.cindex "OpenSSL "compatibility options"
This option allows an administrator to adjust the SSL options applied
mx_fail_domains domain list unset dnslookup 4.43
mysql_servers string list unset main 3.03
never_users string list unset main
+notifier_socket string "$spool_directory/exim_daemon_notify"
+ main 4.94
notify_comsat boolean false appendfile
once string* unset autoreply
once_file_size integer 0 autoreply 3.20
daemon_notifier_fd = -1;
#ifndef EXIM_HAVE_ABSTRACT_UNIX_SOCKETS
{
- uschar * s = string_sprintf("%s/%s", spool_directory, NOTIFIER_SOCKET_NAME);
+ uschar * s = expand_string(notifier_socket);
DEBUG(D_any) debug_printf("unlinking notifier socket %s\n", s);
Uunlink(s);
}
struct sockaddr_un sa_un = {.sun_family = AF_UNIX};
int len;
-DEBUG(D_any) debug_printf("creating notifier socket ");
+if (override_local_interfaces && !override_pid_file_path)
+ {
+ DEBUG(D_any)
+ debug_printf("-oX used without -oP so not creating notifier socket\n");
+ return;
+ }
+
+DEBUG(D_any) debug_printf("creating notifier socket\n");
#ifdef SOCK_CLOEXEC
if ((fd = socket(PF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0)
#ifdef EXIM_HAVE_ABSTRACT_UNIX_SOCKETS
sa_un.sun_path[0] = 0; /* Abstract local socket addr - Linux-specific? */
len = offsetof(struct sockaddr_un, sun_path) + 1
- + snprintf(sa_un.sun_path+1, sizeof(sa_un.sun_path)-1, "%s", NOTIFIER_SOCKET_NAME);
-DEBUG(D_any) debug_printf("@%s\n", sa_un.sun_path+1);
+ + snprintf(sa_un.sun_path+1, sizeof(sa_un.sun_path)-1, "%s",
+ expand_string(notifier_socket));
+DEBUG(D_any) debug_printf(" @%s\n", sa_un.sun_path+1);
#else /* filesystem-visible and persistent; will neeed removal */
len = offsetof(struct sockaddr_un, sun_path)
- + snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s/%s",
- spool_directory, NOTIFIER_SOCKET_NAME);
-DEBUG(D_any) debug_printf("%s\n", sa_un.sun_path);
+ + snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s",
+ expand_string(notifier_socket));
+DEBUG(D_any) debug_printf(" %s\n", sa_un.sun_path);
#endif
if (bind(fd, (const struct sockaddr *)&sa_un, len) < 0)
#ifdef EXIM_HAVE_ABSTRACT_UNIX_SOCKETS
sa_un.sun_path[0] = 0; /* Abstract local socket addr - Linux-specific? */
len = offsetof(struct sockaddr_un, sun_path) + 1
- + snprintf(sa_un.sun_path+1, sizeof(sa_un.sun_path)-1, "%s", NOTIFIER_SOCKET_NAME);
+ + snprintf(sa_un.sun_path+1, sizeof(sa_un.sun_path)-1, "%s",
+ expand_string(notifier_socket));
#else
len = offsetof(struct sockaddr_un, sun_path)
- + snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s/%s",
- spool_directory, NOTIFIER_SOCKET_NAME);
+ + snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s",
+ expand_string(notifier_socket));
#endif
if (connect(fd, (const struct sockaddr *)&sa_un, len) < 0)
#endif
uid_t *never_users = NULL;
+uschar *notifier_socket = US"$spool_directory/" NOTIFIER_SOCKET_NAME ;
const int on = 1; /* for setsockopt */
const int off = 0;
extern BOOL mua_wrapper; /* TRUE when Exim is wrapping an MUA */
extern uid_t *never_users; /* List of uids never to be used */
-#ifdef WITH_CONTENT_SCAN
-#endif
+extern uschar *notifier_socket; /* Name for daemon notifier unix-socket */
extern const int on; /* For setsockopt */
extern const int off;
#ifdef EXIM_HAVE_ABSTRACT_UNIX_SOCKETS
int len = offsetof(struct sockaddr_un, sun_path) + 1
+ snprintf(sa_un.sun_path+1, sizeof(sa_un.sun_path)-1, "%s",
- NOTIFIER_SOCKET_NAME);
+ expand_string(notifier_socket));
sa_un.sun_path[0] = 0;
#else
int len = offsetof(struct sockaddr_un, sun_path)
- + snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s/%s",
- spool_directory, NOTIFIER_SOCKET_NAME);
+ + snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s",
+ expand_string(notifier_socket));
#endif
if (sendto(fd, buf, sizeof(buf), 0, (struct sockaddr *)&sa_un, len) < 0)
{ "mysql_servers", opt_stringptr, {&mysql_servers} },
#endif
{ "never_users", opt_uidlist, {&never_users} },
+ { "notifier_socket", opt_stringptr, {¬ifier_socket} },
#ifndef DISABLE_TLS
{ "openssl_options", opt_stringptr, {&openssl_options} },
#endif
domainlist local_domains = test.ex
qualify_domain = test.ex
queue_only
+notifier_socket = DIR/spool/this_my_notify_socket
log_selector = +millisec
next if /in\shosts_require_dane\?\sno\s\(option\sunset\)/x;
# daemon notifier socket
- s/^(creating notifier socket) .*$/$1/;
- s/^(\s*\d+|ppppp) (creating notifier socket) .+$/ppppp $2/;
+ s/^(\s*\d+|ppppp) (creating notifier socket)$/ppppp $2/;
+ s/^ \@(.*exim_daemon_notify)$/ $1/;
+ s/^(\s*\d+|ppppp) \@(.*exim_daemon_notify)$/ppppp $2/;
next if /unlinking notifier socket/;
# DISABLE_OCSP
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
pid written to TESTSUITE/spool/exim-daemon.pid
changed uid/gid: running as a daemon
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv4) port 1226
pid written to TESTSUITE/spool/exim-daemon.pid
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on 127.0.0.1 port 1228
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv4) port 1226
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv4) port 1226
listening on 127.0.0.1 port 1228
daemon_smtp_port overridden by -oX:
<: 1227
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on 127.0.0.1 port 1228
listening on all interfaces (IPv4) port 1227
pid written to TESTSUITE/spool/exim-daemon.pid
local_interfaces overridden by -oX:
<; 0.0.0.0.1225; 0.0.0.0.1226
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv4) port 1226
pid written to TESTSUITE/spool/exim-daemon.pid
daemon_smtp_port overridden by -oX:
<: 1225
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
pid written to TESTSUITE/spool/exim-daemon.pid
changed uid/gid: running as a daemon
daemon_smtp_port overridden by -oX:
<: 1225
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
pid written to TESTSUITE/spool/exim-daemon.anotherpid
changed uid/gid: running as a daemon
daemon_smtp_port overridden by -oX:
<: 1225
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv4) port 1225
pid written to TESTSUITE/spool/mypidfile
changed uid/gid: running as a daemon
ppppp daemon_smtp_port overridden by -oX:
ppppp <: 1225
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
ppppp listening on all interfaces (IPv4) port 1225
ppppp pid written to TESTSUITE/spool/exim-daemon.pid
ppppp LOG: MAIN
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv6) port 1225
listening on all interfaces (IPv4) port 1225
pid written to TESTSUITE/spool/exim-daemon.pid
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv6) port 1225
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv6) port 1226
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv6) port 1225
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv6) port 1226
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv6) port 1225
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv6) port 1226
dropping to exim gid; retaining priv uid
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
listening on ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6 port 1225
listening on ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6 port 1226
pid written to TESTSUITE/spool/exim-daemon.pid
daemon_smtp_port overridden by -oX:
<: 1227
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv6) port 1227
listening on all interfaces (IPv4) port 1227
listening on 127.0.0.1 port 1228
local_interfaces overridden by -oX:
<; 127.0.0.1
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on 127.0.0.1 port 1227
listening on 127.0.0.1 port 1225
pid written to TESTSUITE/spool/exim-daemon.pid
local_interfaces overridden by -oX:
<; ::0.1225; 0.0.0.0.1225; 0.0.0.0.1226
creating notifier socket
+ TESTSUITE/spool/exim_daemon_notify
listening on all interfaces (IPv6) port 1225
listening on all interfaces (IPv4) port 1225
listening on all interfaces (IPv4) port 1226
ppppp daemon_smtp_port overridden by -oX:
ppppp <: 1225
ppppp creating notifier socket
+ppppp TESTSUITE/spool/exim_daemon_notify
ppppp listening on all interfaces (IPv4) port 1225
ppppp pid written to TESTSUITE/spool/exim-daemon.pid
ppppp LOG: MAIN