Bug 281615 - mail/exim:exim fails to create notifier socket on start if no correct exit
Summary: mail/exim:exim fails to create notifier socket on start if no correct exit
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dima Panov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-20 20:24 UTC by D
Modified: 2024-12-24 17:41 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (fluffy)


Attachments
patch (421 bytes, patch)
2024-09-20 20:24 UTC, D
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description D 2024-09-20 20:24:10 UTC
Created attachment 253701 [details]
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.