Page MenuHomeFreeBSD

Add /etc/rc.d/newaliases
AcceptedPublic

Authored by brooks on Mar 10 2025, 6:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 21, 6:03 AM
Unknown Object (File)
Thu, Sep 18, 2:34 AM
Unknown Object (File)
Sep 15 2025, 1:32 AM
Unknown Object (File)
Sep 9 2025, 4:30 AM
Unknown Object (File)
Sep 2 2025, 11:28 PM
Unknown Object (File)
Sep 2 2025, 10:04 AM
Unknown Object (File)
Aug 23 2025, 4:43 PM
Unknown Object (File)
Aug 16 2025, 12:14 PM
Subscribers

Details

Reviewers
jhb
emaste
Summary

This script runs on firstboot and runs newaliases if /etc/mail/aliases
exists and /etc/mail/aliases.db does not. This allows image creation
scripts to avoid running newaliases.

Due to the switch to dma as the default mailier, this is a no-op in
practice unless the image has configured an alternate mailer.

/etc/rc.d/sendmail has the ability to create/update aliases.db, but it
is disabled by default even if sendmail is enabled.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 62906
Build 59790: arc lint + arc unit

Event Timeline

libexec/rc/rc.d/Makefile
318

Hmm, is this really sendmail specific? My thought was that this should be installed anytime the /usr/bin/newaliases binary (which is a hard link to mailwrapper) is installed.

libexec/rc/rc.d/Makefile
318

Indeed, it should be in utilities.

Move script into the default package (rc).

brooks marked an inline comment as done.

Be a little more friendly to installations without mail bits. It's
unclear that this really matters, but it does appear to be at least
minimally possible to install a system without email support.

I've put the script in the rc package rather then adding a new utilities section for now.

I'm fine with this, but with newaliases a NOP with dma as you point out, could we just stop invoking newaliases in the VM image build scripts and nothing further?

libexec/rc/rc.d/newaliases
34

Why is this one quoted but /etc/mail/aliases above not? I think neither needs quotes.

This revision is now accepted and ready to land.May 7 2025, 6:56 PM