You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
53 lines
1.6 KiB
24 years ago
|
#!@l_prefix@/lib/rpm/bash @l_prefix@/etc/rc
|
||
|
##
|
||
|
## rc.smtpfeed -- Run-Commands for SMTPfeed Daemon
|
||
|
##
|
||
|
|
||
|
%config
|
||
|
smtpfeed_enable="no"
|
||
|
smtpfeed_bind_local="127.0.0.1:2525"
|
||
|
smtpfeed_bind_remote="0.0.0.0"
|
||
|
smtpfeed_hostname="localhost"
|
||
|
smtpfeed_timeout_connect="1m"
|
||
|
smtpfeed_timeout_greet="2m"
|
||
|
smtpfeed_timeout_rset="2m"
|
||
|
smtpfeed_maxrcpt="100"
|
||
|
smtpfeed_maxsize="4194304"
|
||
|
|
||
|
|
||
|
%common
|
||
|
smtpfeed_pidfile="@l_prefix@/var/smtpfeed/smtpfeed.pid"
|
||
|
smtpfeed_args="-u -V -E -l mail"
|
||
|
smtpfeed_args="$smtpfeed_args -t connect=${smtpfeed_timeout_connect:-1m}"
|
||
|
smtpfeed_args="$smtpfeed_args -t greet=${smtpfeed_timeout_greet:-2m}"
|
||
|
smtpfeed_args="$smtpfeed_args -t rset=${smtpfeed_timeout_rset:-2m}"
|
||
|
smtpfeed_args="$smtpfeed_args -o ${smtpfeed_bind_remote:-0.0.0.0}"
|
||
|
smtpfeed_args="$smtpfeed_args -c ${smtpfeed_hostname:-localhost}"
|
||
|
smtpfeed_args="$smtpfeed_args -r 1 -R ${smtpfeed_maxrcpt:-100}"
|
||
|
smtpfeed_args="$smtpfeed_args -s ${smtpfeed_maxsize:-4194304}"
|
||
|
smtpfeed_start () {
|
||
|
( @l_prefix@/sbin/smtpfeedd ${smtpfeed_bind_local:-127.0.0.1:2525} \
|
||
|
@l_prefix@/sbin/smtpfeed ${smtpfeed_args} \
|
||
|
</dev/null >/dev/null 2>&1 &
|
||
|
echo "$!" >${smtpfeed_pidfile}
|
||
|
) </dev/null >/dev/null 2>&1
|
||
|
}
|
||
|
smtpfeed_stop () {
|
||
|
if [ -f ${smtpfeed_pidfile} ]; then
|
||
|
kill -TERM `cat ${smtpfeed_pidfile}`
|
||
|
sleep 1
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
%start -p 200 -u root
|
||
|
smtpfeed_start
|
||
|
|
||
|
%stop -p 200 -u root
|
||
|
smtpfeed_stop
|
||
|
|
||
|
%restart -u root
|
||
|
smtpfeed_stop
|
||
|
sleep 1
|
||
|
smtpfeed_start
|
||
|
|