Page MenuHomeFreeBSD

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

Authored by tijl on Nov 26 2024, 11:13 AM.
Tags
Referenced Files
Unknown Object (File)
Fri, Oct 17, 12:38 PM
Unknown Object (File)
Sat, Oct 11, 8:18 PM
Unknown Object (File)
Thu, Sep 25, 9:54 PM
Unknown Object (File)
Wed, Sep 24, 12:28 AM
Unknown Object (File)
Sep 12 2025, 2:27 PM
Unknown Object (File)
Sep 7 2025, 7:46 AM
Unknown Object (File)
Sep 4 2025, 4:05 PM
Unknown Object (File)
Sep 4 2025, 3:41 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