aboutsummaryrefslogtreecommitdiff
path: root/mail/spamd
diff options
context:
space:
mode:
authorStefan Walter <stefan@FreeBSD.org>2010-06-30 10:35:05 +0000
committerStefan Walter <stefan@FreeBSD.org>2010-06-30 10:35:05 +0000
commit469ebafb9a8fbfda54e80e856be1bc1def2b6bf8 (patch)
tree399266d2360034690af787300c0487e5687cc29b /mail/spamd
parent778bf76041315ba3821c68577c8ca5f3d6c743cb (diff)
downloadports-469ebafb9a8fbfda54e80e856be1bc1def2b6bf8.tar.gz
ports-469ebafb9a8fbfda54e80e856be1bc1def2b6bf8.zip
Let obspamlogd manage its own pflog interface.
PR: 146571 Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> Approved by: maintainer Feature safe: yes
Notes
Notes: svn path=/head/; revision=257197
Diffstat (limited to 'mail/spamd')
-rw-r--r--mail/spamd/Makefile2
-rw-r--r--mail/spamd/files/obspamlogd.in18
2 files changed, 19 insertions, 1 deletions
diff --git a/mail/spamd/Makefile b/mail/spamd/Makefile
index b0f233b6f110..008a3091fedb 100644
--- a/mail/spamd/Makefile
+++ b/mail/spamd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= spamd
PORTVERSION= 4.5.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= BERLIOS
MASTER_SITE_SUBDIR=freebsdspamd
diff --git a/mail/spamd/files/obspamlogd.in b/mail/spamd/files/obspamlogd.in
index a16e97239b62..f2942c9835f0 100644
--- a/mail/spamd/files/obspamlogd.in
+++ b/mail/spamd/files/obspamlogd.in
@@ -15,6 +15,7 @@
#
# obspamlogd_enable="YES" # Run the spamlogd(8) daemon (YES/NO).
# obspamlogd_flags="" # Extra flags for spamlogd(8) (if enabled).
+# obspamlogd_pflog_if="" # pflog Interface for spamlogd(8) to monitor
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
@@ -32,6 +33,20 @@ pidfile="/var/run/spamlogd.pid"
obspamlogd_precmd()
{
+ if [ ! -z ${obspamlogd_pflog_if} ]; then
+ # Configure i/f explicitly
+ load_kld pflog || {
+ warn "Unable to kldload pflog module"
+ return 1
+ }
+
+ if ! ifconfig ${obspamlogd_pflog_if} create up; then
+ warn "could not bring up ${obspamlogd_pflog_if}"
+ return 1
+ fi
+
+ rc_flags="${rc_flags} -l ${obspamlogd_pflog_if}"
+ fi
_rc=0
/sbin/mount -p | grep 'fdescfs.*/dev/fd.*fdescfs.*rw' 2>&1 > /dev/null
_rc=${?}
@@ -48,6 +63,9 @@ obspamlogd_precmd()
obspamlogd_cleanup()
{
+ if [ -n ${obspamlogd_pflog_if} ]; then
+ ifconfig ${obspamlogd_pflog_if} destroy
+ fi
/bin/rm -f ${pidfile}
}