FreeBSD Bugzilla – Attachment 183531 Details for
Bug 219938
mail/mailscanner: fix execution
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
mailscanner.patch (text/plain), 16.18 KB, created by
Piotr Kubaj
on 2017-06-16 12:41:31 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Piotr Kubaj
Created:
2017-06-16 12:41:31 UTC
Size:
16.18 KB
patch
obsolete
>diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile >index aee66b17a842..468595b41d82 100644 >--- a/mail/mailscanner/Makefile >+++ b/mail/mailscanner/Makefile >@@ -1,8 +1,9 @@ > # Created by: Jan-Peter Koopmann <j.koopmann@seceidos.de> >-# $FreeBSD$ >+# $FreeBSD: head/mail/mailscanner/Makefile 443125 2017-06-10 23:12:19Z wen $ > > PORTNAME= MailScanner > PORTVERSION= 5.0.3 >+PORTREVISION= 1 > CATEGORIES= mail > MASTER_SITES= https://s3.amazonaws.com/msv5/release/ > DISTNAME= ${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}.nix >@@ -148,6 +149,46 @@ post-patch: > ${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/bin/re2c|${LOCALBASE}/bin/re2c|g' \ >+ -e 's|/usr/bin/clamscan|${LOCALBASE}/bin/clamscan|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 >+ ${REINPLACE_CMD} -e 's,/usr/sbin,${LOCALBASE}/sbin,' \ >+ -e 's,/usr/share,${LOCALBASE}/share,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 >+ ${REINPLACE_CMD} -e 's|/usr/lib|${LOCALBASE}/lib|g' \ >+ ${WRKSRC}/usr/sbin/ms-create-locks \ >+ ${WRKSRC}/usr/sbin/ms-update-bad-emails \ >+ ${WRKSRC}/usr/sbin/ms-check \ >+ ${WRKSRC}/usr/sbin/ms-cron \ >+ ${WRKSRC}/etc/${PORTNAME}/virus.scanners.conf \ >+ ${WRKSRC}/etc/${PORTNAME}/defaults > > do-build: > @${REINPLACE_CMD} \ >@@ -169,7 +210,7 @@ do-build: > -e 's,/usr/lib/sendmail,/usr/sbin/sendmail,g' \ > ${WRKSRC}/usr/sbin/${PORTNAME} \ > ${WRKSRC}/usr/sbin/ms-create-locks \ >- ${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \ >+ ${WRKSRC}/usr/sbin/ms-update-sa > > @${REINPLACE_CMD} \ > -e 's,/opt/${PORTNAME}/var/${PORTNAME}.pid,/var/run/${PORTNAME}.pid,g' \ >@@ -178,9 +219,7 @@ do-build: > -e 's,/opt/${PORTNAME}/etc/reports,${DATADIR}/reports,g' \ > -e 's,/opt/${PORTNAME}/etc,${PREFIX}/etc/${PORTNAME},g' \ > -e 's,/opt/${PORTNAME}/lib,${PREFIX}/lib/${PORTNAME},g' \ >- -e 's,/usr/bin/unrar,${LOCALBASE}/bin/unrar,g' \ > -e 's,/bin/gunzip,/usr/bin/gunzip,g' \ >- -e 's,/etc/mail/spamassassin,${LOCALBASE}/etc/mail/spamassassin,g' \ > -e 's,/tmp/clamd.socket,/var/run/clamav/clamd.sock,g' \ > -e 's,/usr/local/share/clamav,/var/db/clamav,g' \ > ${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf >@@ -198,6 +237,7 @@ do-build: > > 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} && \ >diff --git a/mail/mailscanner/files/CHANGES.port b/mail/mailscanner/files/CHANGES.port >index 2a6bcfec405a..63594cb879d7 100644 >--- a/mail/mailscanner/files/CHANGES.port >+++ b/mail/mailscanner/files/CHANGES.port >@@ -1,204 +1,39 @@ >-Version 4.85.2_3 >-============== >-- Upgrade to 4.85.2-3 >- >-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. >- >-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. >- >-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. >- >-Version 4.84.5_3 >-================ >-- Added FreeBSD required mktemp options >- >-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. >+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 >+ >+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 >+ >+05/23/2016 Changes in v5.0.1-2 >+================================== >+- fixed install.sh for ms-upgrade-conf >+ >+05/22/2016 Changes in v5.0.1-1 >+================================== >+- added logging of failed HTML disarms to Message.pm >+ >+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 >+ >+04/30/2016 Changes in v5.0.0-1 >+================================== >+- New Release >diff --git a/mail/mailscanner/files/mailscanner.in b/mail/mailscanner/files/mailscanner.in >index 172237aa2e77..242adaa6aa2e 100644 >--- a/mail/mailscanner/files/mailscanner.in >+++ b/mail/mailscanner/files/mailscanner.in >@@ -28,7 +28,7 @@ load_rc_config $name > 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 >diff --git a/mail/mailscanner/files/pkg-install.in b/mail/mailscanner/files/pkg-install.in >index bd6598f49845..171d3cba82ce 100644 >--- a/mail/mailscanner/files/pkg-install.in >+++ b/mail/mailscanner/files/pkg-install.in >@@ -12,105 +12,12 @@ RM=/bin/rm > 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" ] \ > && [ ! -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/pkg-plist b/mail/mailscanner/pkg-plist >index 3a70de7566bc..8eafb9538343 100644 >--- a/mail/mailscanner/pkg-plist >+++ b/mail/mailscanner/pkg-plist >@@ -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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219938
:
183426
| 183531