aboutsummaryrefslogtreecommitdiff
path: root/mail/mailscanner/files
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mailscanner/files')
-rw-r--r--mail/mailscanner/files/CHANGES.port6
-rw-r--r--mail/mailscanner/files/pkg-deinstall.in79
-rw-r--r--mail/mailscanner/files/pkg-install.in115
-rw-r--r--mail/mailscanner/files/pkg-message.in30
-rw-r--r--mail/mailscanner/files/rcwarning.txt18
5 files changed, 209 insertions, 39 deletions
diff --git a/mail/mailscanner/files/CHANGES.port b/mail/mailscanner/files/CHANGES.port
index 6287f8d32dff..dfda32315135 100644
--- a/mail/mailscanner/files/CHANGES.port
+++ b/mail/mailscanner/files/CHANGES.port
@@ -1,3 +1,9 @@
+Version 4.84.5
+==============
+- Upgrade to 4.83.5
+- Remove extra config file targets-- config files are handled automatically
+ in pkg-(de)?install scripts now.
+
Version 4.83.4
==============
- Upgrade to 4.83.4
diff --git a/mail/mailscanner/files/pkg-deinstall.in b/mail/mailscanner/files/pkg-deinstall.in
new file mode 100644
index 000000000000..27e81ef8c19c
--- /dev/null
+++ b/mail/mailscanner/files/pkg-deinstall.in
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+DATADIR=%%DATADIR%%
+ETC_FILES="%%ETC_FILES%%"
+
+prune_lang_conf()
+{
+ for LANG_DIR in ${DATADIR}/reports/*
+ do
+ for REPORT_FILE in ${LANG_DIR}/*.sample
+ do
+ cmp -s ${REPORT_FILE%.sample} ${REPORT_FILE} \
+ && rm -f ${REPORT_FILE%.sample}
+ done
+ done
+}
+
+prune_wrappers()
+{
+ for WRAPPER in ${PKG_PREFIX}/libexec/MailScanner/*-wrapper
+ do
+ cmp -s ${WRAPPER} ${WRAPPER}.sample \
+ && rm -f ${WRAPPER}
+ done
+}
+
+prune_autoupdate()
+{
+ for AUTOUPDATE in ${PKG_PREFIX}/libexec/MailScanner/*-autoupdate
+ do
+ cmp -s ${AUTOUPDATE} ${AUTOUPDATE}.sample \
+ && rm -f ${AUTOUPDATE}
+ done
+}
+
+prune_rules()
+{
+ for RULES in ${PKG_PREFIX}/etc/MailScanner/rules/*.rules
+ do
+ cmp -s ${RULES} ${RULES}.sample \
+ && rm -f ${RULES}
+ done
+}
+
+prune_mcp()
+{
+ for MCP_FILES in %%MCP_FILES%%
+ do
+ cmp -s ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}.sample \
+ ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} \
+ && rm -f ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}
+ done
+}
+
+prune_etc()
+{
+ for ETC in ${ETC_FILES}
+ do
+ cmp -s ${PKG_PREFIX}/etc/MailScanner/${ETC}.sample \
+ ${PKG_PREFIX}/etc/MailScanner/${ETC} \
+ && rm -f ${PKG_PREFIX}/etc/MailScanner/${ETC}
+ done
+}
+
+case $2 in
+DEINSTALL)
+ [ -L ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
+ && rm -f ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf
+ prune_lang_conf
+ prune_wrappers
+ prune_autoupdate
+ prune_rules
+ prune_mcp
+ prune_etc
+ exit 0
+ ;;
+esac
diff --git a/mail/mailscanner/files/pkg-install.in b/mail/mailscanner/files/pkg-install.in
new file mode 100644
index 000000000000..f9da1f520578
--- /dev/null
+++ b/mail/mailscanner/files/pkg-install.in
@@ -0,0 +1,115 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+CHMOD=/bin/chmod
+CP=/bin/cp
+DATADIR=%%DATADIR%%
+ECHO=echo
+LN=/bin/ln
+PERL=%%PERL%%
+RM=/bin/rm
+PKGVERSION=%%PKGVERSION%%
+
+upgrade_lang_conf()
+{
+ for LANG_DIR in ${DATADIR}/reports/*
+ do
+ if [ -f ${LANG_DIR}/languages.conf ] ; then
+ ${ECHO} -n Upgrading ${LANG_DIR}/languages.conf... Please wait..
+ ${PERL} ${DATADIR}/upgrade_languages_conf \
+ ${LANG_DIR}/languages.conf \
+ ${LANG_DIR}/languages.conf.sample > \
+ ${LANG_DIR}/languages.conf.new.${PKGVERSION} \
+ 2> /dev/null
+ if /usr/bin/diff -bBq ${LANG_DIR}/languages.conf \
+ ${LANG_DIR}/languages.conf.new.${PKGVERSION}
+ then ${ECHO} " no changes"
+ ${RM} ${LANG_DIR}/languages.conf.new.${PKGVERSION}
+ else ${ECHO} " done"
+ ${CP} ${LANG_DIR}/languages.conf.new.${PKGVERSION} \
+ ${LANG_DIR}/languages.conf
+ ${CHMOD} u+w ${LANG_DIR}/languages.conf
+ fi
+ fi
+ done
+}
+
+upgrade_mailscanner_conf()
+{
+ ${PERL} ${DATADIR}/upgrade_MailScanner_conf \
+ ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf \
+ ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.sample > \
+ ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION} \
+ 2> /dev/null
+ if diff -b -B -q ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf \
+ ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION}
+ then ${ECHO} "No changes in MailScanner.conf options found"
+ else ${ECHO} -n "Changes in MailScanner.conf found. Please look at"
+ ${ECHO} \
+ "${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION}"
+ fi
+}
+
+initial_config()
+{
+ for LANG_DIR in ${DATADIR}/reports/*
+ do
+ for REPORT_FILE in ${LANG_DIR}/*.sample
+ do
+ [ ! -f ${REPORT_FILE%.sample} ] \
+ && cp -p ${REPORT_FILE} ${REPORT_FILE%.sample} \
+ && ${CHMOD} u+w ${REPORT_FILE%.sample}
+ done
+ done
+
+ for WRAPPER in ${PKG_PREFIX}/libexec/MailScanner/*-wrapper.sample
+ do
+ [ ! -f ${WRAPPER%.sample} ] \
+ && cp -p ${WRAPPER} ${WRAPPER%.sample} \
+ && ${CHMOD} u+w ${WRAPPER%.sample}
+ done
+
+ for AUTOUPDATE in ${PKG_PREFIX}/libexec/MailScanner/*-autoupdate.sample
+ do
+ [ ! -f ${AUTOUPDATE%.sample} ] \
+ && cp -p ${AUTOUPDATE} ${AUTOUPDATE%.sample} \
+ && ${CHMOD} u+w ${AUTOUPDATE%.sample}
+ done
+
+ for RULES in ${PKG_PREFIX}/etc/MailScanner/rules/*.rules.sample
+ do
+ [ ! -f ${RULES%.sample} ] \
+ && cp -p ${RULES} ${RULES%.sample} \
+ && ${CHMOD} u+w ${RULES%.sample}
+ done
+
+ for MCP_FILES in %%MCP_FILES%%
+ do
+ [ ! -f ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} ] \
+ && cp -p ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}.sample \
+ ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} \
+ && ${CHMOD} u+w ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}
+ done
+
+ for ETC in ${PKG_PREFIX}/etc/MailScanner/*.sample
+ do
+ [ ! -f ${ETC%.sample} ] \
+ && cp -p ${ETC} ${ETC%.sample} \
+ && ${CHMOD} u+w ${ETC%.sample}
+ done
+}
+
+case $2 in
+POST-INSTALL)
+ [ ! -z "${WITHOUT_SPAMASSASSIN_SYMLINK}" ] \
+ && [ ! -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
+ upgrade_lang_conf
+ [ -f ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf ] \
+ && upgrade_mailscanner_conf
+ initial_config
+ exit 0
+ ;;
+esac
diff --git a/mail/mailscanner/files/pkg-message.in b/mail/mailscanner/files/pkg-message.in
index 54730653fc61..ab792b3d00c6 100644
--- a/mail/mailscanner/files/pkg-message.in
+++ b/mail/mailscanner/files/pkg-message.in
@@ -11,30 +11,18 @@
You will need to make several modifications to config files
before MailScanner will work correctly.
-
- If this is the first time you are installing this port you
- should create an initial set of configuration files with
-
- make initial-config
-
- within this directory. Without this step you will only have
- .sample files instead of real .conf files and report
- templates.
-
- If you are upgrading your port you might consider
- running
- make renew-wrapper
- make renew-autoupdate
- make renew-reports
+ The provided default configuration requires several directories
+ to be created:
- to update your virus-wrappers, autoupdates, reports and
- languages.conf
-
- The english languages.conf is updated automatically. For all
- other versions use the update_languages_conf tool found
- in the work directory of this port.
+ /var/spool/MailScanner/incoming
+ /var/spool/MailScanner/incoming/Locks
+ /var/spool/MailScanner/quarantine
+ /var/spool/mqueue
+ /var/spool/mqueue.in
+ Either create those directories or change the configuration.
+
Sophos users: Please take a look at the Sophos install
script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
diff --git a/mail/mailscanner/files/rcwarning.txt b/mail/mailscanner/files/rcwarning.txt
deleted file mode 100644
index 7703c802853a..000000000000
--- a/mail/mailscanner/files/rcwarning.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-*************************************************************************
- _ _____ _____ _____ _ _ _____ ___ ___ _ _
- / \|_ _|_ _| ____| \ | |_ _|_ _/ _ \| \ | |
- / _ \ | | | | | _| | \| | | | | | | | | \| |
- / ___ \| | | | | |___| |\ | | | | | |_| | |\ |
- /_/ \_\_| |_| |_____|_| \_| |_| |___\___/|_| \_|
-
-
- The MailScanner port uses new start/stop scripts according to rc.subr
- standard. Your old scripts will be overwritten after you press ENTER.
- To start mailscanner and your mta, please put the correct statements in
- your rc.conf. For examples/syntax please look at mailscanner.sh and
- mta.sh in your rc.d directory.
-
- Please: Also have a look at CHANGES.port in your MailScanner
- doc dir (see above).
-
-*************************************************************************