Bug 275575 - sendmail_enable="YES" does not start sendmail
Summary: sendmail_enable="YES" does not start sendmail
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-rc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-06 18:18 UTC by Gerasimos Melissaratos
Modified: 2023-12-07 12:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerasimos Melissaratos 2023-12-06 18:18:40 UTC
Setting sendmail_enable="YES" in /etc/rc.conf or /etc/rc.conf.local does not start the sendmail daemon. It reports it as starting but their status remains not running. I.e.:

root@dove /etc/mail # service sendmail start   
Starting sendmail.
Starting sendmail_msp_queue.
root@dove /etc/mail # service sendmail status
sendmail is not running.
sendmail_msp_queue is not running.

And `ps` verifies the not running part. It can be started from the console as in

/usr/libexec/sendmail/sendmail -L sm-mta -bd -q30m
/usr/libexec/sendmail/sendmail -L sm-msp-queue -Ac -q30m

and it will be reported as running, it can be stopped, but restart and start both fail silently and slyly.
Comment 1 Gerasimos Melissaratos 2023-12-06 18:50:13 UTC
It works correctly when the variable sendmail_program is set to /usr/libexec/sendmail/sendmail in /etc/rc.conf or /etc/rc.conf.local. So the following can provide a quick fix:

echo sendmail_program="/usr/libexec/sendmail/sendmail" >> /etc/rc.conf

though I believe it would be better if the variable was set in /etc/rc.d/sendmail:

23c23
< command=${sendmail_program:-/usr/sbin/${name}}
---
> command=${sendmail_program:-/usr/libexec/sendmail/${name}}
Comment 2 Gerasimos Melissaratos 2023-12-06 20:38:08 UTC
On further inspection, the problem seems to be with /usr/sbin/mailwrapper. Running /usr/sbin/sendmail or /usr/bin/newaliases seem to fail, but /usr/sbin/makemap and /usr/libexec/sendmail/sendmail sork just fine.