Opened 3 years ago

Closed 3 years ago

#62001 closed defect (fixed)

opensmtpd sets startupitem.autostart yes

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryanakca (Ryan Kavanagh)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: opensmtpd

Description

Why does opensmtpd autostart its launchd plist?

startupitem.autostart   yes

Most ports that install launchd plists should not automatically load them.

Change History (2)

comment:1 Changed 3 years ago by ryanakca (Ryan Kavanagh)

On Wed, Jan 06, 2021 at 03:57:14PM -0000, MacPorts wrote:

Why does opensmtpd autostart its launchd plist?

startupitem.autostart   yes

Because OpenSMTPD is a system daemon, and the port provides zero functionality unless the daemon is running. By default, the daemon listens on localhost as an unprivileged user, so this should create no security concerns.

That said, looking at a few other ports (apache2, nginx, exim, dovecot) that provide system daemons, it appears that none of them automatically load their launchd plist. So feel free to change the default autostart behaviour to "no". Alternatively, I can prepare a PR doing so.

Most ports that install launchd plists should not automatically load them.

FWIW, it would be helpful to new contributors to document the circumstances under which plists should and should not be automatically loaded, perhaps here [0]. In the Debian world, users typically expect system daemons to be automatically started after installation, while OpenBSD users need to manually enable them. As a newcomer, I don't know what MacPorts users generally expect.

—RAK

[0] https://guide.macports.org/chunked/reference.startupitems.html

comment:2 Changed 3 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

In 733273fc21fb1c28de94f8e924c5fae17d2c3c09/macports-ports (master):

opensmtpd: Disable autostarting

Starting newly installed services automatically is not common in
MacPorts and only used in exceptional cases.

Closes: #62001

Note: See TracTickets for help on using tickets.