John Peacock wrote:
> [...]
> I seriously doubt that run script is correct.  Both daemontools and runit are
> intended to maintain a *foreground* application and redirect its STDOUT/STDERR
> to the log daemon.  The run script should never exit while the qpsmtpd process
> is running.

This is what we use in the SME Server config (which should use chpst
instead of softlimit):

#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 1999-2005 Mitel Networks Corporation
# Copyright (C) 2005 Gordon Rowell <[EMAIL PROTECTED]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
# Technical support for this program is available from Mitel Networks
# Please visit our web site www.mitel.com/sme/ for details.
#----------------------------------------------------------------------

[ -f ./runenv ] && . ./runenv

export QPSMTPD_CONFIG=/var/service/qpsmtpd/config

exec /usr/local/bin/softlimit -d 25000000 -s 25000000 -l 25000000 \
  /usr/bin/qpsmtpd-forkserver \
        -u qpsmtpd \
        -l 0.0.0.0 \
        -p ${PORT:-25} \
        -c ${INSTANCES:-40} \
        -m ${INSTANCES_PER_IP:-5} \
        2>&1

#sub usage {
#        print <<"EOT";
#usage: qpsmtpd-forkserver [ options ]
# -l, --listen-address addr : listen on a specific address; default 0.0.0.0
# -p, --port P              : listen on a specific port; default 2525
# -c, --limit-connections N : limit concurrent connections to N; default 15
# -u, --user U              : run as a particular user (defualt 'smtpd')
# -m, --max-from-ip M       : limit connections from a single IP; default 5
#EOT
#        exit 0;
#}
#

Gordon

Reply via email to