aboutsummaryrefslogtreecommitdiff
path: root/mail/mailscanner
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2012-03-21 21:08:02 +0000
committerChris Rees <crees@FreeBSD.org>2012-03-21 21:08:02 +0000
commitc7577fc792a22d525a9ab211c863fcbde4a98560 (patch)
treebd61440f7db1d034b63e99c7289ac99d93cb627c /mail/mailscanner
parent8becdb53c70c2758fb66bfe0b5c6a5cffb336c8d (diff)
downloadports-c7577fc792a22d525a9ab211c863fcbde4a98560.tar.gz
ports-c7577fc792a22d525a9ab211c863fcbde4a98560.zip
- Fix MS TNEF unpacking
- Use substitution in MailScanner.8 to update version - Correct handling of WITHOUT_SPAMASSASSIN_SYMLINK in pkg-install PR: ports/166254 Submitted by: Kevin Kobb (kkobb@skylinecorp.com) (maintainer) Feature safe: yes
Notes
Notes: svn path=/head/; revision=293639
Diffstat (limited to 'mail/mailscanner')
-rw-r--r--mail/mailscanner/Makefile15
-rw-r--r--mail/mailscanner/files/CHANGES.port6
-rw-r--r--mail/mailscanner/files/MailScanner.8.in (renamed from mail/mailscanner/files/MailScanner.8)2
-rw-r--r--mail/mailscanner/files/README.FreeBSD.port21
-rw-r--r--mail/mailscanner/files/mailscanner.in2
-rw-r--r--mail/mailscanner/files/mta.in2
-rw-r--r--mail/mailscanner/files/patch-lib__MailScanner__TNEF.pm20
-rw-r--r--mail/mailscanner/files/pkg-install.in3
8 files changed, 45 insertions, 26 deletions
diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile
index 7ff1fe29aec6..a059542a6767 100644
--- a/mail/mailscanner/Makefile
+++ b/mail/mailscanner/Makefile
@@ -7,6 +7,7 @@
PORTNAME= MailScanner
PORTVERSION= 4.84.5
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.mailscanner.info/files/4/tar/
DISTNAME= ${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
@@ -51,10 +52,11 @@ PATCHLEVEL= 2
USE_PERL5= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-install-${PORTVERSION}
-SUB_FILES= pkg-message pkg-install pkg-deinstall
+SUB_FILES= MailScanner.8 pkg-message pkg-install pkg-deinstall
SUB_LIST= DATADIR=${DATADIR} \
PERL=${PERL} \
PKGVERSION=${PKGVERSION} \
+ PORTVERSION=${PORTVERSION} \
ETC_FILES="${ETC_FILES}" \
MCP_FILES="${MCP_FILES}"
@@ -79,10 +81,12 @@ PLIST_SUB+= SPAMASSASSIN="@comment "
WITHOUT_SPAMASSASSIN_SYMLINK=${NO_SPAMASSASSIN_SYMLINK}
.endif
-.if defined(WITHOUT_SPAMASSASSIN_SYMLINK)
+.if defined(WITHOUT_SPAMASSASSIN_SYMLINK) || defined(WITHOUT_SPAMASSASSIN)
PLIST_SUB+= SPAMASSASSIN_SYMLINK="@comment "
+SUB_LIST+= WITHOUT_SPAMASSASSIN_SYMLINK=yes
.else
PLIST_SUB+= SPAMASSASSIN_SYMLINK=""
+SUB_LIST+= WITHOUT_SPAMASSASSIN_SYMLINK=no
.endif
.if !defined(WITHOUT_CLAMAV)
@@ -272,18 +276,13 @@ do-install:
.else
@${ECHO_MSG} -n ">> Installing manpage..."
.endif
- @cd ${FILESDIR} && \
+ @cd ${WRKDIR} && \
${INSTALL_MAN} ${MAN8} ${MAN5PREFIX}/man/man8
@${ECHO_MSG} " [DONE]"
post-install:
-.if defined(WITH_SPAMASSASSIN) && !defined(WITHOUT_SPAMASSASSIN_SYMLINK)
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.else
- @${SETENV} PKG_PREFIX=${PREFIX} WITHOUT_SPAMASSASSIN_SYMLINK=yes \
- ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/mail/mailscanner/files/CHANGES.port b/mail/mailscanner/files/CHANGES.port
index 71fedaf03d2f..d4a18fbc655f 100644
--- a/mail/mailscanner/files/CHANGES.port
+++ b/mail/mailscanner/files/CHANGES.port
@@ -1,3 +1,9 @@
+Version 4.84.5_1
+================
+- Added patch for TNEF.pm bug
+- Fixed creation of mailscanner.cf symlink
+- Minor doc updates
+
Version 4.84.5
==============
- Upgrade to 4.84.5
diff --git a/mail/mailscanner/files/MailScanner.8 b/mail/mailscanner/files/MailScanner.8.in
index b935de6da01a..e1a578e2eb21 100644
--- a/mail/mailscanner/files/MailScanner.8
+++ b/mail/mailscanner/files/MailScanner.8.in
@@ -1,4 +1,4 @@
-.TH "MailScanner" "8" "4.52.2" "Julian Field" "Mail"
+.TH "MailScanner" "8" "%%PORTVERSION%%" "Julian Field" "Mail"
.SH "NAME"
.LP
MailScanner \- Virus/Spam Scanner for Sendmail, Exim and Postfix
diff --git a/mail/mailscanner/files/README.FreeBSD.port b/mail/mailscanner/files/README.FreeBSD.port
index d05954822716..f40a8de19f33 100644
--- a/mail/mailscanner/files/README.FreeBSD.port
+++ b/mail/mailscanner/files/README.FreeBSD.port
@@ -1,7 +1,7 @@
The MailScanner port is using the original MailScanner tarball from
-www.mailscanner.info. Unfortunatly the tarball consists of MailScanner
-and perl modules etc. MailScanner depends on. The port is not using
-Julians install.sh or the provided modules. All modules that MailScanner
+www.mailscanner.info. Unfortunately the tarball consists of MailScanner
+and perl modules etc, MailScanner depends on. The port is not using
+Julian's install.sh or the provided modules. All modules that MailScanner
depends on are installed via ports as well.
In order to make the installation FreeBSD compliant the port installs files
@@ -17,10 +17,10 @@ in the following directories:
The port installs two start/stop scripts in /usr/local/etc/rc.d:
-mailscanner.sh
-mta.sh
+mailscanner
+mta
-My suggestion is to use mta.sh instead of the usual FreeBSD MTA startup
+My suggestion is to use mta instead of the usual FreeBSD MTA startup
process. This of course means that you will have to disable MTA startup
in rc.conf completely. Put this in your rc.conf:
@@ -36,11 +36,4 @@ changes it will create a newly merged MailScanner.conf and copy it to
port will try to update all your languages conf files.
-If you have suggestions for this port please let me know and drop me an e-mail at
-
-j.koopmann@seceidos.de
-
-
-Thanks,
- Jan-Peter Koopmann
-
+If you have suggestions for this port please contact the port maintainer.
diff --git a/mail/mailscanner/files/mailscanner.in b/mail/mailscanner/files/mailscanner.in
index 5b930a11e217..172237aa2e77 100644
--- a/mail/mailscanner/files/mailscanner.in
+++ b/mail/mailscanner/files/mailscanner.in
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
# PROVIDE: mailscanner
# REQUIRE: mta
diff --git a/mail/mailscanner/files/mta.in b/mail/mailscanner/files/mta.in
index 3e49935f72e8..789b0cbc1130 100644
--- a/mail/mailscanner/files/mta.in
+++ b/mail/mailscanner/files/mta.in
@@ -23,7 +23,7 @@
# to "/var/run/sendmail.pid" or "/var/run/exim.pid"
#
#
-# ATTENTION: All of the above entries are necessary in order for mta.sh to work correctly!
+# ATTENTION: All of the above entries are necessary in order for mta to work correctly!
#
#
diff --git a/mail/mailscanner/files/patch-lib__MailScanner__TNEF.pm b/mail/mailscanner/files/patch-lib__MailScanner__TNEF.pm
new file mode 100644
index 000000000000..26f7b8dc78bf
--- /dev/null
+++ b/mail/mailscanner/files/patch-lib__MailScanner__TNEF.pm
@@ -0,0 +1,20 @@
+--- ./lib/MailScanner/TNEF.pm.orig 2011-08-20 08:32:02.000000000 -0400
++++ ./lib/MailScanner/TNEF.pm 2012-03-15 11:28:31.000000000 -0400
+@@ -229,15 +229,14 @@
+
+ # Create the subdir to unpack it into
+ #my $unpackdir = "tnef.$$";
+- my ($tmpfh, $unpackdir) = tempfile("tnefXXXXXX", TMPDIR => $dir, UNLINK => 0);
+- $dir =~ s,^.*/,,;
++ my $unpackdir = tempdir("tnefXXXXXX");
+ $unpackdir = $message->MakeNameSafe($unpackdir, $dir);
+ unless (mkdir "$dir/$unpackdir", 0777) {
+ MailScanner::Log::WarnLog("Trying to unpack %s in message %s, could not create subdirectory %s, failed to unpack TNEF message", $tnefname, $message->{id},
+ "$dir/$unpackdir");
+ return 0;
+ }
+- chmod 0700, "$dir/$unpackdir";
++ chmod 0770, "$dir/$unpackdir";
+
+ my $cmd = MailScanner::Config::Value('tnefexpander') .
+ " -f $dir/$tnefname -C $dir/$unpackdir --overwrite";
diff --git a/mail/mailscanner/files/pkg-install.in b/mail/mailscanner/files/pkg-install.in
index f9da1f520578..ce071048a785 100644
--- a/mail/mailscanner/files/pkg-install.in
+++ b/mail/mailscanner/files/pkg-install.in
@@ -10,6 +10,7 @@ LN=/bin/ln
PERL=%%PERL%%
RM=/bin/rm
PKGVERSION=%%PKGVERSION%%
+WITHOUT_SPAMASSASSIN_SYMLINK=%%WITHOUT_SPAMASSASSIN_SYMLINK%%
upgrade_lang_conf()
{
@@ -102,7 +103,7 @@ initial_config()
case $2 in
POST-INSTALL)
- [ ! -z "${WITHOUT_SPAMASSASSIN_SYMLINK}" ] \
+ [ "x${WITHOUT_SPAMASSASSIN_SYMLINK}" = "xyes"] \
&& [ ! -r ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
&& ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf \
${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf