[MacPorts] #60923: mail-server: possible improvements to wrapper script
MacPorts
noreply at macports.org
Sat Aug 1 12:25:54 UTC 2020
#60923: mail-server: possible improvements to wrapper script
--------------------------+-----------------------
Reporter: ryandesign | Owner: essandess
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Resolution: | Keywords:
Port: mail-server |
--------------------------+-----------------------
Comment (by essandess):
Why do you call port load / unload / reload for each port individually?
Why not all at once? If you are concerned that one of the loads / unloads
/ reloads might fail and you want subsequent ones to be attempted anyway,
use the -p flag. (port -p load clamav-server apache-solr8 redis dcc
postfix dovecot rspamd)
Good idea. Would you please modify https://github.com/macports/macports-
ports/pull/7893 to do this?
Why does Start() load redis but Stop() doesn't unload it?
{{{redis}}} is a database required by {{{rspamd}}}, so must it be loaded
when the mail server starts. But other stuff might also depend on
{{{redis}}}, so you don't want to stop it just because the mail server
stops. It's a conservative choice intended not to disrupt and annoy
{{{redis}}} users.
Why does Start() load clamav-server but Stop() doesn't unload it and
Restart() doesn't reload it?
The mail server requires {{{clamav-server}}} to scan incoming mail, so it
must be started. But again, {{{clamav-server}}} users, me included, don't
want {{{clamd}}} to stop running just because the mail server is stopped.
Why does Restart() manually reload postfix and dovecot by unloading,
then waiting a second, then loading? That is exactly what reload already
does so why not use that?
This is a robustness hack I found that is necessary on my own systems to
make sure that {{{postfix}}}'s port 25 is available when the port is
reloaded. If the port system already is waiting a second, then perhaps it
needs additional time for {{{postfix}}}. macOS launchd timing is frankly a
PITA, and I don't known of a general fix beyond just waiting a little
longer, or explicitly checking to make sure that port 25 isn't open before
reloading.
--
Ticket URL: <https://trac.macports.org/ticket/60923#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list