summaryrefslogtreecommitdiffstats
path: root/network/postgrey
diff options
context:
space:
mode:
Diffstat (limited to 'network/postgrey')
-rw-r--r--network/postgrey/README4
-rw-r--r--network/postgrey/doinst.sh1
-rw-r--r--network/postgrey/postgrey.SlackBuild33
-rw-r--r--network/postgrey/postgrey.conf10
-rw-r--r--network/postgrey/postgrey.info6
-rw-r--r--network/postgrey/rc.postgrey12
6 files changed, 44 insertions, 22 deletions
diff --git a/network/postgrey/README b/network/postgrey/README
index 6a29bdc92f..036295e194 100644
--- a/network/postgrey/README
+++ b/network/postgrey/README
@@ -1,2 +1,2 @@
-Postgrey is a Postfix policy server implementing greylisting developed by
-David Schweikert.
+Postgrey is a Postfix policy server implementing greylisting developed
+by David Schweikert.
diff --git a/network/postgrey/doinst.sh b/network/postgrey/doinst.sh
index e935335cd0..5bf85c6667 100644
--- a/network/postgrey/doinst.sh
+++ b/network/postgrey/doinst.sh
@@ -21,5 +21,6 @@ preserve_perms() {
config etc/postfix/postgrey_whitelist_clients.new
config etc/postfix/postgrey_whitelist_recipients.new
+config etc/postgrey.conf.new
preserve_perms etc/rc.d/rc.postgrey.new
diff --git a/network/postgrey/postgrey.SlackBuild b/network/postgrey/postgrey.SlackBuild
index 71fa28387f..4d03f715b2 100644
--- a/network/postgrey/postgrey.SlackBuild
+++ b/network/postgrey/postgrey.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for postgrey
@@ -22,20 +22,30 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=postgrey
-VERSION=${VERSION:-1.34}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.37}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -47,8 +57,8 @@ POSTGREYGRP=${POSTGREYGRP:-nogroup}
POSTGREYUID=${POSTGREYUID:-98}
POSTGREYGID=${POSTGREYGID:-99}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -98,10 +108,13 @@ cp -a policy-test postgrey contrib/postgreyreport $PKG/usr/bin
mkdir -p $PKG/etc/rc.d
sed -e s/%POSTGREYUSR%/$POSTGREYUSR/g \
-e s/%POSTGREYGRP%/$POSTGREYGRP/g \
+ $CWD/postgrey.conf > $PKG/etc/postgrey.conf.new
+sed -e s/%POSTGREYUSR%/$POSTGREYUSR/g \
+ -e s/%POSTGREYGRP%/$POSTGREYGRP/g \
$CWD/rc.postgrey > $PKG/etc/rc.d/rc.postgrey.new
-mkdir -p $PKG/var/{lib,run}/postgrey
-chown $POSTGREYUSR.$POSTGREYGRP $PKG/var/lib/postgrey $PKG/var/run/postgrey
+mkdir -p $PKG/var/lib/postgrey
+chown ${POSTGREYUSR}:${POSTGREYGRP} $PKG/var/lib/postgrey
mkdir -p $PKG/etc/postfix
cp -a postgrey_whitelist_clients $PKG/etc/postfix/postgrey_whitelist_clients.new
@@ -116,4 +129,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/postgrey/postgrey.conf b/network/postgrey/postgrey.conf
new file mode 100644
index 0000000000..db34cb398c
--- /dev/null
+++ b/network/postgrey/postgrey.conf
@@ -0,0 +1,10 @@
+# /etc/postgrey.conf
+#
+# This file will be sourced from /etc/rc.d/rc.postgrey
+#
+PORT=10025
+PIDFILE=/var/run/postgrey/postgrey.pid
+USER=%POSTGREYUSR%
+GROUP=%POSTGREYGRP%
+HOST=mail.example.com
+
diff --git a/network/postgrey/postgrey.info b/network/postgrey/postgrey.info
index 802b44f23a..140612fab0 100644
--- a/network/postgrey/postgrey.info
+++ b/network/postgrey/postgrey.info
@@ -1,8 +1,8 @@
PRGNAM="postgrey"
-VERSION="1.34"
+VERSION="1.37"
HOMEPAGE="http://postgrey.schweikert.ch/"
-DOWNLOAD="http://postgrey.schweikert.ch/pub/old/postgrey-1.34.tar.gz"
-MD5SUM="f736a7be1094593f1a66cd13f32b39ef"
+DOWNLOAD="http://postgrey.schweikert.ch/pub/postgrey-1.37.tar.gz"
+MD5SUM="2ef30f42ad84f00caf41c49b593b8e2a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="perl-Net-Server perl-IO-Multiplex perl-BerkeleyDB perl-net-dns"
diff --git a/network/postgrey/rc.postgrey b/network/postgrey/rc.postgrey
index d763884bfa..5c33151085 100644
--- a/network/postgrey/rc.postgrey
+++ b/network/postgrey/rc.postgrey
@@ -1,17 +1,15 @@
#!/bin/bash
-PORT=10025
-PIDFILE=/var/run/postgrey/postgrey.pid
-USER=%POSTGREYUSR%
-GROUP=%POSTGREYGRP%
-HOST=mail.example.com
+. /etc/postgrey.conf || exit 1
postgrey_start() {
echo "Starting postgrey milter: /usr/bin/postgrey -d --inet=$PORT --pidfile=$PIDFILE --user=$USER --group=$GROUP --dbdir=/var/lib/postgrey --hostname=$HOST"
- mkdir -p /var/run/postgrey
+ mkdir -p $(dirname $PIDFILE)
+ chown ${USER}:${GROUP} $(dirname $PIDFILE)
+
/usr/bin/postgrey -d \
--inet=$PORT \
- --pidfile=/var/run/postgrey/postgrey.pid \
+ --pidfile=$PIDFILE \
--user=$USER --group=$GROUP \
--dbdir=/var/lib/postgrey \
--hostname=$HOST