From 0b8e4f5ca33c433369f1cec484db433f40f70954 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Thu, 25 Apr 2013 19:55:35 -0400 Subject: [PATCH] replace run with separate run for the 2 common deployment methods. Rather than having to edit the run file, it's much easier to rename the run file. Moved qpsmtpd* into bin/ --- qpsmtpd => bin/qpsmtpd | 0 qpsmtpd-async => bin/qpsmtpd-async | 0 qpsmtpd-forkserver => bin/qpsmtpd-forkserver | 0 qpsmtpd-prefork => bin/qpsmtpd-prefork | 0 run | 40 -------------------- run.forkserver | 23 +++++++++++ run.tcpserver | 24 ++++++++++++ 7 files changed, 47 insertions(+), 40 deletions(-) rename qpsmtpd => bin/qpsmtpd (100%) rename qpsmtpd-async => bin/qpsmtpd-async (100%) rename qpsmtpd-forkserver => bin/qpsmtpd-forkserver (100%) rename qpsmtpd-prefork => bin/qpsmtpd-prefork (100%) delete mode 100755 run create mode 100755 run.forkserver create mode 100755 run.tcpserver diff --git a/qpsmtpd b/bin/qpsmtpd similarity index 100% rename from qpsmtpd rename to bin/qpsmtpd diff --git a/qpsmtpd-async b/bin/qpsmtpd-async similarity index 100% rename from qpsmtpd-async rename to bin/qpsmtpd-async diff --git a/qpsmtpd-forkserver b/bin/qpsmtpd-forkserver similarity index 100% rename from qpsmtpd-forkserver rename to bin/qpsmtpd-forkserver diff --git a/qpsmtpd-prefork b/bin/qpsmtpd-prefork similarity index 100% rename from qpsmtpd-prefork rename to bin/qpsmtpd-prefork diff --git a/run b/run deleted file mode 100755 index 79f57ff..0000000 --- a/run +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# You might want/need to to edit these settings -QPUSER=smtpd -# limit qpsmtpd to 300MB memory -MAXRAM=300000000 -BIN=/usr/local/bin -PERL=/usr/bin/perl - -# You should not need to edit these. -QMAILDUID=`id -u $QPUSER` -NOFILESGID=`id -g $QPUSER` -IP=`head -1 config/IP` -PORT=25 -LANG=C - -# Remove the comments between the and tags to choose a -# deployment model. See also: http://wiki.qpsmtpd.org/deploy:start - -# -exec $BIN/softlimit -m $MAXRAM \ - $BIN/tcpserver -c 10 -v -R -p \ - -u $QMAILDUID -g $NOFILESGID $IP $PORT \ - ./qpsmtpd 2>&1 -# - - -# -#exec 2>&1 \ -#sh -c " -# exec $BIN/softlimit -m $MAXRAM \ -# $PERL -T ./qpsmtpd-forkserver \ -# --listen-address $IP \ -# --port $PORT \ -# --port 587 \ -# --limit-connections 15 \ -# --max-from-ip 5 \ -# --user $QPUSER -#" -# diff --git a/run.forkserver b/run.forkserver new file mode 100755 index 0000000..64b9df3 --- /dev/null +++ b/run.forkserver @@ -0,0 +1,23 @@ +#!/bin/sh +# +QPUSER=smtpd +# limit qpsmtpd to 300MB memory +MAXRAM=300000000 +BIN=/usr/local/bin +PERL=/usr/bin/perl +IP=0.0.0.0 +LANG=C + +# See also: http://wiki.qpsmtpd.org/deploy:start + +exec 2>&1 \ +sh -c " + exec $BIN/softlimit -m $MAXRAM \ + $PERL -T ./bin/qpsmtpd-forkserver \ + --listen-address $IP \ + --port 25 \ + --port 587 \ + --limit-connections 15 \ + --max-from-ip 5 \ + --user $QPUSER +" diff --git a/run.tcpserver b/run.tcpserver new file mode 100755 index 0000000..ca543a2 --- /dev/null +++ b/run.tcpserver @@ -0,0 +1,24 @@ +#!/bin/sh +# +QPUSER=smtpd +# limit qpsmtpd to 300MB memory +MAXRAM=300000000 +BIN=/usr/local/bin +PERL=/usr/bin/perl + +IP=`head -1 config/IP` +PORT=25 + +LANG=C +QMAILDUID=`id -u $QPUSER` +NOFILESGID=`id -g $QPUSER` + +# See also: http://wiki.qpsmtpd.org/deploy:start + +# +exec $BIN/softlimit -m $MAXRAM \ + $BIN/tcpserver -c 10 -v -R -p \ + -u $QMAILDUID -g $NOFILESGID $IP $PORT \ + ./bin/qpsmtpd 2>&1 +# +