[Bug 281615] mail/exim: [PATCH] exim fails to create notifier socket on start if no correct exit

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 20 Sep 2024 20:24:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281615

            Bug ID: 281615
           Summary: mail/exim: [PATCH] exim fails to create notifier
                    socket on start if no correct exit
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: fluffy@FreeBSD.org
          Reporter: dseliv@gmail.com
          Assignee: fluffy@FreeBSD.org
             Flags: maintainer-feedback?(fluffy@FreeBSD.org)

Created attachment 253701
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=253701&action=edit
patch

Since recent version (e.g. 4.98) exim successfully creates notifier socket file
in FreeBSD. But if file already exists during exim start it's just ignored with
error message in log. Without notifier socket exim cannot check if there is
already running exim daemon with e.g. such condition: ${if eq {$queue_size} {}
}.

Repro steps:
- kill running exim daemon with KILL signal;
- check if /var/spool/exim/exim_daemon_notify exists;
- start exim daemon: service exim start;
- check mainlog and paniclog: daemon_notifier_socket bind: Address already in
use.

This mostly happens when exim or OS emergency shutdown occurs.
There is no such problem in Linux systems because exim uses abstract unix
sockets there (looks like).

The attached patch adds socket file removing before daemon start.
exim_notifier_socket variable is added for notifier_socket setting overriding
in exim configuration.

-- 
You are receiving this mail because:
You are the assignee for the bug.