From e35a8afcba2ae0b3a70f820bc88e9ecf3761ee44 Mon Sep 17 00:00:00 2001 From: ijliao Date: Mon, 3 Jun 2002 02:36:00 +0000 Subject: upgrade to 2.13 PR: 38836 Submitted by: maintainer --- mail/mimedefang/Makefile | 27 +++++--- mail/mimedefang/distinfo | 2 +- mail/mimedefang/files/mimedefang.sh | 77 ---------------------- mail/mimedefang/files/patch-Makefile.in | 50 ++++++++++++++ mail/mimedefang/files/patch-configure | 11 ++++ mail/mimedefang/files/patch-init-script.in | 11 ++++ mail/mimedefang/files/patch-mimedefang-filter.5.in | 20 ++++++ .../files/patch-mimedefang-multiplexor.8.in | 11 ++++ mail/mimedefang/files/patch-mimedefang.8.in | 20 ++++++ mail/mimedefang/files/patch-mimedefang.pl.8.in | 25 +++++++ mail/mimedefang/files/patch-mimedefang.pl.in | 22 +++++++ mail/mimedefang/pkg-message | 4 +- mail/mimedefang/pkg-plist | 14 ++-- 13 files changed, 197 insertions(+), 97 deletions(-) delete mode 100644 mail/mimedefang/files/mimedefang.sh create mode 100644 mail/mimedefang/files/patch-Makefile.in create mode 100644 mail/mimedefang/files/patch-configure create mode 100644 mail/mimedefang/files/patch-init-script.in create mode 100644 mail/mimedefang/files/patch-mimedefang-filter.5.in create mode 100644 mail/mimedefang/files/patch-mimedefang-multiplexor.8.in create mode 100644 mail/mimedefang/files/patch-mimedefang.8.in create mode 100644 mail/mimedefang/files/patch-mimedefang.pl.8.in create mode 100644 mail/mimedefang/files/patch-mimedefang.pl.in (limited to 'mail') diff --git a/mail/mimedefang/Makefile b/mail/mimedefang/Makefile index b2abac39f99a..fb92e3bad9da 100644 --- a/mail/mimedefang/Makefile +++ b/mail/mimedefang/Makefile @@ -6,7 +6,7 @@ # PORTNAME= mimedefang -PORTVERSION= 2.12 +PORTVERSION= 2.13 CATEGORIES= mail MASTER_SITES= http://www.roaringpenguin.com/mimedefang/ @@ -23,6 +23,7 @@ BUILD_DEPENDS= \ USE_PERL5= yes PERL_SITELIBDIR= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/mimedefang MAN5= mimedefang-filter.5 MAN7= mimedefang-protocol.7 @@ -32,16 +33,24 @@ MAN8= mimedefang.8 mimedefang.pl.8 mimedefang-multiplexor.8 BUILD_DEPENDS+= ${LOCALBASE}/include/libmilter/mfapi.h:${PORTSDIR}/mail/sendmail .endif +post-extract: + @${MV} ${WRKSRC}/mimedefang-filter.5 ${WRKSRC}/mimedefang-filter.5.in + @${MV} ${WRKSRC}/mimedefang-multiplexor.8 ${WRKSRC}/mimedefang-multiplexor.8.in + @${MV} ${WRKSRC}/mimedefang.8 ${WRKSRC}/mimedefang.8.in + @${MV} ${WRKSRC}/mimedefang.pl.8 ${WRKSRC}/mimedefang.pl.8.in + post-install: - ${INSTALL_SCRIPT} ${FILESDIR}/mimedefang.sh ${PREFIX}/etc/rc.d/mimedefang.sh + @${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${PREFIX}/etc/rc.d/mimedefang.sh-dist .if !defined(NOPORTDOCS) - ${MKDIR} ${EXAMPLESDIR} - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR} + @${MKDIR} ${EXAMPLESDIR} + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/examples/stream-by-domain-filter ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/examples/suggested-minimum-filter-for-windows-clients ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/examples/README ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/README* ${DOCSDIR} .endif - ${CHOWN} mailnull:mailnull /var/spool/MIMEDefang - ${CHMOD} 700 /var/spool/MIMEDefang - ${CAT} ${PKGMESSAGE} + @${CHOWN} mailnull:mailnull /var/spool/MIMEDefang + @${CHMOD} 700 /var/spool/MIMEDefang + @${CAT} ${PKGMESSAGE} .include diff --git a/mail/mimedefang/distinfo b/mail/mimedefang/distinfo index a609bd919abb..6d03bf8281a6 100644 --- a/mail/mimedefang/distinfo +++ b/mail/mimedefang/distinfo @@ -1 +1 @@ -MD5 (mimedefang-2.12.tar.gz) = 91c717239324d18583fd2f23bd2b3be6 +MD5 (mimedefang-2.13.tar.gz) = ee9f7a89068d6c8d6395cad6156917a0 diff --git a/mail/mimedefang/files/mimedefang.sh b/mail/mimedefang/files/mimedefang.sh deleted file mode 100644 index 28da4fa709b6..000000000000 --- a/mail/mimedefang/files/mimedefang.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -# -# initialization/shutdown script for MIMEDefang mail filter - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -# Sool directory -SPOOLDIR=/var/spool/MIMEDefang - -# Limit number of concurrent filters to 10 -MAX_SLAVES=10 -MIN_SLAVES=2 -BUSY_TIMEOUT=240 -IDLE_TIMEOUT=3600 - -# Uncomment next line to log statistics -# STATS_LOG="-t ${SPOOLDIR}/md-stats" - -# Uncomment next line to flush stats file after each write -# FLUSH_STATS=-u -# Comment next line out if you do not want multiplexor to log messages. -# DO_LOGGING=-l - -RETVAL=0 - -MIMEDEFANG=${PREFIX}/bin/mimedefang -MULTIPLEX=${PREFIX}/bin/mimedefang-multiplexor - -# MIMEDefang socket -SOCK=/var/run/mimedefang.sock -# MIMEDefang-multiplexor socket -MXSOCK=/var/run/mdefang-mx.sock -# PID file location -PIDFILE=/var/run/mimedefang.pid -# Multiplexor PID file location -MXPIDFILE=/var/run/mdefang-mx.pid -# MIMEDefang owner -USER=mailnull - -[ -x $MIMEDEFANG ] || exit 1 -[ -x $MULTIPLEX ] || exit 1 - -# See how we were called. -case "$1" in - start) - # Remove socket if it exists - rm -f ${SOCK} - # Start multiplexor - $MULTIPLEX -U ${USER} -x $MAX_SLAVES -m $MIN_SLAVES -b $BUSY_TIMEOUT -i $IDLE_TIMEOUT $DO_LOGGING $STATS_LOG $FLUSH_STATS -s ${MXSOCK} -p ${MXPIDFILE} - RETVAL=$? - [ $RETVAL -ne 0 ] && exit 1 - echo -n " mimedefang-multiplexor" - - $MIMEDEFANG -U ${USER} -m ${MXSOCK} -p ${SOCK} -P ${PIDFILE} - RETVAL=$? - [ $RETVAL -ne 0 ] && exit 1 - echo -n " mimedefang" - ;; - stop) - # Stop daemons. - kill `cat ${PIDFILE}` - echo -n " mimedefang" - kill `cat ${MXPIDFILE}` - echo -n " mimedefang-multiplexor" - ;; - restart) - $0 stop - sleep 5 - $0 start - ;; - *) - echo "usage: `basename $0` {start|stop|restart}" >&2 - ;; -esac diff --git a/mail/mimedefang/files/patch-Makefile.in b/mail/mimedefang/files/patch-Makefile.in new file mode 100644 index 000000000000..71097af8a795 --- /dev/null +++ b/mail/mimedefang/files/patch-Makefile.in @@ -0,0 +1,50 @@ +--- Makefile.in.orig Wed May 29 22:40:47 2002 ++++ Makefile.in Sun Jun 2 22:16:07 2002 +@@ -5,6 +5,7 @@ + # Needed for autoconf to behave properly... + exec_prefix=@exec_prefix@ + prefix=@prefix@ ++sysconfdir=@sysconfdir@ + + MANDIR=@mandir@ + +@@ -93,9 +94,9 @@ + @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter + + install: all +- -mkdir -p $(RPM_INSTALL_ROOT)/etc/mail ++ -mkdir -p $(RPM_INSTALL_ROOT)${sysconfdir} + -if test "$(HAVE_SPAM_ASSASSIN)" = "yes" ; then \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/mail/spamassassin; \ ++ mkdir -p $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin; \ + fi + -mkdir -p $(RPM_INSTALL_ROOT)$(prefix)/bin + -mkdir -p $(RPM_INSTALL_ROOT)$(MANDIR)/man5 +@@ -104,10 +105,9 @@ + -mkdir -p $(RPM_INSTALL_ROOT)@SPOOLDIR@ && chmod 700 $(RPM_INSTALL_ROOT)@SPOOLDIR@ + -mkdir -p $(RPM_INSTALL_ROOT)@QDIR@ && chmod 700 $(RPM_INSTALL_ROOT)@QDIR@ + +- if test -f $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter ; then \ +- @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter.example || exit 1; \ +- else \ +- @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter || exit 1; \ ++ @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)${sysconfdir}/mimedefang-filter.example || exit 1; \ ++ if !(test -f $(RPM_INSTALL_ROOT)${sysconfdir}/mimedefang-filter) ; then \ ++ @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)${sysconfdir}/mimedefang-filter || exit 1; \ + fi + + @INSTALL@ -m 755 mimedefang-multiplexor $(RPM_INSTALL_ROOT)$(prefix)/bin/mimedefang-multiplexor +@@ -119,10 +119,9 @@ + @INSTALL@ -m 644 mimedefang-filter.5 $(RPM_INSTALL_ROOT)$(MANDIR)/man5/mimedefang-filter.5 + @INSTALL@ -m 644 mimedefang-protocol.7 $(RPM_INSTALL_ROOT)$(MANDIR)/man7/mimedefang-protocol.7 + if test "$(HAVE_SPAM_ASSASSIN)" = "yes" ; then \ +- if test -f $(RPM_INSTALL_ROOT)/etc/mail/spamassassin/sa-mimedefang.cf ; then \ +- @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)/etc/mail/spamassassin/sa-mimedefang.cf.example || exit 1; \ +- else \ +- @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)/etc/mail/spamassassin/sa-mimedefang.cf || exit 1; \ ++ @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin/sa-mimedefang.cf.example || exit 1; \ ++ if !(test -f $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin/sa-mimedefang.cf) ; then \ ++ @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin/sa-mimedefang.cf || exit 1; \ + fi \ + fi + diff --git a/mail/mimedefang/files/patch-configure b/mail/mimedefang/files/patch-configure new file mode 100644 index 000000000000..2fe42127a4b5 --- /dev/null +++ b/mail/mimedefang/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig Wed May 29 22:40:42 2002 ++++ configure Sun Jun 2 22:34:17 2002 +@@ -2505,7 +2505,7 @@ + + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/mail/mimedefang/files/patch-init-script.in b/mail/mimedefang/files/patch-init-script.in new file mode 100644 index 000000000000..f1f68dc34c49 --- /dev/null +++ b/mail/mimedefang/files/patch-init-script.in @@ -0,0 +1,11 @@ +--- examples/init-script.in.orig Wed May 29 22:34:24 2002 ++++ examples/init-script.in Sun Jun 2 22:50:49 2002 +@@ -37,7 +37,7 @@ + MULTIPLEXOR=yes + + # Run the multiplexor and filters as this user, not root. RECOMMENDED +-# MX_USER=defang ++MX_USER=mailnull + + # If you want to keep spool directories around if the filter fails, + # set the next one to yes diff --git a/mail/mimedefang/files/patch-mimedefang-filter.5.in b/mail/mimedefang/files/patch-mimedefang-filter.5.in new file mode 100644 index 000000000000..116d8251fbd9 --- /dev/null +++ b/mail/mimedefang/files/patch-mimedefang-filter.5.in @@ -0,0 +1,20 @@ +--- mimedefang-filter.5.in.orig Fri May 31 20:44:02 2002 ++++ mimedefang-filter.5.in Sun Jun 2 21:50:38 2002 +@@ -19,7 +19,7 @@ + directory and the e-mail message is split into parts in this directory. + + .PP +-2) If the file \fB/etc/mail/mimedefang-filter.pl\fR defines a Perl function ++2) If the file \fB@sysconfdir@/mimedefang-filter.pl\fR defines a Perl function + called \fBfilter_begin\fR, it is called with no arguments. Any return + value is ignored. + +@@ -829,7 +829,7 @@ + of the following found will be used: + .TP + .B o +-/etc/mail/spamassassin/sa-mimedefang.cf ++@sysconfdir@/spamassassin/sa-mimedefang.cf + .TP + .B o + /etc/mail/spamassassin/local.cf diff --git a/mail/mimedefang/files/patch-mimedefang-multiplexor.8.in b/mail/mimedefang/files/patch-mimedefang-multiplexor.8.in new file mode 100644 index 000000000000..1e30728cd16a --- /dev/null +++ b/mail/mimedefang/files/patch-mimedefang-multiplexor.8.in @@ -0,0 +1,11 @@ +--- mimedefang-multiplexor.8.in.orig Wed May 15 17:08:14 2002 ++++ mimedefang-multiplexor.8.in Sun Jun 2 21:52:09 2002 +@@ -118,7 +118,7 @@ + .TP + .B \-F \fIrules_path\fR + Specifies the path to the filter rules. By default, +-\fB/etc/mail/mimedefang-filter\fR is used. If you use the \fB\-F\fR ++\fB@sysconfdir@/mimedefang-filter\fR is used. If you use the \fB\-F\fR + option, its value is passed to the underlying Perl filter program + using \fB\-f\fR. + diff --git a/mail/mimedefang/files/patch-mimedefang.8.in b/mail/mimedefang/files/patch-mimedefang.8.in new file mode 100644 index 000000000000..a5450c9651c3 --- /dev/null +++ b/mail/mimedefang/files/patch-mimedefang.8.in @@ -0,0 +1,20 @@ +--- mimedefang.8.in.orig Thu May 23 19:12:52 2002 ++++ mimedefang.8.in Sun Jun 2 22:13:54 2002 +@@ -25,7 +25,7 @@ + type. Typically, you should run \fBmimedefang\fR on the same computer + as \fBsendmail\fR. Therefore, you should use a UNIX-domain socket for + the connection type. The suggested value for the \fB\-p\fR switch is +-\fB/var/run/mimedefang.sock\fR. ++\fB@SPOOLDIR@/mimedefang.sock\fR. + .TP + .B \-n \fImax_filters\fR + Because each incoming e-mail message forks a new Perl process, you can +@@ -66,7 +66,7 @@ + .TP + .B \-F \fIrules_path\fR + Specifies the path to the filter rules. By default, +-\fB/etc/mail/mimedefang-filter\fR is used. If you use the \fB\-F\fR ++\fB@sysconfdir@/mimedefang-filter\fR is used. If you use the \fB\-F\fR + option, its value is passed to the underlying Perl filter program + using \fB\-f\fR. If you are using \fBmimedefang-multiplexor\fR, this + option is ignored; you should use the multiplexor's \fB\-F\fR option diff --git a/mail/mimedefang/files/patch-mimedefang.pl.8.in b/mail/mimedefang/files/patch-mimedefang.pl.8.in new file mode 100644 index 000000000000..d85b04cecb84 --- /dev/null +++ b/mail/mimedefang/files/patch-mimedefang.pl.8.in @@ -0,0 +1,25 @@ +--- mimedefang.pl.8.in.orig Thu May 2 18:54:12 2002 ++++ mimedefang.pl.8.in Sun Jun 2 21:54:05 2002 +@@ -18,11 +18,11 @@ + .TP + .B \-f \fIfilter\fR + Specifies the name of the file containing the filter. If this option is +-omitted, the default filter \fB/etc/mail/mimedefang-filter\fR is used. ++omitted, the default filter \fB@sysconfdir@/mimedefang-filter\fR is used. + + .SH OPERATION + +-\fBmimedefang.pl\fR evaluates the file \fB/etc/mail/mimedefang-filter\fR ++\fBmimedefang.pl\fR evaluates the file \fB@sysconfdir@/mimedefang-filter\fR + as a Perl fragment. This file should define the \fBfilter\fR procedure. + For each part of a MIME message, \fBmimedefang.pl\fR calls \fBfilter\fR and + disposes of the part as instructed by the filter. The various modes +@@ -31,7 +31,7 @@ + .SH TESTING FILTERS + + You are \fIstrongly\fR recommended to test your filter before installing +-it in \fB/etc/mail/mimedefang-filter\fR. To test the filter, save it ++it in \fB@sysconfdir@/mimedefang-filter\fR. To test the filter, save it + in a file (e.g. \fBtest-filter\fR) and run this command: + + .nf diff --git a/mail/mimedefang/files/patch-mimedefang.pl.in b/mail/mimedefang/files/patch-mimedefang.pl.in new file mode 100644 index 000000000000..b5b15b05ec3e --- /dev/null +++ b/mail/mimedefang/files/patch-mimedefang.pl.in @@ -0,0 +1,22 @@ +--- mimedefang.pl.in.orig Fri May 31 20:38:38 2002 ++++ mimedefang.pl.in Sun Jun 2 21:43:59 2002 +@@ -2348,7 +2348,7 @@ + #*********************************************************************** + sub main { + my($Filter); +- $Filter = '/etc/mail/mimedefang-filter'; ++ $Filter = '@sysconfdir@/mimedefang-filter'; + + my($ip, $name, $sender); + # Check for "-f filter-file" option +@@ -3204,8 +3204,8 @@ + my $config = shift; + unless ($config) + { +- if (-r "/etc/mail/spamassassin/sa-mimedefang.cf") { +- $config = "/etc/mail/spamassassin/sa-mimedefang.cf"; ++ if (-r "@sysconfdir@/spamassassin/sa-mimedefang.cf") { ++ $config = "@sysconfdir@/spamassassin/sa-mimedefang.cf"; + } elsif (-r "/etc/mail/spamassassin/local.cf") { + $config = "/etc/mail/spamassassin/local.cf"; + } else { diff --git a/mail/mimedefang/pkg-message b/mail/mimedefang/pkg-message index 323e13f70bc4..a87bf72a07c6 100644 --- a/mail/mimedefang/pkg-message +++ b/mail/mimedefang/pkg-message @@ -1,11 +1,11 @@ To finish installation please follow these steps: -1. Edit /etc/mail/mimedefang-filter +1. Edit /usr/local/etc/mimedefang/mimedefang-filter 2. Reconfigure sendmail to use MIMEDefang, for example add this lines to your sendmail.mc: - MAIL_FILTER(`mimedefang', `S=local:/var/run/mimedefang.sock, F=T, T=C:15m;S:4m;R:4m;E:10m')dnl + MAIL_FILTER(`mimedefang', `S=local:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=C:15m;S:4m;R:4m;E:10m')dnl define(`confINPUT_MAIL_FILTERS', `mimedefang')dnl rebuild sendmail.cf and install it. diff --git a/mail/mimedefang/pkg-plist b/mail/mimedefang/pkg-plist index 248e7e5f931a..3cdea6d40f95 100644 --- a/mail/mimedefang/pkg-plist +++ b/mail/mimedefang/pkg-plist @@ -1,21 +1,19 @@ bin/mimedefang-multiplexor bin/mimedefang bin/mimedefang.pl -etc/rc.d/mimedefang.sh +etc/rc.d/mimedefang.sh-dist +etc/mimedefang/mimedefang-filter.example +etc/mimedefang/spamassassin/sa-mimedefang.cf.example %%PORTDOCS%%share/doc/mimedefang/README %%PORTDOCS%%share/doc/mimedefang/README.ANOMY %%PORTDOCS%%share/doc/mimedefang/README.SPAMASSASSIN %%PORTDOCS%%share/doc/mimedefang/README.NONROOT %%PORTDOCS%%share/examples/mimedefang/suggested-minimum-filter-for-windows-clients -%%PORTDOCS%%share/examples/mimedefang/README -%%PORTDOCS%%share/examples/mimedefang/redhat-logrotate-file -%%PORTDOCS%%share/examples/mimedefang/redhat-sendmail-init-script -%%PORTDOCS%%share/examples/mimedefang/redhat-sendmail-init-script-with-multiplexor %%PORTDOCS%%share/examples/mimedefang/stream-by-domain-filter +%%PORTDOCS%%share/examples/mimedefang/README %%PORTDOCS%%@dirrm share/doc/mimedefang %%PORTDOCS%%@dirrm share/examples/mimedefang +@dirrm etc/mimedefang/spamassassin +@dirrm etc/mimedefang @cwd /var/spool @dirrm MIMEDefang -@cwd /etc -mail/mimedefang-filter.example -mail/spamassassin/sa-mimedefang.cf.example -- cgit