- Update to 2.68

- Provide rcNG script (thus add mimedefang_enable to your rc.conf)

PR:		ports/146435
Submitted by:	Marko Njezic <mrmax063@maxempire.com>
Approved by:	maintainer timeout (wes; 3 months)
This commit is contained in:
Pav Lucistnik 2010-08-13 08:41:13 +00:00
parent bf69bdf579
commit 5e37d4e2c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=259163
7 changed files with 113 additions and 26 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= mimedefang
PORTVERSION= 2.67
PORTREVISION= 1
PORTVERSION= 2.68
CATEGORIES= mail
MASTER_SITES= http://www.mimedefang.org/static/
@ -50,8 +49,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/include/libmilter/mfapi.h:${PORTSDIR}/mail/sendmail
.endif
.if exists( /usr/local/include/libmilter/mfapi.h )
CONFIGURE_ARGS+= --with-milterinc=${LOCALBASE}/include
CONFIGURE_ARGS+= --with-milterlib=${LOCALBASE}/lib
CONFIGURE_ARGS+= --with-milterinc=${LOCALBASE}/include --with-milterlib=${LOCALBASE}/lib
.endif
post-patch:
@ -61,10 +59,8 @@ pre-install:
@${REINPLACE_CMD} -e '/LOCAL_STATE_DIR/s,/var/lib,/var/db,' ${WRKSRC}/mimedefang.pl
post-install:
@${REINPLACE_CMD} -e 's,# MX_USER=,MX_USER=,g ; \
s,# MX_MAX_RSS=,MX_MAX_RSS=,g ; \
s,# MX_MAX_AS=,MX_MAX_AS=,g' ${WRKSRC}/examples/init-script
@${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${PREFIX}/etc/rc.d/mimedefang.sh-dist
@${REINPLACE_CMD} -e 's,%%CHMOD%%,${CHMOD},g' ${WRKSRC}/examples/init-script
@${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${PREFIX}/etc/rc.d/mimedefang
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
@${MKDIR} ${DOCSDIR}
@ -73,6 +69,8 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/examples/README ${EXAMPLESDIR}
@${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR}
.endif
@[ -d ${SPOOLDIR} ] && ${CHGRP} ${MAILUSER} ${SPOOLDIR}
@[ -d ${QUARANTINEDIR} ] && ${CHGRP} ${MAILUSER} ${QUARANTINEDIR}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (mimedefang-2.67.tar.gz) = d1f67bc03b41484cb9ae52fb0dd4d24b
SHA256 (mimedefang-2.67.tar.gz) = e27f3f084f2b436622f9bee47086a905d4b66e2857b3cbcfec71cba664cf3aeb
SIZE (mimedefang-2.67.tar.gz) = 338779
MD5 (mimedefang-2.68.tar.gz) = b988d34b7d656fcf007a00c23565ed20
SHA256 (mimedefang-2.68.tar.gz) = af6d947eef87f00fe513045bf79828808ea42b9cf70eaee033d5e96e73edf61a
SIZE (mimedefang-2.68.tar.gz) = 342973

View File

@ -1,6 +1,6 @@
--- Makefile.in.orig Mon Aug 9 11:32:55 2004
+++ Makefile.in Thu Dec 23 11:22:02 2004
@@ -182,7 +182,7 @@
--- ./Makefile.in.orig 2010-02-16 17:29:59.000000000 +0100
+++ ./Makefile.in 2010-05-09 16:46:21.000000000 +0200
@@ -201,7 +201,7 @@
chown "$(DEFANGUSER)" $(DESTDIR)$(RPM_INSTALL_ROOT)${CONFDIR}/mimedefang-ip-key > /dev/null 2>&1 || true; \
mkdir -p $(DESTDIR)$(RPM_INSTALL_ROOT)@SPOOLDIR@ > /dev/null 2>&1 || true; \
chown "$(DEFANGUSER)" $(DESTDIR)$(RPM_INSTALL_ROOT)@SPOOLDIR@ || true; \
@ -9,7 +9,7 @@
mkdir -p $(DESTDIR)$(RPM_INSTALL_ROOT)@QDIR@ > /dev/null 2>&1 || true; \
chown "$(DEFANGUSER)" $(DESTDIR)$(RPM_INSTALL_ROOT)@QDIR@ || true; \
chmod 700 $(DESTDIR)$(RPM_INSTALL_ROOT)@QDIR@ || exit 1; \
@@ -196,12 +196,11 @@
@@ -215,12 +215,11 @@
-mkdir -p $(DESTDIR)$(RPM_INSTALL_ROOT)$(MANDIR)/man5 && chmod 755 $(DESTDIR)$(RPM_INSTALL_ROOT)$(MANDIR)/man5
-mkdir -p $(DESTDIR)$(RPM_INSTALL_ROOT)$(MANDIR)/man7 && chmod 755 $(DESTDIR)$(RPM_INSTALL_ROOT)$(MANDIR)/man7
-mkdir -p $(DESTDIR)$(RPM_INSTALL_ROOT)$(MANDIR)/man8 && chmod 755 $(DESTDIR)$(RPM_INSTALL_ROOT)$(MANDIR)/man8
@ -25,7 +25,7 @@
@INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(DESTDIR)$(RPM_INSTALL_ROOT)${CONFDIR}/mimedefang-filter || exit 1; \
fi
@@ -221,9 +220,8 @@
@@ -242,9 +241,8 @@
if test "$(HAVE_SPAM_ASSASSIN)" = "yes" ; then \
mkdir -p $(DESTDIR)$(RPM_INSTALL_ROOT)${CONFDIR} > /dev/null 2>&1 ; \
chmod 755 $(DESTDIR)$(RPM_INSTALL_ROOT)${CONFDIR} ;\

View File

@ -0,0 +1,89 @@
--- examples/init-script.in.orig 2009-05-04 17:34:32.000000000 +0200
+++ examples/init-script.in 2010-08-13 10:34:05.000000000 +0200
@@ -39,6 +39,12 @@
# The socket used by mimedefang to communicate with sendmail
# SOCKET=$SPOOLDIR/mimedefang.sock
+# Timeout while waiting for socket to appear
+# SOCKET_TIMEOUT=60
+
+# The value of socket file access mode
+# SOCKET_MODE=600
+
# Run the multiplexor and filters as this user, not root. RECOMMENDED
MX_USER=@DEFANGUSER@
@@ -132,11 +138,11 @@
# Limit slave processes' resident-set size to this many kilobytes. Default
# is unlimited.
-# MX_MAX_RSS=10000
+MX_MAX_RSS=100000
# Limit total size of slave processes' memory space to this many kilobytes.
# Default is unlimited.
-# MX_MAX_AS=30000
+MX_MAX_AS=300000
# If you want to use the "notification" facility, set the appropriate port.
# See the mimedefang-notify man page for details.
@@ -189,6 +195,7 @@
procname=$PROGDIR/$prog-multiplexor
start_cmd="start_it"
stop_cmd="stop_it"
+ restart_cmd="restart_it"
sig_reload="INT"
reread_cmd="reread_it"
# provide both "reload", the FreeBSD default, with a direct signal to
@@ -199,6 +206,8 @@
# Make sure required vars are set
SOCKET=${SOCKET:=$SPOOLDIR/$prog.sock}
MX_SOCKET=${MX_SOCKET:=$SPOOLDIR/$prog-multiplexor.sock}
+SOCKET_TIMEOUT=${SOCKET_TIMEOUT:=60}
+SOCKET_MODE=${SOCKET_MODE:=600}
start_it() {
if test -r $PID ; then
@@ -281,6 +290,29 @@
kill `cat $MXPID`
return 1
fi
+
+ SOCKET_PREFIX=${SOCKET%:*}
+ # We can have inet or inet6, try to remove 6
+ SOCKET_PREFIX=${SOCKET_PREFIX%6}
+
+ if [ "x$SOCKET" != "x" -a "${SOCKET_PREFIX}" != "inet" ] ; then
+ printf "Waiting for $prog socket."
+ i=${SOCKET_TIMEOUT}
+ while [ $i -ne 0 ]
+ do
+ [ -S "$SOCKET" ] && break
+ printf "."
+ sleep 1
+ i=$(($i-1))
+ done
+ echo ""
+ if [ $i -eq 0 ] ; then
+ echo "There is no $prog socket (${SOCKET})!"
+ return 1
+ fi
+ %%CHMOD%% ${SOCKET_MODE} ${SOCKET} > /dev/null 2>&1
+ fi
+
return 0
}
@@ -368,6 +400,12 @@
fi
}
+restart_it() {
+ stop_it wait
+ start_it
+ RETVAL=$?
+}
+
if type run_rc_command > /dev/null 2>&1
then
# NetBSD/FreeBSD compatible startup script

View File

@ -1,11 +1,11 @@
--- mimedefang-filter.5.in.orig Sun Jun 12 18:37:53 2005
+++ mimedefang-filter.5.in Sun Jun 12 18:38:24 2005
@@ -601,7 +601,7 @@
--- ./mimedefang-filter.5.in.orig 2010-02-24 16:19:43.000000000 +0100
+++ ./mimedefang-filter.5.in 2010-05-09 16:46:21.000000000 +0200
@@ -609,7 +609,7 @@
routine.
.TP
-.B $ClamdSock \fR(default @SPOOLDIR@/clamd.sock)
+.B $ClamdSock \fR(default /var/run/clamav/clamd)
+.B $ClamdSock \fR(default /var/run/clamav/clamd.sock)
Socket used for clamd daemon calls within message_contains_virus_clamd
and entity_contains_virus_clamd unless a socket is provided by the calling
routine.

View File

@ -1,11 +1,11 @@
--- mimedefang.pl.in.orig Fri Jul 13 08:03:23 2007
+++ mimedefang.pl.in Fri Jul 13 08:04:19 2007
@@ -186,7 +186,7 @@
$FprotdHost = "127.0.0.1:10200";
--- ./mimedefang.pl.in.orig 2010-02-24 15:55:03.000000000 +0100
+++ ./mimedefang.pl.in 2010-05-09 16:46:21.000000000 +0200
@@ -184,7 +184,7 @@
$Fprotd6Host = "127.0.0.1:10200";
$SophieSock = "@SPOOLDIR@/sophie";
-$ClamdSock = "@SPOOLDIR@/clamd.sock";
+$ClamdSock = "/var/run/clamav/clamd";
+$ClamdSock = "/var/run/clamav/clamd.sock";
$TrophieSock = "@SPOOLDIR@/trophie";
package MIME::Parser::ParanoidFiler;

View File

@ -4,7 +4,7 @@ bin/mimedefang.pl
bin/md-mx-ctrl
bin/watch-mimedefang
bin/watch-multiple-mimedefangs.tcl
etc/rc.d/mimedefang.sh-dist
etc/rc.d/mimedefang
@unexec if cmp -s %D/etc/mimedefang/mimedefang-filter %D/etc/mimedefang/mimedefang-filter.example; then rm -f %D/etc/mimedefang/mimedefang-filter; fi
etc/mimedefang/mimedefang-filter.example
@unexec if cmp -s %D/etc/mimedefang/sa-mimedefang.cf %D/etc/mimedefang/sa-mimedefang.cf.example; then rm -f %D/etc/mimedefang/sa-mimedefang.cf; fi