aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorstefan <stefan@FreeBSD.org>2010-06-30 18:35:05 +0800
committerstefan <stefan@FreeBSD.org>2010-06-30 18:35:05 +0800
commitd1896dae6eb8bacc3b5d0da2ea4a43308749dbc7 (patch)
treeadbfa39b7aaae5d5564a023cc27df22e27708a0a /mail
parent3d8922ce468c1b6852af0fd342b551b53e606952 (diff)
downloadfreebsd-ports-gnome-d1896dae6eb8bacc3b5d0da2ea4a43308749dbc7.tar.gz
freebsd-ports-gnome-d1896dae6eb8bacc3b5d0da2ea4a43308749dbc7.tar.zst
freebsd-ports-gnome-d1896dae6eb8bacc3b5d0da2ea4a43308749dbc7.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
Diffstat (limited to 'mail')
-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}
}