View | Details | Raw Unified | Return to bug 219938 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +40 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	MailScanner
4
PORTNAME=	MailScanner
5
PORTVERSION=	5.0.3
5
PORTVERSION=	5.0.3
6
PORTREVISION=	1
6
CATEGORIES=	mail
7
CATEGORIES=	mail
7
MASTER_SITES=	https://s3.amazonaws.com/msv5/release/
8
MASTER_SITES=	https://s3.amazonaws.com/msv5/release/
8
DISTNAME=	${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}.nix
9
DISTNAME=	${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}.nix
Lines 55-60 Link Here
55
		tnef:converters/tnef \
56
		tnef:converters/tnef \
56
		wget:ftp/wget
57
		wget:ftp/wget
57
58
59
NO_ARCH=	yes
60
58
CONFLICTS=	${PORTNAME}-devel-[0-9]*
61
CONFLICTS=	${PORTNAME}-devel-[0-9]*
59
62
60
PATCHLEVEL=	7
63
PATCHLEVEL=	7
Lines 148-153 Link Here
148
	${REINPLACE_CMD} -e 's,\$$(mktemp),$$(mktemp -t tmp),' \
151
	${REINPLACE_CMD} -e 's,\$$(mktemp),$$(mktemp -t tmp),' \
149
		${WRKSRC}/usr/lib/${PORTNAME}/wrapper/clamav-wrapper \
152
		${WRKSRC}/usr/lib/${PORTNAME}/wrapper/clamav-wrapper \
150
		${WRKSRC}/usr/lib/${PORTNAME}/wrapper/bitdefender-wrapper
153
		${WRKSRC}/usr/lib/${PORTNAME}/wrapper/bitdefender-wrapper
154
	${REINPLACE_CMD} -e 's,/etc,${LOCALBASE}/etc,' \
155
		-e 's|/usr/bin/tnef|${LOCALBASE}/bin/tnef|g' \
156
		-e 's|/usr/bin/unrar|${LOCALBASE}/bin/unrar|g' \
157
		-e 's|/usr/bin/antiword|${LOCALBASE}/bin/antiword|g' \
158
		-e 's|/usr/share|${LOCALBASE}/share|g' \
159
		${WRKSRC}/usr/sbin/* \
160
		${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \
161
		${WRKSRC}/etc/${PORTNAME}/rules/* \
162
		${WRKSRC}/etc/${PORTNAME}/*.conf \
163
		${WRKSRC}/etc/${PORTNAME}/defaults \
164
		${WRKSRC}/usr/lib/${PORTNAME}/wrapper/* \
165
		${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/CustomConfig.pm \
166
		${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/ConfigDefs.pl \
167
		${WRKSRC}/usr/share/${PORTNAME}/perl/custom/SpamWhitelist.pm \
168
		${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/Exim.pm \
169
		${WRKSRC}/etc/${PORTNAME}/rules/*
170
	${REINPLACE_CMD} -e 's,/usr/sbin,${LOCALBASE}/sbin,' \
171
	 	-e 's|/usr/bin|${LOCALBASE}/bin|g' \
172
		-e 's,/usr/share,${LOCALBASE}/share,g' \
173
		-e 's,/usr/lib,${LOCALBASE}/lib,g' \
174
		${WRKSRC}/usr/sbin/* \
175
		${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \
176
		${WRKSRC}/etc/${PORTNAME}/*.conf \
177
		${WRKSRC}/etc/${PORTNAME}/defaults \
178
		${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/Exim.pm \
179
		${WRKSRC}/usr/lib/${PORTNAME}/wrapper/*
180
	${REINPLACE_CMD} -e 's|/usr/bin/perl|${LOCALBASE}/bin/perl|g' \
181
		-e 's|/usr/share/${PORTNAME}|${LOCALBASE}/share/${PORTNAME}|g' \
182
		-e 's|/usr/lib/${PORTNAME}|${LOCALBASE}/lib/${PORTNAME}|g' \
183
		${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/CustomConfig.pm
184
	${REINPLACE_CMD} -e 's|/usr/bin/perldoc|${LOCALBASE}/bin/perldoc|g' \
185
		${WRKSRC}/usr/sbin/ms-perl-check
186
	${REINPLACE_CMD} -e 's|/usr/bin/exim|${LOCALBASE}/bin/exim|g' \
187
		${WRKSRC}/usr/share/${PORTNAME}/perl/${PORTNAME}/Exim.pm
151
188
152
do-build:
189
do-build:
153
	@${REINPLACE_CMD} \
190
	@${REINPLACE_CMD} \
Lines 166-175 Link Here
166
		-e 's,/usr/bin/sa-update,${LOCALBASE}/bin/sa-update,g'	\
203
		-e 's,/usr/bin/sa-update,${LOCALBASE}/bin/sa-update,g'	\
167
		-e 's,/usr/bin/unzip,${UNZIP_CMD},g'				\
204
		-e 's,/usr/bin/unzip,${UNZIP_CMD},g'				\
168
		-e 's,/usr/bin/wget,${LOCALBASE}/bin/wget,g'		\
205
		-e 's,/usr/bin/wget,${LOCALBASE}/bin/wget,g'		\
169
		-e 's,/usr/lib/sendmail,/usr/sbin/sendmail,g'		\
206
		-e 's,/usr/local/lib/sendmail,/usr/sbin/sendmail,g'		\
170
		${WRKSRC}/usr/sbin/${PORTNAME}				\
207
		${WRKSRC}/usr/sbin/${PORTNAME}				\
171
		${WRKSRC}/usr/sbin/ms-create-locks			\
208
		${WRKSRC}/usr/sbin/ms-create-locks			\
172
		${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init		\
209
		${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init		\
210
		${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf
173
211
174
	@${REINPLACE_CMD} \
212
	@${REINPLACE_CMD} \
175
		-e 's,/opt/${PORTNAME}/var/${PORTNAME}.pid,/var/run/${PORTNAME}.pid,g' \
213
		-e 's,/opt/${PORTNAME}/var/${PORTNAME}.pid,/var/run/${PORTNAME}.pid,g' \
Lines 198-203 Link Here
198
236
199
do-install:
237
do-install:
200
	(cd ${WRKSRC}/etc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc)
238
	(cd ${WRKSRC}/etc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc)
239
	(cd ${WRKSRC}/usr/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib)
201
	(cd ${WRKSRC}/usr/sbin && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin)
240
	(cd ${WRKSRC}/usr/sbin && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin)
202
	(cd ${WRKSRC}/usr/share && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share)
241
	(cd ${WRKSRC}/usr/share && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share)
203
	cd ${WRKDIR} && \
242
	cd ${WRKDIR} && \
(-)files/CHANGES.port (-199 / +34 lines)
Lines 1-204 Link Here
1
Version 4.85.2_3
1
08/14/2016 Changes in    v5.0.3-7
2
==============
2
==================================
3
- Upgrade to 4.85.2-3
3
- updated init script to include a time-wait for pid files during 
4
  process reloads and restarts
5
- updated Message.pm to correctly prepend phishing notices in email
6
  subject
7
- added avast virus scanner support
8
- added esets virus scanner support
9
- added new function InitClamdParser to SweepViruses.pm 
10
- added new function ProcessClamdOutput to SweepViruses.pm 
4
11
5
Version 4.84.6
12
05/23/2016 Changes in    v5.0.2-1
6
==============
13
==================================
7
- Upgrade to 4.84.6
14
- updated chmod permissions from 0600 to 0660 on work files to address
8
- Added some patches for tmp file bugs
15
  permission issues with clamd reading header files
9
  reported/provided by brad@comstyle.com
10
  from the OpenBSD port and GitHub repository.
11
16
12
Version 4.84.6
17
05/23/2016 Changes in    v5.0.1-2
13
==============
18
==================================
14
- Upgrade to 4.84.6
19
- fixed install.sh for ms-upgrade-conf
15
- Added some patches for tmp file bugs
16
  reported/provided by brad@comstyle.com
17
  from the OpenBSD port and GitHub repository.
18
20
19
Version 4.84.5_3 (not bumped)
21
05/22/2016 Changes in    v5.0.1-1
20
================
22
==================================
21
- Use OptionsNG
23
- added logging of failed HTML disarms to Message.pm
22
- Remove deprecated header information
23
- Removed check for perl versions that are deprecated to install and
24
  scheduled for removal from the ports tree.
25
24
26
Version 4.84.5_3
25
05/13/2016 Changes in    v5.0.0-9
27
================
26
==================================
28
- Added FreeBSD required mktemp options
27
- RHEL installer correction: creation of /etc/mail/spamassassin/mailscanner.cf
28
- start levels 80 20 set in Debian and RHEL
29
- ms-sa-update corrected
30
- errant removal of /usr/lib/MailScanner corrected
31
- added checks to remove init.d scripts or links pre-install
32
- added remove to update-rc.d and chkconfig pre-install
33
- added add to update-rc.d and chkconfig post-install
34
- corrected missing variable in RHEL install.sh script
35
- installers refined and updated
29
36
30
Version 4.84.5_2
37
04/30/2016 Changes in    v5.0.0-1
31
================
38
==================================
32
- Fixed creation of mailscanner.cf symlink
39
- New Release
33
34
Version 4.84.5_1
35
================
36
- Added patch for TNEF.pm bug
37
- Fixed creation of mailscanner.cf symlink
38
- Minor doc updates
39
40
Version 4.84.5
41
==============
42
- Upgrade to 4.84.5
43
44
Version 4.83.5
45
==============
46
- Upgrade to 4.83.5
47
- Remove extra config file targets-- config files are handled automatically
48
  in pkg-(de)?install scripts now.
49
50
Version 4.83.4
51
==============
52
- Upgrade to 4.83.4
53
54
Version 4.83.2
55
==============
56
- Upgrade to 4.83.2
57
- Update mta init script so it starts MTAs after other init scripts
58
  (milters, etc) that should start before "mail".
59
60
Version 4.82.6
61
==============
62
- Upgrade to 4.82.6
63
64
Version 4.81.4
65
==============
66
- Upgrade to 4.81.4
67
- Added dependency for p5-Sys-SigAction port
68
69
Version 4.75.11
70
===============
71
- Upgrade to 4.75.11
72
73
Version 4.67.6
74
==============
75
- Upgrade to 4.67.6
76
- Now works with p5-Mail-Tools Version 2.x again
77
78
Version 4.64.3
79
==============
80
- Upgrade to 4.64.3
81
82
Version 4.62.9
83
==============
84
- Upgrade to 4.62.9
85
- update_spamassassin and update_spamassassin.cron are untouched again. I
86
  currently do not have enough time to get this running the FreeBSD way.
87
  Patches are welcome.
88
89
Version 4.61.7
90
==============
91
- Upgrade to 4.61.7
92
- Attention: update_spamassassin and update_spamassassin.cron are rewritten to fit
93
  FreeBSD. Untested. If you are using non-standard directories or FreeBSD < 6 you will
94
  have to check update_spamassassin.
95
96
Version 4.60.8_2
97
================
98
- Fixed error in auto-zip: If a message contained 2 different attachments 
99
  with exactly the same filename, the auto-zip feature would fail and 
100
  MailScanner would die.
101
102
Version 4.60.8
103
==============
104
- update to 4.60.8
105
106
Version 4.59.4_2
107
================
108
- update to 4.59.4
109
110
Version 4.58.9_2
111
================
112
- clamav-wrapper contained options unarj, unace and zoo. unace
113
  seems to be dead and the other options are corrected to be
114
  arj and unzoo.
115
116
Version 4.58.9
117
================
118
- Upgrade to MailScanner 4.58
119
- fix: CHANGES.port was not installed anymore
120
- startscripts now honor RC_SUBR_SUFFIX
121
122
Version 4.57.6_1
123
================
124
- Upgrade to MailScanner 4.57
125
126
Version 4.56.8_1
127
================
128
- fixed problem with upgrade_mailscanner_config 
129
130
Version 4.56.8
131
==============
132
- Upgrade to MailScanner 4.56
133
134
Version 4.55.10
135
===============
136
- Upgrade to MailScanner 4.55
137
- As Julian removed the documentation from the tarball I did the same in the port.
138
  Manpage and html docs removed as well. All documentation can now be found on 
139
  the web.
140
141
Version 4.54.6_1
142
=================
143
- Path to gunzip in MailScanner.conf fixed
144
145
Version 4.54.6
146
=================
147
- Upgrade to MailScanner 4.54
148
- Download location changed
149
- added sysutils/p5-Sys-Hostname-Long dependency
150
151
Version 4.53.8
152
=================
153
- 4.53.7 contained a bug in scanning of phishing mails. This resulted in scanning loops
154
155
Version 4.53.7
156
=================
157
- Upgrade to MailScanner 4.53
158
- changed some patch-names
159
- created sa-update.cron in libexece/MailScanner to periodically run sa-update
160
161
Version 4.52.2_1
162
=================
163
- fixed bug in mta.sh script
164
- fixed rc.subr reference in update_phishing_sites.cron and 
165
  update_virus_scanners.cron --> now dynamically rewritten to correct
166
  location
167
- Exim 4.61 changed queue file format which was incompatible with 4.52.2 --> patched
168
169
Version 4.52.2
170
=================
171
- Upgrade to MailScanner 4.52
172
173
Version 4.51.5
174
=================
175
- Some changes in FreeBSD 6.1 resulted in problems in the mta.sh script.
176
  Fixed.
177
- Upgrade to MailScanenr 4.51
178
179
Version 4.50.15_1
180
=================
181
- The MailScanner binary is now put into /usr/local/sbin allowing for
182
  easy use of the command-line options for debugging etc.
183
- From this version on all ports will contain this Change Log.
184
- The following scripts are now installed by the port as well (into
185
  /usr/local/libexec/MailScanner):
186
	- analyse_SpamAssassin_cache
187
	- clean.SA.cache (use this for manual clean or in crontab)
188
	- clean.quarantine (use this for manual clean or in crontab)
189
	- update_phishing_sites (use this for manual updates)
190
	- update_phishing_sites.cron (use this in crontab)
191
	- update_virus_scanners.cron (ise this in crontab)
192
- The latter two can/should be used in your crontab for updating those
193
  components. These scripts introduce a random delay for updating (can
194
  be configured in rc.conf).
195
- Fixed a small bug in mailscanner.sh script. Status/Stop was not
196
  always working.
197
198
Version 4.50.15
199
===============
200
- Upgrade to MailScanner 4.50.15-1
201
- Start/Stop scripts are now rc.subr compliant. Please adjust your config!
202
- The port now optionally installs Spamassassin, ClamAV and Bitdefender.
203
- make renew-wrapper, renew-autoupdate and renew-reports now depend on 
204
  configure instead of on install allowing their usage after a portupgrade.
(-)files/mailscanner.in (-1 / +1 lines)
Lines 28-34 Link Here
28
required_files=${mailscanner_configfile:-"%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
28
required_files=${mailscanner_configfile:-"%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
29
pidfile=${mailscanner_pidfile:-"/var/run/MailScanner.pid"}
29
pidfile=${mailscanner_pidfile:-"/var/run/MailScanner.pid"}
30
30
31
command="%%PREFIX%%/sbin/mailscanner"
31
command="%%PREFIX%%/sbin/MailScanner"
32
command_args="${required_files}"
32
command_args="${required_files}"
33
procname="MailScanner"
33
procname="MailScanner"
34
extra_commands=reload
34
extra_commands=reload
(-)files/pkg-install.in (-93 lines)
Lines 12-106 Link Here
12
PKGVERSION=%%PKGVERSION%%
12
PKGVERSION=%%PKGVERSION%%
13
WITHOUT_SPAMASSASSIN_SYMLINK=%%WITHOUT_SPAMASSASSIN_SYMLINK%%
13
WITHOUT_SPAMASSASSIN_SYMLINK=%%WITHOUT_SPAMASSASSIN_SYMLINK%%
14
14
15
upgrade_lang_conf()
16
{
17
	for LANG_DIR in ${DATADIR}/reports/*
18
	do
19
	    if [ -f ${LANG_DIR}/languages.conf ] ; then
20
		${ECHO} -n Upgrading ${LANG_DIR}/languages.conf... Please wait..
21
		${PERL} ${DATADIR}/upgrade_languages_conf \
22
			${LANG_DIR}/languages.conf \
23
			${LANG_DIR}/languages.conf.sample > \
24
			${LANG_DIR}/languages.conf.new.${PKGVERSION} \
25
			2> /dev/null
26
		if /usr/bin/diff -bBq ${LANG_DIR}/languages.conf \
27
			${LANG_DIR}/languages.conf.new.${PKGVERSION}
28
		then	${ECHO} " no changes"
29
			${RM} ${LANG_DIR}/languages.conf.new.${PKGVERSION}
30
		else	${ECHO} " done"
31
			${CP} ${LANG_DIR}/languages.conf.new.${PKGVERSION} \
32
				${LANG_DIR}/languages.conf
33
			${CHMOD} u+w ${LANG_DIR}/languages.conf
34
		fi
35
	    fi
36
	done
37
}
38
39
upgrade_mailscanner_conf()
40
{
41
	${PERL} ${DATADIR}/upgrade_MailScanner_conf			\
42
		${PKG_PREFIX}/etc/MailScanner/MailScanner.conf		\
43
		${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.sample >	\
44
	    ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION} \
45
		2> /dev/null
46
	if diff -b -B -q ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf	\
47
	    ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION}
48
	then	${ECHO} "No changes in MailScanner.conf options found"
49
	else	${ECHO} -n "Changes in MailScanner.conf found. Please look at"
50
	    ${ECHO} \
51
	     "${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION}"
52
	fi
53
}
54
55
initial_config()
56
{
57
	for LANG_DIR in ${DATADIR}/reports/*
58
	do
59
	    for REPORT_FILE in ${LANG_DIR}/*.sample
60
	    do
61
		[ ! -f ${REPORT_FILE%.sample} ] \
62
		    && cp -p ${REPORT_FILE} ${REPORT_FILE%.sample} \
63
		    && ${CHMOD} u+w ${REPORT_FILE%.sample}
64
	    done
65
	done
66
67
	for WRAPPER in ${PKG_PREFIX}/libexec/MailScanner/*-wrapper.sample
68
	do
69
	    [ ! -f ${WRAPPER%.sample} ] \
70
		&& cp -p ${WRAPPER} ${WRAPPER%.sample} \
71
		&& ${CHMOD} u+w ${WRAPPER%.sample}
72
	done
73
74
	for AUTOUPDATE in ${PKG_PREFIX}/libexec/MailScanner/*-autoupdate.sample
75
	do
76
	    [ ! -f ${AUTOUPDATE%.sample} ] \
77
		&& cp -p ${AUTOUPDATE} ${AUTOUPDATE%.sample} \
78
		&& ${CHMOD} u+w ${AUTOUPDATE%.sample}
79
	done
80
81
	for RULES in ${PKG_PREFIX}/etc/MailScanner/rules/*.rules.sample
82
	do
83
	    [ ! -f ${RULES%.sample} ] \
84
		&& cp -p ${RULES} ${RULES%.sample} \
85
		&& ${CHMOD} u+w ${RULES%.sample}
86
	done
87
88
	for MCP_FILES in %%MCP_FILES%%
89
	do
90
	    [ ! -f ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} ] \
91
		&& cp -p ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}.sample \
92
			${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} \
93
		&& ${CHMOD} u+w ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}
94
	done
95
96
	for ETC in ${PKG_PREFIX}/etc/MailScanner/*.sample
97
	do
98
	    [ ! -f ${ETC%.sample} ] \
99
		&& cp -p ${ETC} ${ETC%.sample} \
100
		&& ${CHMOD} u+w ${ETC%.sample}
101
	done
102
}
103
104
case $2 in
15
case $2 in
105
POST-INSTALL)
16
POST-INSTALL)
106
	[ "x${WITHOUT_SPAMASSASSIN_SYMLINK}" = "xno" ] \
17
	[ "x${WITHOUT_SPAMASSASSIN_SYMLINK}" = "xno" ] \
Lines 107-116 Link Here
107
	    && [ ! -r ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
18
	    && [ ! -r ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
108
	    && ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf \
19
	    && ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf \
109
		${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf
20
		${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf
110
	upgrade_lang_conf
111
	[ -f ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf ] \
112
		&& upgrade_mailscanner_conf
113
	initial_config
114
	exit 0
21
	exit 0
115
	;;
22
	;;
116
esac
23
esac
(-)pkg-plist (+15 lines)
Lines 18-23 Link Here
18
%%ETCDIR%%/spam.lists.conf
18
%%ETCDIR%%/spam.lists.conf
19
%%ETCDIR%%/spamassassin.conf
19
%%ETCDIR%%/spamassassin.conf
20
%%ETCDIR%%/virus.scanners.conf
20
%%ETCDIR%%/virus.scanners.conf
21
lib/MailScanner/init/ms-init
22
lib/MailScanner/wrapper/avast-wrapper
23
lib/MailScanner/wrapper/avg-autoupdate
24
lib/MailScanner/wrapper/avg-wrapper
25
lib/MailScanner/wrapper/bitdefender-autoupdate
26
lib/MailScanner/wrapper/bitdefender-wrapper
27
lib/MailScanner/wrapper/clamav-autoupdate
28
lib/MailScanner/wrapper/clamav-wrapper
29
lib/MailScanner/wrapper/esets-wrapper
30
lib/MailScanner/wrapper/f-secure-autoupdate
31
lib/MailScanner/wrapper/f-secure-wrapper
32
lib/MailScanner/wrapper/generic-autoupdate
33
lib/MailScanner/wrapper/generic-wrapper
34
lib/MailScanner/wrapper/sophos-autoupdate
35
lib/MailScanner/wrapper/sophos-wrapper
21
man/man8/MailScanner.8.gz
36
man/man8/MailScanner.8.gz
22
man/man8/mailscanner.8.gz
37
man/man8/mailscanner.8.gz
23
sbin/MailScanner
38
sbin/MailScanner

Return to bug 219938