run: added forkserver section, instructions

added additional instructions
added forkserver startup
segregated local variables
reduced duplicated code
This commit is contained in:
Matt Simerson 2012-05-11 01:50:05 -04:00 committed by Robert
parent 9b8c5a1be4
commit ab258cfc2e

45
run
View File

@ -1,11 +1,38 @@
#!/bin/sh #!/bin/sh
QMAILDUID=`id -u smtpd` #
NOFILESGID=`id -g smtpd` # You might want/need to to edit these settings
LANG=C QPUSER=smtpd
# by default limit qpsmtpd to 150MB memory which should be several # limit qpsmtpd to 150MB memory, should be several times what is needed.
# times what is needed. MAXRAM=150000000
exec /usr/local/bin/softlimit -m 150000000 \ BIN=/usr/local/bin
/usr/local/bin/tcpserver -c 10 -v -R -p \ PERL=/usr/bin/perl
-u $QMAILDUID -g $NOFILESGID `head -1 config/IP` smtp \
./qpsmtpd 2>&1
# You should not need to edit these.
QMAILDUID=`id -u $QPUSER`
NOFILESGID=`id -g $QPUSER`
IP=`head -1 config/IP`
LANG=C
# Remove the comments between the <start> and <end> tags to choose a
# deployment model. See also: http://wiki.qpsmtpd.org/deploy:start
# <start tcpserver>
exec $BIN/softlimit -m $MAXRAM \
$BIN/tcpserver -c 10 -v -R -p \
-u $QMAILDUID -g $NOFILESGID $IP smtp \
./qpsmtpd 2>&1
# <end tcpserver>
# <start forkserver>
#exec 2>&1 \
#sh -c "
# exec $BIN/softlimit -m $MAXRAM \
# $PERL -T ./qpsmtpd-forkserver \
# --listen-address $IP \
# --port 25 \
# --limit-connections 15 \
# --max-from-ip 5 \
# --user $QPUSER
#"
# <end forkserver>