Page MenuHomeFreeBSD

rc.d/sendmail: Fix error with some configurations
ClosedPublic

Authored by tijl on Nov 26 2024, 11:13 AM.
Tags
Referenced Files
F161383501: D47757.diff
Fri, Jul 3, 7:32 AM
F161383188: D47757.diff
Fri, Jul 3, 7:29 AM
Unknown Object (File)
Wed, Jul 1, 9:04 PM
Unknown Object (File)
Wed, Jul 1, 9:01 PM
Unknown Object (File)
Sun, Jun 28, 11:29 PM
Unknown Object (File)
Thu, Jun 25, 1:41 AM
Unknown Object (File)
Mon, Jun 22, 11:34 PM
Unknown Object (File)
May 26 2026, 5:42 PM
Subscribers

Details

Summary

The sendmail startup script can run 4 daemons: sendmail, sendmail_submit,
sendmail_outbound, and sendmail_msp_queue. Of the first 3 at most one
can be enabled. There's a run_rc_command call for each and the ones for
sendmail and sendmail_msp_queue run unconditionally. For some rc
commands this triggers warnings or errors when sendmail_enable="NO" or
sendmail_msp_queue_enable="NO". Since d2e7bb630b83 these errors are
propagated and the whole script fails.

Fix this by first determining which daemons are enabled, setting ${name}
and ${rcvar} accordingly, and then always calling run_rc_command
conditionally.

Also replace ${name}.cf with sendmail.cf because ${name} isn't always
sendmail.

PR: 282585

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable