aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/spamd/Makefile1
-rw-r--r--mail/spamd/files/obspamd.in12
2 files changed, 8 insertions, 5 deletions
diff --git a/mail/spamd/Makefile b/mail/spamd/Makefile
index 53c8dc096dae..06aa9dac9977 100644
--- a/mail/spamd/Makefile
+++ b/mail/spamd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= spamd
PORTVERSION= 4.5.0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= BERLIOS
MASTER_SITE_SUBDIR=freebsdspamd
diff --git a/mail/spamd/files/obspamd.in b/mail/spamd/files/obspamd.in
index df81cfb17c59..c6cad28309b7 100644
--- a/mail/spamd/files/obspamd.in
+++ b/mail/spamd/files/obspamd.in
@@ -35,10 +35,7 @@ pidfile="/var/run/spamd.pid"
obspamd_precmd()
{
_rc=0
- # we need the white-space in the grep expr. to limit a failure
- # in parsing the flags, for example if someone
- # defined the word 'IP-based' in the banner.
- echo "${obspamd_flags}" | grep " \-b" 2>&1 > /dev/null
+ echo "${obspamd_flags}" | egrep "(^\-b| \-b)" 2>&1 > /dev/null
if [ $? -eq 1 ]; then
/sbin/mount -p | grep 'fdescfs.*/dev/fd.*fdescfs.*rw' 2>&1 > /dev/null
_rc=${?}
@@ -58,7 +55,12 @@ obspamd_postcmd()
{
if [ -x %%PREFIX%%/sbin/spamd-setup ]; then
if [ -r %%PREFIX%%/etc/spamd/spamd.conf ]; then
- %%PREFIX%%/sbin/spamd-setup -D
+ echo "${obspamd_flags}" | egrep "(^\-b| \-b)" 2>&1 > /dev/null
+ if [ $? ]; then
+ %%PREFIX%%/sbin/spamd-setup -bD
+ else
+ %%PREFIX%%/sbin/spamd-setup -D
+ fi
fi
fi
}