Index: Makefile =================================================================== --- Makefile (revision 443440) +++ Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= MailScanner PORTVERSION= 5.0.3 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= https://s3.amazonaws.com/msv5/release/ DISTNAME= ${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}.nix @@ -55,6 +56,8 @@ tnef:converters/tnef \ wget:ftp/wget +NO_ARCH= yes + CONFLICTS= ${PORTNAME}-devel-[0-9]* PATCHLEVEL= 7 @@ -148,6 +151,40 @@ ${REINPLACE_CMD} -e 's,\$$(mktemp),$$(mktemp -t tmp),' \ ${WRKSRC}/usr/lib/${PORTNAME}/wrapper/clamav-wrapper \ ${WRKSRC}/usr/lib/${PORTNAME}/wrapper/bitdefender-wrapper + ${REINPLACE_CMD} -e 's,/etc,${LOCALBASE}/etc,' \ + -e 's|/usr/bin/tnef|${LOCALBASE}/bin/tnef|g' \ + -e 's|/usr/bin/unrar|${LOCALBASE}/bin/unrar|g' \ + -e 's|/usr/bin/antiword|${LOCALBASE}/bin/antiword|g' \ + -e 's|/usr/share|${LOCALBASE}/share|g' \ + ${WRKSRC}/usr/sbin/* \ + ${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \ + ${WRKSRC}/etc/${PORTNAME}/rules/* \ + ${WRKSRC}/etc/${PORTNAME}/*.conf \ + ${WRKSRC}/etc/${PORTNAME}/defaults \ + ${WRKSRC}/usr/lib/${PORTNAME}/wrapper/* \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/CustomConfig.pm \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/ConfigDefs.pl \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/custom/SpamWhitelist.pm \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/Exim.pm \ + ${WRKSRC}/etc/${PORTNAME}/rules/* + ${REINPLACE_CMD} -e 's,/usr/sbin,${LOCALBASE}/sbin,' \ + -e 's|/usr/bin|${LOCALBASE}/bin|g' \ + -e 's,/usr/share,${LOCALBASE}/share,g' \ + -e 's,/usr/lib,${LOCALBASE}/lib,g' \ + ${WRKSRC}/usr/sbin/* \ + ${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \ + ${WRKSRC}/etc/${PORTNAME}/*.conf \ + ${WRKSRC}/etc/${PORTNAME}/defaults \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/Exim.pm \ + ${WRKSRC}/usr/lib/${PORTNAME}/wrapper/* + ${REINPLACE_CMD} -e 's|/usr/bin/perl|${LOCALBASE}/bin/perl|g' \ + -e 's|/usr/share/${PORTNAME}|${LOCALBASE}/share/${PORTNAME}|g' \ + -e 's|/usr/lib/${PORTNAME}|${LOCALBASE}/lib/${PORTNAME}|g' \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/CustomConfig.pm + ${REINPLACE_CMD} -e 's|/usr/bin/perldoc|${LOCALBASE}/bin/perldoc|g' \ + ${WRKSRC}/usr/sbin/ms-perl-check + ${REINPLACE_CMD} -e 's|/usr/bin/exim|${LOCALBASE}/bin/exim|g' \ + ${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/Exim.pm do-build: @${REINPLACE_CMD} \ @@ -166,10 +203,11 @@ -e 's,/usr/bin/sa-update,${LOCALBASE}/bin/sa-update,g' \ -e 's,/usr/bin/unzip,${UNZIP_CMD},g' \ -e 's,/usr/bin/wget,${LOCALBASE}/bin/wget,g' \ - -e 's,/usr/lib/sendmail,/usr/sbin/sendmail,g' \ + -e 's,/usr/local/lib/sendmail,/usr/sbin/sendmail,g' \ ${WRKSRC}/usr/sbin/${PORTNAME} \ ${WRKSRC}/usr/sbin/ms-create-locks \ ${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \ + ${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf @${REINPLACE_CMD} \ -e 's,/opt/${PORTNAME}/var/${PORTNAME}.pid,/var/run/${PORTNAME}.pid,g' \ @@ -198,6 +236,7 @@ do-install: (cd ${WRKSRC}/etc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc) + (cd ${WRKSRC}/usr/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib) (cd ${WRKSRC}/usr/sbin && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin) (cd ${WRKSRC}/usr/share && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share) cd ${WRKDIR} && \ Index: files/CHANGES.port =================================================================== --- files/CHANGES.port (revision 443440) +++ files/CHANGES.port (working copy) @@ -1,204 +1,39 @@ -Version 4.85.2_3 -============== -- Upgrade to 4.85.2-3 +08/14/2016 Changes in v5.0.3-7 +================================== +- updated init script to include a time-wait for pid files during + process reloads and restarts +- updated Message.pm to correctly prepend phishing notices in email + subject +- added avast virus scanner support +- added esets virus scanner support +- added new function InitClamdParser to SweepViruses.pm +- added new function ProcessClamdOutput to SweepViruses.pm -Version 4.84.6 -============== -- Upgrade to 4.84.6 -- Added some patches for tmp file bugs - reported/provided by brad@comstyle.com - from the OpenBSD port and GitHub repository. +05/23/2016 Changes in v5.0.2-1 +================================== +- updated chmod permissions from 0600 to 0660 on work files to address + permission issues with clamd reading header files -Version 4.84.6 -============== -- Upgrade to 4.84.6 -- Added some patches for tmp file bugs - reported/provided by brad@comstyle.com - from the OpenBSD port and GitHub repository. +05/23/2016 Changes in v5.0.1-2 +================================== +- fixed install.sh for ms-upgrade-conf -Version 4.84.5_3 (not bumped) -================ -- Use OptionsNG -- Remove deprecated header information -- Removed check for perl versions that are deprecated to install and - scheduled for removal from the ports tree. +05/22/2016 Changes in v5.0.1-1 +================================== +- added logging of failed HTML disarms to Message.pm -Version 4.84.5_3 -================ -- Added FreeBSD required mktemp options +05/13/2016 Changes in v5.0.0-9 +================================== +- RHEL installer correction: creation of /etc/mail/spamassassin/mailscanner.cf +- start levels 80 20 set in Debian and RHEL +- ms-sa-update corrected +- errant removal of /usr/lib/MailScanner corrected +- added checks to remove init.d scripts or links pre-install +- added remove to update-rc.d and chkconfig pre-install +- added add to update-rc.d and chkconfig post-install +- corrected missing variable in RHEL install.sh script +- installers refined and updated -Version 4.84.5_2 -================ -- Fixed creation of mailscanner.cf symlink - -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 - -Version 4.83.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 - -Version 4.83.2 -============== -- Upgrade to 4.83.2 -- Update mta init script so it starts MTAs after other init scripts - (milters, etc) that should start before "mail". - -Version 4.82.6 -============== -- Upgrade to 4.82.6 - -Version 4.81.4 -============== -- Upgrade to 4.81.4 -- Added dependency for p5-Sys-SigAction port - -Version 4.75.11 -=============== -- Upgrade to 4.75.11 - -Version 4.67.6 -============== -- Upgrade to 4.67.6 -- Now works with p5-Mail-Tools Version 2.x again - -Version 4.64.3 -============== -- Upgrade to 4.64.3 - -Version 4.62.9 -============== -- Upgrade to 4.62.9 -- update_spamassassin and update_spamassassin.cron are untouched again. I - currently do not have enough time to get this running the FreeBSD way. - Patches are welcome. - -Version 4.61.7 -============== -- Upgrade to 4.61.7 -- Attention: update_spamassassin and update_spamassassin.cron are rewritten to fit - FreeBSD. Untested. If you are using non-standard directories or FreeBSD < 6 you will - have to check update_spamassassin. - -Version 4.60.8_2 -================ -- Fixed error in auto-zip: If a message contained 2 different attachments - with exactly the same filename, the auto-zip feature would fail and - MailScanner would die. - -Version 4.60.8 -============== -- update to 4.60.8 - -Version 4.59.4_2 -================ -- update to 4.59.4 - -Version 4.58.9_2 -================ -- clamav-wrapper contained options unarj, unace and zoo. unace - seems to be dead and the other options are corrected to be - arj and unzoo. - -Version 4.58.9 -================ -- Upgrade to MailScanner 4.58 -- fix: CHANGES.port was not installed anymore -- startscripts now honor RC_SUBR_SUFFIX - -Version 4.57.6_1 -================ -- Upgrade to MailScanner 4.57 - -Version 4.56.8_1 -================ -- fixed problem with upgrade_mailscanner_config - -Version 4.56.8 -============== -- Upgrade to MailScanner 4.56 - -Version 4.55.10 -=============== -- Upgrade to MailScanner 4.55 -- As Julian removed the documentation from the tarball I did the same in the port. - Manpage and html docs removed as well. All documentation can now be found on - the web. - -Version 4.54.6_1 -================= -- Path to gunzip in MailScanner.conf fixed - -Version 4.54.6 -================= -- Upgrade to MailScanner 4.54 -- Download location changed -- added sysutils/p5-Sys-Hostname-Long dependency - -Version 4.53.8 -================= -- 4.53.7 contained a bug in scanning of phishing mails. This resulted in scanning loops - -Version 4.53.7 -================= -- Upgrade to MailScanner 4.53 -- changed some patch-names -- created sa-update.cron in libexece/MailScanner to periodically run sa-update - -Version 4.52.2_1 -================= -- fixed bug in mta.sh script -- fixed rc.subr reference in update_phishing_sites.cron and - update_virus_scanners.cron --> now dynamically rewritten to correct - location -- Exim 4.61 changed queue file format which was incompatible with 4.52.2 --> patched - -Version 4.52.2 -================= -- Upgrade to MailScanner 4.52 - -Version 4.51.5 -================= -- Some changes in FreeBSD 6.1 resulted in problems in the mta.sh script. - Fixed. -- Upgrade to MailScanenr 4.51 - -Version 4.50.15_1 -================= -- The MailScanner binary is now put into /usr/local/sbin allowing for - easy use of the command-line options for debugging etc. -- From this version on all ports will contain this Change Log. -- The following scripts are now installed by the port as well (into - /usr/local/libexec/MailScanner): - - analyse_SpamAssassin_cache - - clean.SA.cache (use this for manual clean or in crontab) - - clean.quarantine (use this for manual clean or in crontab) - - update_phishing_sites (use this for manual updates) - - update_phishing_sites.cron (use this in crontab) - - update_virus_scanners.cron (ise this in crontab) -- The latter two can/should be used in your crontab for updating those - components. These scripts introduce a random delay for updating (can - be configured in rc.conf). -- Fixed a small bug in mailscanner.sh script. Status/Stop was not - always working. - -Version 4.50.15 -=============== -- Upgrade to MailScanner 4.50.15-1 -- Start/Stop scripts are now rc.subr compliant. Please adjust your config! -- The port now optionally installs Spamassassin, ClamAV and Bitdefender. -- make renew-wrapper, renew-autoupdate and renew-reports now depend on - configure instead of on install allowing their usage after a portupgrade. +04/30/2016 Changes in v5.0.0-1 +================================== +- New Release Index: files/mailscanner.in =================================================================== --- files/mailscanner.in (revision 443440) +++ files/mailscanner.in (working copy) @@ -28,7 +28,7 @@ required_files=${mailscanner_configfile:-"%%PREFIX%%/etc/MailScanner/MailScanner.conf"} pidfile=${mailscanner_pidfile:-"/var/run/MailScanner.pid"} -command="%%PREFIX%%/sbin/mailscanner" +command="%%PREFIX%%/sbin/MailScanner" command_args="${required_files}" procname="MailScanner" extra_commands=reload Index: files/pkg-install.in =================================================================== --- files/pkg-install.in (revision 443440) +++ files/pkg-install.in (working copy) @@ -12,95 +12,6 @@ PKGVERSION=%%PKGVERSION%% WITHOUT_SPAMASSASSIN_SYMLINK=%%WITHOUT_SPAMASSASSIN_SYMLINK%% -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) [ "x${WITHOUT_SPAMASSASSIN_SYMLINK}" = "xno" ] \ @@ -107,10 +18,6 @@ && [ ! -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 Index: pkg-plist =================================================================== --- pkg-plist (revision 443440) +++ pkg-plist (working copy) @@ -18,6 +18,21 @@ %%ETCDIR%%/spam.lists.conf %%ETCDIR%%/spamassassin.conf %%ETCDIR%%/virus.scanners.conf +lib/MailScanner/init/ms-init +lib/MailScanner/wrapper/avast-wrapper +lib/MailScanner/wrapper/avg-autoupdate +lib/MailScanner/wrapper/avg-wrapper +lib/MailScanner/wrapper/bitdefender-autoupdate +lib/MailScanner/wrapper/bitdefender-wrapper +lib/MailScanner/wrapper/clamav-autoupdate +lib/MailScanner/wrapper/clamav-wrapper +lib/MailScanner/wrapper/esets-wrapper +lib/MailScanner/wrapper/f-secure-autoupdate +lib/MailScanner/wrapper/f-secure-wrapper +lib/MailScanner/wrapper/generic-autoupdate +lib/MailScanner/wrapper/generic-wrapper +lib/MailScanner/wrapper/sophos-autoupdate +lib/MailScanner/wrapper/sophos-wrapper man/man8/MailScanner.8.gz man/man8/mailscanner.8.gz sbin/MailScanner