※下記のように設問に対応する。(設問順序は、必ずしもこの順番にはなりません)
Please specify the prefix for installed file names. This is useful
if you are building ready-to-install packages for distribution to
other machines.
install_root: [/]
Please specify a directory for scratch files while installing
Postfix. You must have write permission in this directory.
tempdir: [/usr/local/src/postfix-3.7.3] /tmp
Please specify the destination directory for installed Postfix
configuration files.
config_directory: [/usr/local/etc/postfix]
Please specify the destination directory for installed Postfix
administrative commands. This directory should be in the command
search path of adminstrative users.
command_directory: [/usr/local/sbin]
Please specify the destination directory for installed Postfix
daemon programs. This directory should not be in the command search
path of any users.
daemon_directory: [/usr/local/libexec/postfix]
Please specify the final destination directory for Postfix-writable
data files such as caches or random numbers. This directory should
not be shared with non-Postfix software.
data_directory: [/var/lib/postfix] /var/tmp/postfix
Please specify the destination directory for the Postfix HTML files.
Specify "no" if you do not want to install these files.
html_directory: [no]
Please specify the owner of the Postfix queue. Specify an account
with numerical user ID and group ID values that are not used by any
other accounts on the system.
mail_owner: [postfix]
Please specify the full destination pathname for the installed
Postfix mailq command. This is the Sendmail-compatible mail queue
listing command.
mailq_path: [/usr/bin/mailq] /usr/local/libexec/postfix/mailq
Please specify the destination directory for the Postfix on-line
manual pages. You can no longer specify "no" here.
manpage_directory: [/usr/local/man]
Please specify the full destination pathname for the installed
Postfix newaliases command. This is the Sendmail-compatible command
to build alias databases for the Postfix local delivery agent.
newaliases_path: [/usr/bin/newaliases] /usr/local/libexec/postfix/newaliases
Please specify the destination directory for Postfix queues.
queue_directory: [/var/spool/postfix]
Please specify the destination directory for the Postfix README
files. Specify "no" if you do not want to install these files.
readme_directory: [no] /usr/local/etc/postfix/docs
Please specify the full destination pathname for the installed
Postfix sendmail command. This is the Sendmail-compatible mail
posting interface.
sendmail_path: [/usr/sbin/sendmail] /usr/local/libexec/postfix/sendmail
Please specify the group for mail submission and for queue management
commands. Specify a group name with a numerical group ID that is
not shared with other accounts, not even with the Postfix mail_owner
account. You can no longer specify "no" here.
setgid_group: [postdrop]
Please specify the final destination directory for Postfix
shared-library files.
shlib_directory: [no]
Please specify the final destination directory for non-executable
files that are shared among multiple Postfix instances, such as
postfix-files, dynamicmaps.cf, as well as the multi-instance template
files main.cf.proto and master.cf.proto.
meta_directory: [/usr/local//etc/postfix]
#!/bin/sh
# PROVIDE: milter-manager
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable milter-manager:
#
# milter_manager_enable=yes
#
. /etc/rc.subr
name="milter_manager"
rcvar="milter_manager_enable"
extra_commands="reload"
load_rc_config $name
: ${milter_manager_enable="NO"}
: ${milter_manager_pid_file="/var/run/milter-manager/milter-manager.pid"}
if getent passwd milter-manager > /dev/null; then
: ${milter_manager_user_name="milter-manager"}
else
: ${milter_manager_user_name="mailnull"}
fi
if getent group milter-manager > /dev/null; then
: ${milter_manager_group_name="milter-manager"}
else
: ${milter_manager_group_name="mailuser"}
fi
: ${milter_manager_socket_group_name="mailuser"}
: ${milter_manager_connection_spec=""}
: ${milter_manager_debug="NO"}
command=/usr/local/sbin/milter-manager
pidfile="${milter_manager_pid_file}"
command_args="--pid-file ${milter_manager_pid_file}"
if test -n "${milter_manager_user_name}"; then
command_args="${command_args} --user-name ${milter_manager_user_name}"
fi
if test -n "${milter_manager_group_name}"; then
command_args="${command_args} --group-name ${milter_manager_group_name}"
fi
if test -n "${milter_manager_socket_group_name}"; then
command_args="${command_args} --unix-socket-group ${milter_manager_socket_group_name}"
fi
if test -n "${milter_manager_connection_spec}"; then
command_args="${command_args} --spec ${milter_manager_connection_spec}"
fi
if test "$milter_manager_debug" = "YES"; then
command_args="${command_args} --verbose"
else
command_args="${command_args} --daemon"
fi
run_rc_command "$1"
#!/bin/sh
# PROVIDE: milter-opendkim
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: shutdown
# Define these milteropendkim_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/milteropendkim
#
# milteropendkim_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable dkim-milter
# milteropendkim_uid (str): Set username to run milter.
# milteropendkim_gid (str): Set group to run milter.
# milteropendkim_profiles (list): Set to "" by default.
# Define your profiles here.
# milteropendkim_cfgfile (str): Configuration file. See opendkim.conf(5)
#
# milteropendkim_${profile}_* : Variables per profile.
# Sockets must be different from each other.
#
# milteropendkim_socket_perms (str):
# Permissions for local|unix socket.
#
# all parameters below now can be set in opendkim.conf(5).
# milteropendkim_socket (str): Path to the milter socket.
# milteropendkim_domain (str): Domainpart of From: in mails to sign.
# milteropendkim_key (str): Path to the private key file to sign with.
# milteropendkim_selector (str): Selector to use when signing
# milteropendkim_alg (str): Algorithm to use when signing
# milteropendkim_flags (str): Flags passed to start command.
. /etc/rc.subr
name="milteropendkim"
rcvar=milteropendkim_enable
extra_commands="reload"
start_precmd="dkim_prepcmd"
start_postcmd="dkim_start_postcmd"
stop_postcmd="dkim_postcmd"
command="/usr/local/sbin/opendkim"
_piddir="/var/run/milteropendkim"
pidfile="${_piddir}/pid"
sig_reload="USR1"
load_rc_config $name
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
: ${milteropendkim_enable:="NO"}
: ${milteropendkim_uid:="opendkim"}
: ${milteropendkim_gid:="mailuser"}
: ${milteropendkim_cfgfile:="/usr/local/etc/opendkim/opendkim.conf"}
: ${milteropendkim_socket_perms:="0775"}
# Options other than above can be set with $milteropendkim_flags.
# see dkim-milter documentation for detail.
extra_commands="reload"
start_precmd="dkim_prepcmd"
start_postcmd="dkim_start_postcmd"
stop_postcmd="dkim_cleansockets"
command="/usr/local/sbin/opendkim"
sig_reload="USR1"
dkim_cleansockets()
{
case ${milteropendkim_socket%:*} in
local|unix)
rm -f "${milteropendkim_socket#*:}"
;;
esac
}
dkim_get_pidfile()
{
if get_pidfile_from_conf PidFile ${milteropendkim_cfgfile#-x }; then
pidfile="$_pidfile_from_conf"
else
pidfile="/var/run/milteropendkim/${profile:-pid}"
fi
}
dkim_prepcmd()
{
dkim_cleansockets
dkim_get_pidfile
if [ ! -d "$(dirname "$pidfile")" ]; then
mkdir "$(dirname "$pidfile")"
fi
case ${milteropendkim_socket%:*} in
local|unix)
socketfile=${milteropendkim_socket#*:}
install -d -o ${milteropendkim_uid%:*} -g $milteropendkim_gid \
-m ${milteropendkim_socket_perms} \
${pidfile%/*} ${socketfile%/*}
;;
esac
}
dkim_start_postcmd()
{
case ${milteropendkim_socket%:*} in
local|unix)
# postcmd is executed too fast and socket is not created before checking...
sleep 1
chmod -f ${milteropendkim_socket_perms} ${milteropendkim_socket#*:}
;;
esac
}
if [ -n "$2" ]; then
profile="$2"
if [ -n "${milteropendkim_profiles}" ]; then
pidfile="${_piddir}/${profile}.pid"
eval milteropendkim_enable="\${milteropendkim_${profile}_enable:-${milteropendkim_enable}}"
eval milteropendkim_socket="\${milteropendkim_${profile}_socket:-}"
eval milteropendkim_socket_perms="\${milteropendkim_${profile}_socket_perms:-}"
if [ -z "${milteropendkim_socket}" ];then
echo "You must define a socket (milteropendkim_${profile}_socket)"
exit 1
fi
eval milteropendkim_cfgfile="\${milteropendkim_${profile}_cfgfile:-${milteropendkim_cfgfile}}"
eval milteropendkim_domain="\${milteropendkim_${profile}_domain:-${milteropendkim_domain}}"
eval milteropendkim_key="\${milteropendkim_${profile}_key:-${milteropendkim_key}}"
eval milteropendkim_selector="\${milteropendkim_${profile}_selector:-${milteropendkim_selector}}"
eval milteropendkim_alg="\${milteropendkim_${profile}_alg:-${milteropendkim_alg}}"
eval milteropendkim_flags="\${milteropendkim_${profile}_flags:-${milteropendkim_flags}}"
if [ -f "${milteropendkim_cfgfile}" ];then
milteropendkim_cfgfile="-x ${milteropendkim_cfgfile}"
else
milteropendkim_cfgfile=""
fi
if [ -n "${milteropendkim_socket}" ];then
_socket_prefix="-p"
fi
if [ -n "${milteropendkim_uid}" ];then
_uid_prefix="-u"
if [ -n "${milteropendkim_gid}" ];then
milteropendkim_uid=${milteropendkim_uid}:${milteropendkim_gid}
fi
fi
if [ -n "${milteropendkim_domain}" ];then
milteropendkim_domain="-d ${milteropendkim_domain}"
fi
if [ -n "${milteropendkim_key}" ];then
milteropendkim_key="-k ${milteropendkim_key}"
fi
if [ -n "${milteropendkim_selector}" ];then
milteropendkim_selector="-s ${milteropendkim_selector}"
fi
if [ -n "${milteropendkim_alg}" ];then
milteropendkim_alg="-S ${milteropendkim_alg}"
fi
dkim_get_pidfile
command_args="-l ${_socket_prefix} ${milteropendkim_socket} ${_uid_prefix} ${milteropendkim_uid} -P ${pidfile} ${milteropendkim_cfgfile}
${milteropendkim_domain} ${milteropendkim_key} ${milteropendkim_selector} ${milteropendkim_alg}"
else
echo "$0: extra argument ignored"
fi
else
if [ -n "${milteropendkim_profiles}" ] && [ -n "$1" ]; then
if [ "$1" != "restart" ]; then
for profile in ${milteropendkim_profiles}; do
echo "===> milteropendkim profile: ${profile}"
/usr/local/etc/rc.d/milter-opendkim $1 ${profile}
retcode="$?"
if [ "${retcode}" -ne 0 ]; then
failed="${profile} (${retcode}) ${failed:-}"
else
success="${profile} ${success:-}"
fi
done
exit 0
else
restart_precmd=""
fi
else
if [ -f "${milteropendkim_cfgfile}" ];then
milteropendkim_cfgfile="-x ${milteropendkim_cfgfile}"
else
milteropendkim_cfgfile=""
fi
if [ -n "${milteropendkim_socket}" ];then
_socket_prefix="-p"
fi
if [ -n "${milteropendkim_uid}" ];then
_uid_prefix="-u"
if [ -n "${milteropendkim_gid}" ];then
milteropendkim_uid=${milteropendkim_uid}:${milteropendkim_gid}
fi
fi
if [ -n "${milteropendkim_domain}" ];then
milteropendkim_domain="-d ${milteropendkim_domain}"
fi
if [ -n "${milteropendkim_key}" ];then
milteropendkim_key="-k ${milteropendkim_key}"
fi
if [ -n "${milteropendkim_selector}" ];then
milteropendkim_selector="-s ${milteropendkim_selector}"
fi
if [ -n "${milteropendkim_alg}" ];then
milteropendkim_alg="-S ${milteropendkim_alg}"
fi
dkim_get_pidfile
command_args="-l ${_socket_prefix} ${milteropendkim_socket} ${_uid_prefix} ${milteropendkim_uid} -P ${pidfile} ${milteropendkim_cfgfile}
${milteropendkim_domain} ${milteropendkim_key} ${milteropendkim_selector} ${milteropendkim_alg}"
fi
fi
run_rc_command "$1"