Index: postfix-dev/conf/postfix-script =================================================================== --- postfix-dev.orig/conf/postfix-script 2019-03-01 11:19:36.053713674 -0500 +++ postfix-dev/conf/postfix-script 2019-03-01 11:19:36.049713674 -0500 @@ -47,6 +47,13 @@ FATAL="$LOGGER -p fatal" PANIC="$LOGGER -p panic" +if [ "X${1#quiet-}" != "X${1}" ]; then + INFO=: + x=${1#quiet-} + shift + set -- $x "$@" +fi + umask 022 SHELL=/bin/sh @@ -122,6 +129,20 @@ echo "Stop postfix" ;; +quick-start) + + $daemon_directory/master -t 2>/dev/null || { + $FATAL the Postfix mail system is already running + exit 1 + } + $daemon_directory/postfix-script quick-check || { + $FATAL Postfix integrity check failed! + exit 1 + } + $INFO starting the Postfix mail system + $daemon_directory/master & + ;; + start|start-fg) $daemon_directory/master -t 2>/dev/null || { @@ -189,7 +210,7 @@ $daemon_directory/master -t 2>/dev/null && { $FATAL the Postfix mail system is not running - exit 1 + exit 0 } $INFO stopping the Postfix mail system kill `sed 1q pid/master.pid` @@ -208,7 +229,7 @@ $daemon_directory/master -t 2>/dev/null && { $FATAL the Postfix mail system is not running - exit 1 + exit 0 } $INFO aborting the Postfix mail system kill `sed 1q pid/master.pid` @@ -252,12 +273,11 @@ exit 0 ;; - -check-fatal) +quick-check) # This command is NOT part of the public interface. $SHELL $daemon_directory/post-install create-missing || { - $FATAL unable to create missing queue directories + $WARN unable to create missing queue directories exit 1 } @@ -267,6 +287,13 @@ $FATAL no $config_directory/master.cf file found exit 1 } + exit 0 + ;; + +check-fatal) + # This command is NOT part of the public interface. + + $daemon_directory/postfix-script quick-check maillog_file=`$command_directory/postconf -h maillog_file` || { $FATAL cannot execute $command_directory/postconf!