create log files with correct permissions

fix PLIST
update TODO
fix files/Makefile references
fix typos in files/sendmailx.sh
specify logging directory on startup
absolute reference to socket directories in smx.conf
fix typo in smx.conf
This commit is contained in:
Adrian Portelli 2005-07-27 16:04:21 +00:00 committed by Thomas Klausner
parent 50a2fb3d4e
commit 87eb2fdb6b
6 changed files with 42 additions and 21 deletions

View file

@ -1,9 +1,10 @@
# $NetBSD: INSTALL,v 1.3 2005/07/19 22:49:42 adrian_p Exp $
# $NetBSD: INSTALL,v 1.4 2005/07/27 16:04:22 adrian_p Exp $
# directories and files
# Directories and files
#
SMXQD=@VARBASE@/spool/smx
DEFEDB=${SMXQD}/defedb
LOGDIR=${SMXQD}
LOGDIR=@VARBASE@/log/smx
case ${STAGE} in
@ -28,9 +29,9 @@ POST-INSTALL)
${CHMOD} 0771 ${SMXQD}/${i}
done
${MKDIR} ${DEFEDB}
${CHOWN} smxq:smxq ${DEFEDB}
${CHMOD} 0700 ${DEFEDB}
${MKDIR} ${SMXQD}/defedb
${CHOWN} smxq:smxq ${SMXQD}/defedb
${CHMOD} 0700 ${SMXQD}/defedb
for i in qmsmtps qmsmtpc qmsmar smtps ibdb ibdb/ibdb
do
@ -45,11 +46,28 @@ POST-INSTALL)
${CHOWN} smxq:smxq ${SMXQD}/ibdb
${CHOWN} smxq:smxq ${SMXQD}/ibdb/ibdb
${CHOWN} smxq:smxq ${SMXQD}/ibdb
${CHMOD} 0700 ${SMXQD}/ibdb
${CHMOD} 0700 ${SMXQD}/ibdb/ibdb
${CHMOD} 0750 ${SMXQD}/smtps
# Setup logging and permissions on log files
#
${MKDIR} ${LOGDIR}
${TOUCH} ${LOGDIR}/qmgr.log
${TOUCH} ${LOGDIR}/smar.log
${TOUCH} ${LOGDIR}/smtpc.log
${TOUCH} ${LOGDIR}/smtps.log
${CHOWN} smxq:operator ${LOGDIR}/qmgr.log
${CHOWN} smxm:operator ${LOGDIR}/smar.log
${CHOWN} smxc:operator ${LOGDIR}/smtpc.log
${CHOWN} smxs:operator ${LOGDIR}/smtps.log
${CHMOD} 0755 ${LOGDIR}/qmgr.log
${CHMOD} 0755 ${LOGDIR}/smar.log
${CHMOD} 0755 ${LOGDIR}/smtpc.log
${CHMOD} 0755 ${LOGDIR}/smtps.log
;;
esac

View file

@ -1,6 +1,9 @@
@comment $NetBSD: PLIST,v 1.6 2005/07/20 00:21:00 adrian_p Exp $
@comment $NetBSD: PLIST,v 1.7 2005/07/27 16:04:21 adrian_p Exp $
bin/createmap
bin/log2time
bin/mailq
bin/qmgrctl
bin/rcvrenvfromlog.sh
bin/runas
bin/smconf
bin/t-mm

View file

@ -3,7 +3,6 @@
- sendmailx, sendailX, smx or smX - choose one and stick to it
- fix the current example smx.conf file (see TODO in the file)
- fix files/Makefile (createmap)
- Test TLS support
- Test SASL support

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.1 2005/07/19 01:44:49 adrian_p Exp $
# $NetBSD: Makefile,v 1.2 2005/07/27 16:04:22 adrian_p Exp $
# Simple Makefile to create smX maps
MM=${bindir}/createmap
MM=@PREFIX@/bin/createmap
# all maps?
all: aliases.db access.db conf.db
@ -12,19 +12,19 @@ all: aliases.db access.db conf.db
aliases.db:aliases
-@TEST@ -f aliases.db && @MV@ aliases.db aliases.db-
\@GREP@ -v '^#' aliases | \${MM}
@GREP@ -v '^#' aliases | ${MM}
@CHOWN@ smxm aliases.db
@CHMOD@ 664 aliases.db
echo "kill -USR1 smar"
access.db:access
-@TEST@ -f access.db && mv access.db access.db-
\@GREP@ -v '^#' access | \${MM} -t' ' -F access.db
@GREP@ -v '^#' access | ${MM} -t' ' -F access.db
@CHOWN@ smxm access.db
@CHMOD@ 664 access.db
echo "kill -USR1 smar"
conf.db:conf
-@TEST@ -f conf.db && mv conf.db conf.db-
\@GREP@ -v '^#' conf | \${MM} -t' ' -F conf.db
@GREP@ -v '^#' conf | ${MM} -t' ' -F conf.db
@CHOWN@ smxq conf.db
@CHMOD@ 664 conf.db
echo "kill -USR1 qmgr"

View file

@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: sendmailx.sh,v 1.2 2005/07/20 00:21:01 adrian_p Exp $
# $NetBSD: sendmailx.sh,v 1.3 2005/07/27 16:04:23 adrian_p Exp $
#
# PROVIDE: sendmailx
# REQUIRE: DAEMON
@ -18,12 +18,13 @@ conf_file="@PKG_SYSCONFDIR@/smx.conf"
required_files=$conf_file
extra_commands="restart"
start_cmd="sendmailx_start"
pidfile="/var/run/${name}.pid"
pidfile="@VARBASE@/run/${name}.pid"
logdir="@VARBASE@/log/smx/"
# restart_cmd="sendmailx_restart"
sendmailx_start()
{
${ctl_command} -l -p ${pidfile} ${conf_files}
${ctl_command} -l -p ${pidfile} -L ${logdir} ${conf_file} &
}
load_rc_config $name

View file

@ -1,4 +1,4 @@
# $NetBSD: smx.conf,v 1.2 2005/07/27 00:09:01 adrian_p Exp $
# $NetBSD: smx.conf,v 1.3 2005/07/27 16:04:23 adrian_p Exp $
# TODO:
# ${NS}
@ -37,7 +37,7 @@ smtps MTA
wait_for_server = 4;
port = 25;
mcp_type = pass;
pass_fd_socket = smtps/mtafd;
pass_fd_socket = @VARBASE@/spool/smx/smtps/mtafd;
user = smxs;
path = "@PREFIX@/libexec/smtps";
# arguments = "smtps -f @SMXCNF@";
@ -55,7 +55,7 @@ smtps MSA
# CDB_gid = ${SMXCGID};
port = 587;
mcp_type = pass;
pass_fd_socket = smtps/msafd;
pass_fd_socket = @VARBASE@/spool/smx/smtps/msafd;
user = smxs;
path = "@PREFIX@/libexec/smtps";
arguments = "smtps -I 1 -N MSA -f @SMXCNF@";
@ -98,7 +98,7 @@ qmgr
mcp_type = wait;
user = smxq;
restartdependencies = { smtps, smtpc, smar };
path = "@PREFIX@/libexe/qmgr";
path = "@PREFIX@/libexec/qmgr";
arguments = "qmgr -f @SMXCNF@";
}