summaryrefslogtreecommitdiffstats
path: root/mail/milter-spamc/files
diff options
context:
space:
mode:
authorclive <clive@FreeBSD.org>2004-10-14 10:16:14 +0000
committerclive <clive@FreeBSD.org>2004-10-14 10:16:14 +0000
commitd31ab45a1b1a5f35f8c228b99fb88fcb9210a66f (patch)
tree7a35998466a57d206119fe2c4fbbc4b89e53df70 /mail/milter-spamc/files
parentb01e7196ccd17a31bbde61f0e0d58cf84f1b94fc (diff)
downloadFreeBSD-ports-d31ab45a1b1a5f35f8c228b99fb88fcb9210a66f.zip
FreeBSD-ports-d31ab45a1b1a5f35f8c228b99fb88fcb9210a66f.tar.gz
Add milter-spamc, a bridge between spamc from SpamAssassin and
sendmail. The libsnert stuff mentioned in the PR is not addressed in this commit, since it is not a run time dependency, and is strictly coupled with milter-spamc itself. PR: ports/71486 Submitted by: Michael O. Boev <mike@tric.tomsk.gov.ru>
Diffstat (limited to 'mail/milter-spamc/files')
-rw-r--r--mail/milter-spamc/files/milter-spamc.sh44
-rw-r--r--mail/milter-spamc/files/patch-aa10
-rw-r--r--mail/milter-spamc/files/patch-ab72
-rw-r--r--mail/milter-spamc/files/patch-ac11
-rw-r--r--mail/milter-spamc/files/patch-ad10
-rw-r--r--mail/milter-spamc/files/patch-ae11
6 files changed, 158 insertions, 0 deletions
diff --git a/mail/milter-spamc/files/milter-spamc.sh b/mail/milter-spamc/files/milter-spamc.sh
new file mode 100644
index 0000000..ea6f355
--- /dev/null
+++ b/mail/milter-spamc/files/milter-spamc.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: %%NAME%%
+# REQUIRE: syslogd
+# BEFORE: sendmail
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable milter-spamc:
+#
+#%%NAME%%_enable="YES"
+#
+# See %%PREFIX%%/share/doc/milter-spamc/index.shtml for flags
+#
+
+. %%RC_SUBR%%
+
+name=%%NAME%%
+rcvar=`set_rcvar`
+
+# set defaults
+%%NAME%%_enable=${%%NAME%%_enable:-"NO"}
+%%NAME%%_chdir="/var/spool/milter-spamc"
+%%NAME%%_pidfile=${%%NAME%%_pidfile:-"$%%NAME%%_chdir/pid"}
+%%NAME%%_flags=${%%NAME%%_flags:-"-f /etc/mail/sendmail.cf unix:$%%NAME%%_chdir/socket"}
+
+command=%%PREFIX%%/sbin/milter-spamc
+required_dirs="$%%NAME%%_chdir"
+
+start_cmd=start_cmd
+start_cmd()
+{
+ if [ -s "$%%NAME%%_chdir/mutex" ]; then
+ ipcrm -s `cat $%%NAME%%_chdir/mutex`
+ fi
+ rm -f $%%NAME%%_chdir/{mutex,socket} $%%NAME%%_pidfile
+ cd $%%NAME%%_chdir && $command $%%NAME%%_flags >/dev/null &
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/milter-spamc/files/patch-aa b/mail/milter-spamc/files/patch-aa
new file mode 100644
index 0000000..a5d0833
--- /dev/null
+++ b/mail/milter-spamc/files/patch-aa
@@ -0,0 +1,10 @@
+--- configure.orig Fri Jun 11 20:37:06 2004
++++ configure Wed Jun 16 13:43:31 2004
+@@ -1617,6 +1617,6 @@
+ COMPILE='$(CC) $(CFLAGS) $(CC_O)$*$O -c $<'
+
+- CFLAGS="$CFLAGS -pthread -fvolatile"
++ CFLAGS="$CFLAGS -Wall -fvolatile"
+ elif test "$OS" = 'SunOS'; then
+ # This used to be -I{}, but I've seen two different SunOS 5.8
+ # systems in two different parts of the world with man pages
diff --git a/mail/milter-spamc/files/patch-ab b/mail/milter-spamc/files/patch-ab
new file mode 100644
index 0000000..332dc4d
--- /dev/null
+++ b/mail/milter-spamc/files/patch-ab
@@ -0,0 +1,72 @@
+--- install.sh.in.orig Fri May 21 16:12:40 2004
++++ install.sh.in Thu Oct 14 13:40:27 2004
+@@ -12,60 +12,20 @@
+ STARTUP_EXT="@STARTUP_EXT@"
+ MAILDIR="@with_sendmail@"
+
+-if [ ! -d ${STATEDIR} ]; then
+- mkdir -p ${STATEDIR}
+-fi
+-chown ${USER} ${STATEDIR}
+-chgrp ${GROUP} ${STATEDIR}
++install -d -o $USER -g $USER -m 755 $STATEDIR
+
+ RC="${STARTUP_DIR}/${MILTER}${STARTUP_EXT}"
+-if [ ! -f $RC ]; then
+- cp ${MILTER}.sh $RC
+- chmod 540 $RC
++${BSD_INSTALL_SCRIPT} ${MILTER}.sh.freebsd $RC.sample
++[ ! -f $RC ] && cp $RC.sample $RC
+
+- case `uname -s` in
+- Linux*)
+- which chkconfig
+- if test $? -eq 0; then
+- chkconfig --add ${MILTER}
+- else
+- # Probably a stupid Debian system.
+- cd ${STARTUP_DIR}
++${BSD_INSTALL_PROGRAM} ${MILTER} ${SBINDIR}
+
+- # Create relative links
+- cd ../rc0.d
+- ln -s ../init.d/${MILTER} K20${MILTER}
+- cd ../rc1.d
+- ln -s ../init.d/${MILTER} K20${MILTER}
+- cd ../rc6.d
+- ln -s ../init.d/${MILTER} K20${MILTER}
++${BSD_INSTALL_DATA} ${MILTER}.mc ${MAILDIR}/${MILTER}.mc.sample
++[ ! -f ${MAILDIR}/${MILTER}.mc ] && cp ${MAILDIR}/${MILTER}.mc.sample ${MAILDIR}/${MILTER}.mc
+
+- # Assume S20sendmail or higher.
+- cd ../rc2.d
+- ln -s ../init.d/${MILTER} S18${MILTER}
+- cd ../rc3.d
+- ln -s ../init.d/${MILTER} S18${MILTER}
+- cd ../rc4.d
+- ln -s ../init.d/${MILTER} S18${MILTER}
+- cd ../rc5.d
+- ln -s ../init.d/${MILTER} S18${MILTER}
+- fi
+- ;;
+- SunOS*)
+- # Does SunOS have a chkconfig like tool?
+- ln -s $RC /etc/rc2.d/S70${MILTER}
+- ln -s $RC /etc/rcS.d/K30${MILTER}
+- ;;
+- esac
+-fi
+-
+-cp -f ${MILTER} ${SBINDIR}
+-chmod 550 ${SBINDIR}/${MILTER}
+-
+-cp -f ${MILTER}.mc ${MAILDIR}/${MILTER}.mc.sample
+-
+-chmod g+r ${MAILDIR} ${MAILDIR}/access.* ${MAILDIR}/aliases.*
+-chgrp ${GROUP} ${MAILDIR} ${MAILDIR}/access.* ${MAILDIR}/aliases.*
++touch ${MAILDIR}/access.db ${MAILDIR}/aliases.db
++chgrp ${GROUP} ${MAILDIR}/access.db ${MAILDIR}/aliases.db
++chmod g+r ${MAILDIR}/access.db ${MAILDIR}/aliases.db
+
+ echo '***************************************************************'
+ echo
diff --git a/mail/milter-spamc/files/patch-ac b/mail/milter-spamc/files/patch-ac
new file mode 100644
index 0000000..cef4638
--- /dev/null
+++ b/mail/milter-spamc/files/patch-ac
@@ -0,0 +1,11 @@
+--- milter-spamc.c.orig Sun Sep 5 23:36:27 2004
++++ milter-spamc.c Sun Sep 5 23:35:47 2004
+@@ -717,7 +717,7 @@
+ return smfNullWorkspaceError("filterBody");
+
+ if (smfLogDetail & SMF_LOG_TRACE)
+- syslog(LOG_DEBUG, TAG_FORMAT "filterBody(%lx, '%.20s...', %lu) maxBytes=%ld bytesSent=%lu", TAG_ARGS, (long) ctx, chunk, size, maxBytes, data->bytesSent);
++ syslog(LOG_DEBUG, TAG_FORMAT "filterBody(%lx, '%.20s...', %lu) maxBytes=%ld bytesSent=%lu", TAG_ARGS, (long) ctx, chunk, (unsigned long)size, maxBytes, (unsigned long)data->bytesSent);
+
+ if (data->work.skipMessage)
+ goto error0;
diff --git a/mail/milter-spamc/files/patch-ad b/mail/milter-spamc/files/patch-ad
new file mode 100644
index 0000000..611e79b
--- /dev/null
+++ b/mail/milter-spamc/files/patch-ad
@@ -0,0 +1,10 @@
+--- ../lib/configure.orig Wed Jun 16 13:56:11 2004
++++ ../lib/configure Wed Jun 16 13:56:19 2004
+@@ -1621,7 +1621,6 @@
+
+ if test "$OS" = 'FreeBSD'; then
+ # Assume GCC.
+- CFLAGS="${CFLAGS} -D_THREAD_SAFE -pthread"
+ COMPILE='$(CC) $(CFLAGS) $(CC_O)$*$O -c $<'
+ ARCHIVE='ar rc $(LIB) {}'
+ XARGSI='xargs -J{}'
diff --git a/mail/milter-spamc/files/patch-ae b/mail/milter-spamc/files/patch-ae
new file mode 100644
index 0000000..d4731e8
--- /dev/null
+++ b/mail/milter-spamc/files/patch-ae
@@ -0,0 +1,11 @@
+--- milter-spamc.mc.in.orig Wed Jun 16 13:58:58 2004
++++ milter-spamc.mc.in Wed Jun 16 13:59:24 2004
+@@ -4,7 +4,7 @@
+ dnl Example configuration to be added to sendmail.mc.
+ dnl
+
+-define(`_FFR_MILTER', `1')dnl
++dnl define(`_FFR_MILTER', `1')dnl
+
+ dnl -------------------------------------------------------------------
+ dnl Enable this for debug output from Sendmail.
OpenPOWER on IntegriCloud