View | Details | Raw Unified | Return to bug 157065
Collapse All | Expand All

(-)Makefile (-177 / +80 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	MailScanner
8
PORTNAME=	MailScanner
9
PORTVERSION=	4.83.4
9
PORTVERSION=	4.83.5
10
CATEGORIES=	mail
10
CATEGORIES=	mail
11
MASTER_SITES=	http://www.mailscanner.info/files/4/tar/
11
MASTER_SITES=	http://www.mailscanner.info/files/4/tar/
12
DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
12
DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
Lines 51-57 Link Here
51
USE_PERL5=	yes
51
USE_PERL5=	yes
52
52
53
WRKSRC=		${WRKDIR}/${PORTNAME}-install-${PORTVERSION}
53
WRKSRC=		${WRKDIR}/${PORTNAME}-install-${PORTVERSION}
54
SUB_FILES=	pkg-message
54
SUB_FILES=	pkg-message pkg-install pkg-deinstall
55
SUB_LIST=	DATADIR=${DATADIR} \
56
		PERL=${PERL} \
57
		PKGVERSION=${PKGVERSION} \
58
		ETC_FILES="${ETC_FILES}" \
59
		MCP_FILES="${MCP_FILES}"
55
60
56
MAN8=		MailScanner.8
61
MAN8=		MailScanner.8
57
MLINKS=		MailScanner.8 mailscanner.8
62
MLINKS=		MailScanner.8 mailscanner.8
Lines 101-107 Link Here
101
RUN_DEPENDS+=	bdc:${PORTSDIR}/security/bdc
106
RUN_DEPENDS+=	bdc:${PORTSDIR}/security/bdc
102
.endif
107
.endif
103
108
104
DOC_FILES=	INSTALL.FreeBSD INSTALL.OpenBSD README
109
DOC_FILES=	INSTALL.FreeBSD README
105
ETC_FILES=	MailScanner.conf filename.rules.conf \
110
ETC_FILES=	MailScanner.conf filename.rules.conf \
106
		archives.filename.rules.conf archives.filetype.rules.conf \
111
		archives.filename.rules.conf archives.filetype.rules.conf \
107
		filetype.rules.conf spam.assassin.prefs.conf \
112
		filetype.rules.conf spam.assassin.prefs.conf \
Lines 188-389 Link Here
188
	@${FIND} ${WRKSRC} \( -name "*.bak" -or -name "*.orig" \) -delete
193
	@${FIND} ${WRKSRC} \( -name "*.bak" -or -name "*.orig" \) -delete
189
194
190
do-install:
195
do-install:
191
	#
196
	@${ECHO_MSG} -n ">> Installing files in ${PREFIX}/sbin..."
192
	# Step 1: Install bin files
197
	@${INSTALL_SCRIPT} ${WRKSRC}/bin/MailScanner ${PREFIX}/sbin/mailscanner
193
	#
198
	@${LN} -s ${PREFIX}/sbin/mailscanner ${PREFIX}/sbin/MailScanner
194
	${INSTALL_SCRIPT} ${WRKSRC}/bin/MailScanner ${PREFIX}/sbin/mailscanner
199
	@${ECHO_MSG} " [DONE]"
195
	${LN} -s ${PREFIX}/sbin/mailscanner ${PREFIX}/sbin/MailScanner
200
	@${ECHO_MSG} -n \
196
	#
201
		">> Installing files in ${PREFIX}/libexec/MailScanner..."
197
	# Step 2: Install libexec files
202
	@${MKDIR} -m ${BINMODE} ${PREFIX}/libexec/MailScanner
198
	#
203
	@cd ${WRKSRC}/lib && ${FIND} * -name "*-wrapper" -exec \
199
	${MKDIR} ${PREFIX}/libexec/MailScanner
200
	${CHMOD} -R ${BINMODE} ${PREFIX}/libexec/MailScanner
201
	cd ${WRKSRC}/lib && ${FIND} * -name "*-wrapper" -exec \
202
		${INSTALL_SCRIPT} {} ${PREFIX}/libexec/MailScanner/{}.sample \;
204
		${INSTALL_SCRIPT} {} ${PREFIX}/libexec/MailScanner/{}.sample \;
203
	cd ${WRKSRC}/lib && ${FIND} * -name "*-autoupdate" -exec \
205
	@cd ${WRKSRC}/lib && ${FIND} * -name "*-autoupdate" -exec \
204
		${INSTALL_SCRIPT} {} ${PREFIX}/libexec/MailScanner/{}.sample \;
206
		${INSTALL_SCRIPT} {} ${PREFIX}/libexec/MailScanner/{}.sample \;
205
	${INSTALL_SCRIPT} ${WRKSRC}/bin/analyse_SpamAssassin_cache \
207
.for FILE in analyse_SpamAssassin_cache clean.SA.cache clean.quarantine \
206
		${PREFIX}/libexec/MailScanner/analyse_SpamAssassin_cache
208
		mailscanner_create_locks processing_messages_alert Quick.Peek \
207
	${INSTALL_SCRIPT} ${WRKSRC}/bin/clean.SA.cache \
209
		update_bad_phishing_emails update_phishing_sites \
208
		${PREFIX}/libexec/MailScanner/clean.SA.cache
210
		update_bad_phishing_sites cron/update_phishing_sites.cron \
209
	${INSTALL_SCRIPT} ${WRKSRC}/bin/clean.quarantine \
211
		cron/update_bad_phishing_sites.cron update_virus_scanners \
210
		${PREFIX}/libexec/MailScanner/clean.quarantine
212
		cron/update_virus_scanners.cron update_spamassassin \
211
	${INSTALL_SCRIPT} ${WRKSRC}/bin/mailscanner_create_locks \
213
		cron/update_spamassassin.cron
212
		${PREFIX}/libexec/MailScanner/mailscanner_create_locks
214
	@${INSTALL_SCRIPT} ${WRKSRC}/bin/${FILE} \
213
	${INSTALL_SCRIPT} ${WRKSRC}/bin/processing_messages_alert \
215
		${PREFIX}/libexec/MailScanner/
214
		${PREFIX}/libexec/MailScanner/processing_messages_alert
216
.endfor
215
	${INSTALL_SCRIPT} ${WRKSRC}/bin/Quick.Peek \
217
	@${ECHO_MSG} " [DONE]"
216
		${PREFIX}/libexec/MailScanner/Quick.Peek
218
	@${ECHO_MSG} -n ">> Installing files in ${PREFIX}/etc/MailScanner..."
217
	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_bad_phishing_emails \
219
	@${MKDIR} -m ${BINMODE} ${PREFIX}/etc/MailScanner
218
		${PREFIX}/libexec/MailScanner/update_bad_phishing_emails
219
	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_phishing_sites \
220
		${PREFIX}/libexec/MailScanner/update_phishing_sites
221
	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_bad_phishing_sites \
222
		${PREFIX}/libexec/MailScanner/update_bad_phishing_sites
223
	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_phishing_sites.cron \
224
		${PREFIX}/libexec/MailScanner/update_phishing_sites.cron
225
	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_bad_phishing_sites.cron \
226
		${PREFIX}/libexec/MailScanner/update_bad_phishing_sites.cron
227
	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_virus_scanners \
228
		${PREFIX}/libexec/MailScanner/update_virus_scanners
229
	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_virus_scanners.cron \
230
		${PREFIX}/libexec/MailScanner/update_virus_scanners.cron
231
	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_spamassassin \
232
		${PREFIX}/libexec/MailScanner/update_spamassassin
233
	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_spamassassin.cron \
234
		${PREFIX}/libexec/MailScanner/update_spamassassin.cron
235
	#
236
	# Step 3: Install etc files
237
	#
238
	${MKDIR} ${PREFIX}/etc/MailScanner
239
	${CHMOD} ${BINMODE} ${PREFIX}/etc/MailScanner
240
.for FILE in ${ETC_FILES}
220
.for FILE in ${ETC_FILES}
241
	${INSTALL_DATA} ${WRKSRC}/etc/${FILE} \
221
	@${INSTALL_DATA} ${WRKSRC}/etc/${FILE} \
242
		${PREFIX}/etc/MailScanner/${FILE}.sample
222
		${PREFIX}/etc/MailScanner/${FILE}.sample
243
.endfor
223
.endfor
244
	${MKDIR} ${PREFIX}/etc/MailScanner/rules
224
	@${MKDIR} ${PREFIX}/etc/MailScanner/rules
245
	cd ${WRKSRC}/etc/rules && \
225
	@cd ${WRKSRC}/etc/rules \
246
		${INSTALL_DATA} EXAMPLES README ${PREFIX}/etc/MailScanner/rules
226
		&& ${INSTALL_DATA} EXAMPLES README \
247
	${INSTALL_DATA} ${WRKSRC}/etc/rules/spam.whitelist.rules \
227
			${PREFIX}/etc/MailScanner/rules
248
		${PREFIX}/etc/MailScanner/rules/spam.whitelist.rules.sample
228
.for RULES in spam.whitelist.rules bounce.rules max.message.size.rules
249
	${INSTALL_DATA} ${WRKSRC}/etc/rules/bounce.rules \
229
	@${INSTALL_DATA} ${WRKSRC}/etc/rules/${RULES} \
250
		${PREFIX}/etc/MailScanner/rules/bounce.rules.sample
230
		${PREFIX}/etc/MailScanner/rules/${RULES}.sample
251
	${INSTALL_DATA} ${WRKSRC}/etc/rules/max.message.size.rules \
231
.endfor
252
		${PREFIX}/etc/MailScanner/rules/max.message.size.rules.sample
232
	@${MKDIR} -m ${BINMODE} ${PREFIX}/etc/MailScanner/mcp
253
	${MKDIR} ${PREFIX}/etc/MailScanner/mcp
254
	${CHMOD} ${BINMODE} ${PREFIX}/etc/MailScanner/mcp
255
.for FILE in ${MCP_FILES}
233
.for FILE in ${MCP_FILES}
256
	${INSTALL_DATA} ${WRKSRC}/etc/mcp/${FILE} \
234
	@${INSTALL_DATA} ${WRKSRC}/etc/mcp/${FILE} \
257
		${PREFIX}/etc/MailScanner/mcp/${FILE}.sample
235
		${PREFIX}/etc/MailScanner/mcp/${FILE}.sample
258
.endfor
236
.endfor
259
	${MKDIR} ${PREFIX}/etc/MailScanner/conf.d
237
	@${MKDIR} ${PREFIX}/etc/MailScanner/conf.d
260
	${INSTALL_DATA} ${WRKSRC}/etc/conf.d/README \
238
	@${INSTALL_DATA} ${WRKSRC}/etc/conf.d/README \
261
		${PREFIX}/etc/MailScanner/conf.d/README
239
		${PREFIX}/etc/MailScanner/conf.d/README
262
	#
240
	@${ECHO_MSG} " [DONE]"
263
	# Step 4: Install files in share
241
	@${ECHO_MSG} -n ">> Installing files in ${DATADIR}..."
264
	#
265
	@${MKDIR} ${DATADIR}
242
	@${MKDIR} ${DATADIR}
266
	cd ${WRKSRC}/etc && ${FIND} reports -type d ! -name "*.old" -exec \
243
	@cd ${WRKSRC}/etc && ${FIND} reports -type d ! -name "*.old" -exec \
267
		${MKDIR} ${DATADIR}/{} \;
244
		${MKDIR} -m ${BINMODE} ${DATADIR}/{} \;
268
	# cd ${WRKSRC}/etc && ${FIND} reports -type f ! \( -name "*.orig" -exec ...
245
	@cd ${WRKSRC}/etc \
269
	cd ${WRKSRC}/etc && ${FIND} reports \( -type d -name "*.old" -prune \) \
246
	    && ${FIND} reports \( -type d -name "*.old" -prune \) \
270
		-o \( -type f ! \( -name "*.orig" -o -name "*.bak" \) \
247
	    -o \( -type f ! \( -name "*.orig" -o -name "*.bak" \) \
271
		-exec ${INSTALL_DATA} {} ${DATADIR}/{}.sample \; \)
248
		-exec ${INSTALL_DATA} {} ${DATADIR}/{}.sample \; \)
272
	${CHMOD} -R ${BINMODE} ${DATADIR}/reports
249
	@${INSTALL_SCRIPT} ${WRKSRC}/bin/upgrade_MailScanner_conf ${DATADIR}
273
	#
250
	@${LN} -s ${DATADIR}/upgrade_MailScanner_conf \
274
	# Step 5: Install lib
251
		${DATADIR}/upgrade_languages_conf
275
	#
252
	@${ECHO_MSG} " [DONE]"
276
	${MKDIR} ${PREFIX}/lib/MailScanner/MailScanner
253
	@${ECHO_MSG} -n ">> Installing files in ${PREFIX}/lib..."
277
	${MKDIR} ${PREFIX}/lib/MailScanner/MailScanner/CustomFunctions
254
	@${MKDIR} ${PREFIX}/lib/MailScanner/MailScanner/CustomFunctions
278
	${INSTALL_SCRIPT} ${WRKSRC}/lib/MailScanner.pm \
255
	@${INSTALL_SCRIPT} ${WRKSRC}/lib/MailScanner.pm \
279
		${PREFIX}/lib/MailScanner/MailScanner.pm
256
		${PREFIX}/lib/MailScanner/MailScanner.pm
280
	cd ${WRKSRC}/lib/MailScanner && ${FIND} * -type f ! -name "*.orig" -exec \
257
	@cd ${WRKSRC}/lib/MailScanner \
258
		&& ${FIND} * -type f ! -name "*.orig" -exec \
281
		${INSTALL_SCRIPT} {} ${PREFIX}/lib/MailScanner/MailScanner/{} \;
259
		${INSTALL_SCRIPT} {} ${PREFIX}/lib/MailScanner/MailScanner/{} \;
282
	#
283
	# Step 6: Docs & Manpages
284
	#
285
	# Manpage
286
.if !defined(NOPORTDOCS)
260
.if !defined(NOPORTDOCS)
287
	${MKDIR} ${DOCSDIR}
261
	@${ECHO_MSG} -n ">> Installing docs and manpage..."
288
	${INSTALL_DATA} ${FILESDIR}/README.FreeBSD.port ${DOCSDIR}
262
	@${MKDIR} ${DOCSDIR}
289
	# Sophos install script
263
	@${INSTALL_DATA} ${FILESDIR}/README.FreeBSD.port ${DOCSDIR}
290
	${INSTALL_SCRIPT} ${FILESDIR}/Sophos.install.freebsd ${DOCSDIR}
264
	@${INSTALL_SCRIPT} ${FILESDIR}/Sophos.install.freebsd ${DOCSDIR}
291
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOC_FILES} ${DOCSDIR}
265
	@cd ${WRKSRC} && ${INSTALL_DATA} ${DOC_FILES} ${DOCSDIR}
292
	cd ${FILESDIR} && ${INSTALL_DATA} CHANGES.port ${DOCSDIR}
266
	@${REINPLACE_CMD} \
267
		-e 's,%%LOCALBASE%%,${LOCALBASE},'	\
268
		-e 's,%%PREFIX%%,${PREFIX},'		\
269
		${DOCSDIR}/Sophos.install.freebsd
270
	@${RM} -f ${DOCSDIR}/Sophos.install.freebsd.bak
271
.else
272
	@${ECHO_MSG} -n ">> Installing manpage..."
293
.endif
273
.endif
294
	cd ${FILESDIR} && \
274
	@cd ${FILESDIR} && \
295
		${INSTALL_MAN} ${MAN8} ${MAN5PREFIX}/man/man8
275
		${INSTALL_MAN} ${MAN8} ${MAN5PREFIX}/man/man8
296
	${PERL} -pi -e \
276
	@${ECHO_MSG} " [DONE]"
297
		's,%%LOCALBASE%%,${LOCALBASE},g; \
298
		s,%%PREFIX%%,${PREFIX},g;' \
299
		${DOCSDIR}/Sophos.install.freebsd
300
.if exists(${PREFIX}/etc/MailScanner/MailScanner.conf)
301
	# Upgrading MailScanner.conf file... Please wait
302
	@${PERL} ${WRKSRC}/bin/upgrade_MailScanner_conf \
303
		${PREFIX}/etc/MailScanner/MailScanner.conf \
304
		${PREFIX}/etc/MailScanner/MailScanner.conf.sample > \
305
		${PREFIX}/etc/MailScanner/MailScanner.conf.new.${PORTVERSION} \
306
		2> /dev/null
307
	# Diff the files. If the files do not differ, delete the new file
308
	@if diff -b -B -q ${PREFIX}/etc/MailScanner/MailScanner.conf \
309
		${PREFIX}/etc/MailScanner/MailScanner.conf.new.${PORTVERSION} ; \
310
	   then ${ECHO} "No changes in MailScanner.conf options found" ; \
311
		${RM} ${PREFIX}/etc/MailScanner/MailScanner.conf.new.${PORTVERSION} ; \
312
	else \
313
	   ${ECHO} "Changes in MailScanner.conf found. Please look at \
314
		${PREFIX}/etc/MailScanner/MailScanner.conf.new.${PORTVERSION}" ; \
315
	fi
316
.endif
317
	# Languages.conf update
318
	@for LANG_DIR in ${DATADIR}/reports/*; do \
319
		if [ -f $${LANG_DIR}/languages.conf ]; then \
320
			${ECHO} -n Upgrading $${LANG_DIR}/languages.conf... Please wait...; \
321
			${PERL} ${WRKSRC}/bin/upgrade_languages_conf \
322
				$${LANG_DIR}/languages.conf \
323
				$${LANG_DIR}/languages.conf.sample > \
324
				$${LANG_DIR}/languages.conf.new.${PORTVERSION} \
325
				2> /dev/null ; \
326
			if diff -b -B -q $${LANG_DIR}/languages.conf \
327
				$${LANG_DIR}/languages.conf.new.${PORTVERSION} ; \
328
			  then	${ECHO} " no changes"; \
329
				${RM} $${LANG_DIR}/languages.conf.new.${PORTVERSION} ; \
330
			  else	${ECHO} " done"; \
331
				${CP} $${LANG_DIR}/languages.conf.new.${PORTVERSION} $${LANG_DIR}/languages.conf ; \
332
			fi; \
333
		fi; \
334
	done
335
	@${CAT} ${PKGMESSAGE}
336
277
337
post-install:
278
post-install:
338
.if defined(WITH_SPAMASSASSIN) && !defined(WITHOUT_SPAMASSASSIN_SYMLINK)
279
.if defined(WITH_SPAMASSASSIN) && !defined(WITHOUT_SPAMASSASSIN_SYMLINK)
339
	@if [ ! -r ${PREFIX}/etc/mail/spamassassin/mailscanner.cf ]; then \
280
	@${SETENV} PKG_PREFIX=${PREFIX} \
340
		${ECHO} ${LN} -s ${PREFIX}/etc/MailScanner/spam.assassin.prefs.conf ${PREFIX}/etc/mail/spamassassin/mailscanner.cf; \
281
	    ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
341
		${LN} -s ${PREFIX}/etc/MailScanner/spam.assassin.prefs.conf ${PREFIX}/etc/mail/spamassassin/mailscanner.cf; \
282
.else
342
	else \
283
	@${SETENV} PKG_PREFIX=${PREFIX} WITHOUT_SPAMASSASSIN_SYMLINK=yes \
343
		${ECHO} "File ${PREFIX}/etc/mail/spamassassin/mailscanner.cf already exists!"; \
284
	    ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
344
	fi;
345
.endif
285
.endif
346
	# Display warning about new start/stop scripts
286
	@${CAT} ${PKGMESSAGE}
347
	@${CAT} ${FILESDIR}/rcwarning.txt
348
.if !defined(BATCH)
287
.if !defined(BATCH)
349
	@${ECHO} Press ENTER to continue...
288
	@${ECHO_MSG} Press ENTER to continue...
350
	@read a
289
	@read a
351
.endif
290
.endif
352
291
353
renew-wrapper: configure
354
	# Renew virus wrapper scripts
355
	${INSTALL_SCRIPT} ${WRKSRC}/lib/*-wrapper ${PREFIX}/libexec/MailScanner
356
357
renew-autoupdate: configure
358
	# Renew autoupdate scripts
359
	${INSTALL_SCRIPT} ${WRKSRC}/lib/*-autoupdate ${PREFIX}/libexec/MailScanner
360
361
renew-reports: configure
362
	# Renew reports
363
	cd ${WRKSRC}/etc/reports/en && ${FIND} * -type f ! -name "*.orig" \
364
		-exec ${INSTALL_DATA} {} ${DATADIR}/reports/en/{}  \;
365
366
initial-config: renew-wrapper renew-autoupdate renew-reports
367
	cd ${WRKSRC}/etc && ${INSTALL_DATA} ${ETC_FILES} \
368
		${PREFIX}/etc/MailScanner
369
	${INSTALL_DATA} ${WRKSRC}/etc/rules/spam.whitelist.rules \
370
		${PREFIX}/etc/MailScanner/rules/spam.whitelist.rules
371
	${INSTALL_DATA} ${WRKSRC}/etc/rules/bounce.rules \
372
		${PREFIX}/etc/MailScanner/rules/bounce.rules
373
	${INSTALL_DATA} ${WRKSRC}/etc/rules/max.message.size.rules \
374
		${PREFIX}/etc/MailScanner/rules/max.message.size.rules
375
.for FILE in ${MCP_FILES}
376
	${INSTALL_DATA} ${WRKSRC}/etc/mcp/${FILE} \
377
		${PREFIX}/etc/MailScanner/mcp/${FILE}
378
.endfor
379
	@${ECHO} "******************************************************************************"
380
	@${ECHO} "The provided default configuration requires several directories to be created:"
381
	@${ECHO} "/var/spool/MailScanner/incoming"
382
	@${ECHO} "/var/spool/MailScanner/incoming/Locks"
383
	@${ECHO} "/var/spool/MailScanner/quarantine"
384
	@${ECHO} "/var/spool/mqueue"
385
	@${ECHO} "/var/spool/mqueue.in"
386
	@${ECHO} "Either create those directories or change the configuration."
387
	@${ECHO} "******************************************************************************"
388
389
.include <bsd.port.post.mk>
292
.include <bsd.port.post.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (MailScanner-install-4.83.4-1.tar.gz) = 567e1d576af39561f77b2113aa30e5ea864092081b5e0e08a9e679fa23754c89
1
SHA256 (MailScanner-install-4.83.5-1.tar.gz) = 1c1fda2e9fc2268674e4228f2ec14d2c1d781fd0b9d3ae97ccaf487bdbcf8160
2
SIZE (MailScanner-install-4.83.4-1.tar.gz) = 9505704
2
SIZE (MailScanner-install-4.83.5-1.tar.gz) = 9507037
(-)pkg-plist (-4 / +2 lines)
Lines 544-558 Link Here
544
%%DATADIR%%/reports/sk/deleted.size.message.txt.sample
544
%%DATADIR%%/reports/sk/deleted.size.message.txt.sample
545
%%DATADIR%%/reports/sk/sender.size.report.txt.sample
545
%%DATADIR%%/reports/sk/sender.size.report.txt.sample
546
%%DATADIR%%/reports/sk/stored.size.message.txt.sample
546
%%DATADIR%%/reports/sk/stored.size.message.txt.sample
547
%%DATADIR%%/upgrade_MailScanner_conf
548
%%DATADIR%%/upgrade_languages_conf
547
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD.port
549
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD.port
548
%%PORTDOCS%%%%DOCSDIR%%/CHANGES.port
549
%%PORTDOCS%%%%DOCSDIR%%/Sophos.install.freebsd
550
%%PORTDOCS%%%%DOCSDIR%%/Sophos.install.freebsd
550
%%PORTDOCS%%%%DOCSDIR%%/INSTALL.FreeBSD
551
%%PORTDOCS%%%%DOCSDIR%%/INSTALL.FreeBSD
551
%%PORTDOCS%%%%DOCSDIR%%/INSTALL.OpenBSD
552
%%PORTDOCS%%%%DOCSDIR%%/README
552
%%PORTDOCS%%%%DOCSDIR%%/README
553
%%PORTDOCS%%@dirrm %%DOCSDIR%%
553
%%PORTDOCS%%@dirrm %%DOCSDIR%%
554
%%SPAMASSASSIN%%%%SPAMASSASSIN_SYMLINK%%@exec [ -e %D/etc/mail/spamassassin/mailscanner.cf ] ||  ln -s %D/etc/MailScanner/spam.assassin.prefs.conf %D/etc/mail/spamassassin/mailscanner.cf
555
%%SPAMASSASSIN%%%%SPAMASSASSIN_SYMLINK%%@unexec [ -L %D/etc/mail/spamassassin/mailscanner.cf ] &&  rm -f %D/etc/mail/spamassassin/mailscanner.cf
556
@dirrm %%DATADIR%%/reports/sk
554
@dirrm %%DATADIR%%/reports/sk
557
@dirrm %%DATADIR%%/reports/se
555
@dirrm %%DATADIR%%/reports/se
558
@dirrm %%DATADIR%%/reports/ro
556
@dirrm %%DATADIR%%/reports/ro
(-)files/CHANGES.port (-155 lines)
Removed Link Here
1
Version 4.83.4
2
==============
3
- Upgrade to 4.83.4
4
5
Version 4.83.2
6
==============
7
- Upgrade to 4.83.2
8
- Update mta init script so it starts MTAs after other init scripts
9
  (milters, etc) that should start before "mail".
10
11
Version 4.82.6
12
==============
13
- Upgrade to 4.82.6
14
15
Version 4.81.4
16
==============
17
- Upgrade to 4.81.4
18
- Added dependency for p5-Sys-SigAction port
19
20
Version 4.75.11
21
===============
22
- Upgrade to 4.75.11
23
24
Version 4.67.6
25
==============
26
- Upgrade to 4.67.6
27
- Now works with p5-Mail-Tools Version 2.x again
28
29
Version 4.64.3
30
==============
31
- Upgrade to 4.64.3
32
33
Version 4.62.9
34
==============
35
- Upgrade to 4.62.9
36
- update_spamassassin and update_spamassassin.cron are untouched again. I
37
  currently do not have enough time to get this running the FreeBSD way.
38
  Patches are welcome.
39
40
Version 4.61.7
41
==============
42
- Upgrade to 4.61.7
43
- Attention: update_spamassassin and update_spamassassin.cron are rewritten to fit
44
  FreeBSD. Untestet. If you are using non-standard directories or FreeBSD < 6 you will
45
  have to tweck update_spamassassin.
46
47
Version 4.60.8_2
48
================
49
- Fixed error in auto-zip: If a message contained 2 different attachments 
50
  with exactly the same filename, the auto-zip feature would fail and 
51
  MailScanner would die.
52
53
Version 4.60.8
54
==============
55
- update to 4.60.8
56
57
Version 4.59.4_2
58
================
59
- update to 4.59.4
60
61
Version 4.58.9_2
62
================
63
- clamav-wrapper contained options unarj, unace and zoo. unace
64
  seems to be dead and the other options are corrected to be
65
  arj and unzoo.
66
67
Version 4.58.9
68
================
69
- Upgrade to MailScanner 4.58
70
- fix: CHANGES.port was not installed anymore
71
- startscripts now honor RC_SUBR_SUFFIX
72
73
Version 4.57.6_1
74
================
75
- Upgrade to MailScanner 4.57
76
77
Version 4.56.8_1
78
================
79
- fixed problem with upgrade_mailscanner_config 
80
81
Version 4.56.8
82
==============
83
- Upgrade to MailScanner 4.56
84
85
Version 4.55.10
86
===============
87
- Upgrade to MailScanner 4.55
88
- As Julian removed the documentation from the tarball I did the same in the port.
89
  Manpage and html docs removed as well. All documentation can now be found on 
90
  the web.
91
92
Version 4.54.6_1
93
=================
94
- Path to gunzip in MailScanner.conf fixed
95
96
Version 4.54.6
97
=================
98
- Upgrade to MailScanner 4.54
99
- Download location changed
100
- added sysutils/p5-Sys-Hostname-Long dependency
101
102
Version 4.53.8
103
=================
104
- 4.53.7 contained a bug in scanning of phishing mails. This resulted in scanning loops
105
106
Version 4.53.7
107
=================
108
- Upgrade to MailScanner 4.53
109
- changed some patch-names
110
- created sa-update.cron in libexece/MailScanner to periodically run sa-update
111
112
Version 4.52.2_1
113
=================
114
- fixed bug in mta.sh script
115
- fixed rc.subr reference in update_phishing_sites.cron and 
116
  update_virus_scanners.cron --> now dynamically rewritten to correct
117
  location
118
- Exim 4.61 changed queue file format which was incompatible with 4.52.2 --> patched
119
120
Version 4.52.2
121
=================
122
- Upgrade to MailScanner 4.52
123
124
Version 4.51.5
125
=================
126
- Some changes in FreeBSD 6.1 resulted in problems in the mta.sh script.
127
  Fixed.
128
- Upgrade to MailScanenr 4.51
129
130
Version 4.50.15_1
131
=================
132
- The MailScanner binary is now put into /usr/local/sbin allowing for
133
  easy use of the command-line options for debugging etc.
134
- From this version on all ports will contain this Change Log.
135
- The following scripts are now installed by the port as well (into
136
  /usr/local/libexec/MailScanner):
137
	- analyse_SpamAssassin_cache
138
	- clean.SA.cache (use this for manual clean or in crontab)
139
	- clean.quarantine (use this for manual clean or in crontab)
140
	- update_phishing_sites (use this for manual updates)
141
	- update_phishing_sites.cron (use this in crontab)
142
	- update_virus_scanners.cron (ise this in crontab)
143
- The latter two can/should be used in your crontab for updating those
144
  components. These scripts introduce a random delay for updating (can
145
  be configured in rc.conf).
146
- Fixed a small bug in mailscanner.sh script. Status/Stop was not
147
  always working.
148
149
Version 4.50.15
150
===============
151
- Upgrade to MailScanner 4.50.15-1
152
- Start/Stop scripts are now rc.subr compliant. Please adjust your config!
153
- The port now optionally installs Spamassassin, ClamAV and Bitdefender.
154
- make renew-wrapper, renew-autoupdate and renew-reports now depend on 
155
  configure instead of on install allowing their usage after a portupgrade.
(-)files/pkg-deinstall.in (+79 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
5
DATADIR=%%DATADIR%%
6
ETC_FILES="%%ETC_FILES%%"
7
8
prune_lang_conf()
9
{
10
	for LANG_DIR in ${DATADIR}/reports/*
11
	do
12
	    for REPORT_FILE in ${LANG_DIR}/*.sample
13
	    do
14
		cmp -s ${REPORT_FILE%.sample} ${REPORT_FILE} \
15
			&& rm -f ${REPORT_FILE%.sample}
16
	    done
17
	done
18
}
19
20
prune_wrappers()
21
{
22
	for WRAPPER in ${PKG_PREFIX}/libexec/MailScanner/*-wrapper
23
	do
24
		cmp -s ${WRAPPER} ${WRAPPER}.sample \
25
			&& rm -f ${WRAPPER}
26
	done
27
}
28
29
prune_autoupdate()
30
{
31
	for AUTOUPDATE in ${PKG_PREFIX}/libexec/MailScanner/*-autoupdate
32
	do
33
		cmp -s ${AUTOUPDATE} ${AUTOUPDATE}.sample \
34
			&& rm -f ${AUTOUPDATE}
35
	done
36
}
37
38
prune_rules()
39
{
40
	for RULES in ${PKG_PREFIX}/etc/MailScanner/rules/*.rules
41
	do
42
		cmp -s ${RULES} ${RULES}.sample \
43
			&& rm -f ${RULES}
44
	done
45
}
46
47
prune_mcp()
48
{
49
	for MCP_FILES in %%MCP_FILES%%
50
	do
51
		cmp -s ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}.sample \
52
			${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}	\
53
			&& rm -f ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}
54
	done
55
}
56
57
prune_etc()
58
{
59
	for ETC in ${ETC_FILES}
60
	do
61
		cmp -s ${PKG_PREFIX}/etc/MailScanner/${ETC}.sample \
62
			${PKG_PREFIX}/etc/MailScanner/${ETC}	\
63
			&& rm -f ${PKG_PREFIX}/etc/MailScanner/${ETC}
64
	done
65
}
66
67
case $2 in
68
DEINSTALL)
69
	[ -L ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
70
		&& rm -f ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf
71
	prune_lang_conf
72
	prune_wrappers
73
	prune_autoupdate
74
	prune_rules
75
	prune_mcp
76
	prune_etc
77
	exit 0
78
	;;
79
esac
(-)files/pkg-install.in (+107 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
5
CP=/bin/cp
6
DATADIR=%%DATADIR%%
7
ECHO=echo
8
LN=/bin/ln
9
PERL=%%PERL%%
10
RM=/bin/rm
11
PKGVERSION=%%PKGVERSION%%
12
13
upgrade_lang_conf()
14
{
15
	for LANG_DIR in ${DATADIR}/reports/*
16
	do
17
	    if [ -f ${LANG_DIR}/languages.conf ] ; then
18
		${ECHO} -n Upgrading ${LANG_DIR}/languages.conf... Please wait..
19
		${PERL} ${DATADIR}/upgrade_languages_conf \
20
			${LANG_DIR}/languages.conf \
21
			${LANG_DIR}/languages.conf.sample > \
22
			${LANG_DIR}/languages.conf.new.${PKGVERSION} \
23
			2> /dev/null
24
		if /usr/bin/diff -bBq ${LANG_DIR}/languages.conf \
25
			${LANG_DIR}/languages.conf.new.${PKGVERSION}
26
		then	${ECHO} " no changes"
27
			${RM} ${LANG_DIR}/languages.conf.new.${PKGVERSION}
28
		else	${ECHO} " done"
29
			${CP} ${LANG_DIR}/languages.conf.new.${PKGVERSION} \
30
				${LANG_DIR}/languages.conf
31
		fi
32
	    fi
33
	done
34
}
35
36
upgrade_mailscanner_conf()
37
{
38
	${PERL} ${DATADIR}/upgrade_MailScanner_conf			\
39
		${PKG_PREFIX}/etc/MailScanner/MailScanner.conf		\
40
		${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.sample >	\
41
	    ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION} \
42
		2> /dev/null
43
	if diff -b -B -q ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf	\
44
	    ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION}
45
	then	${ECHO} "No changes in MailScanner.conf options found"
46
	else	${ECHO} -n "Changes in MailScanner.conf found. Please look at"
47
	    ${ECHO} \
48
	     "${PKG_PREFIX}/etc/MailScanner/MailScanner.conf.new.${PKGVERSION}"
49
	fi
50
}
51
52
initial_config()
53
{
54
	for LANG_DIR in ${DATADIR}/reports/*
55
	do
56
	    for REPORT_FILE in ${LANG_DIR}/*.sample
57
	    do
58
		[ ! -f ${REPORT_FILE%.sample} ] \
59
		    && cp -p ${REPORT_FILE} ${REPORT_FILE%.sample}
60
	    done
61
	done
62
63
	for WRAPPER in ${PKG_PREFIX}/libexec/MailScanner/*-wrapper.sample
64
	do
65
	    [ ! -f ${WRAPPER%.sample} ] \
66
		&& cp -p ${WRAPPER} ${WRAPPER%.sample}
67
	done
68
69
	for AUTOUPDATE in ${PKG_PREFIX}/libexec/MailScanner/*-autoupdate.sample
70
	do
71
	    [ ! -f ${AUTOUPDATE%.sample} ] \
72
		&& cp -p ${AUTOUPDATE} ${AUTOUPDATE%.sample}
73
	done
74
75
	for RULES in ${PKG_PREFIX}/etc/MailScanner/rules/*.rules.sample
76
	do
77
	    [ ! -f ${RULES%.sample} ] \
78
		&& cp -p ${RULES} ${RULES%.sample}
79
	done
80
81
	for MCP_FILES in %%MCP_FILES%%
82
	do
83
	    [ ! -f ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} ] \
84
		&& cp -p ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}.sample \
85
			${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}
86
	done
87
88
	for ETC in ${PKG_PREFIX}/etc/MailScanner/*.sample
89
	do
90
	    [ ! -f ${ETC%.sample} ] \
91
		&& cp -p ${ETC} ${ETC%.sample}
92
	done
93
}
94
95
case $2 in
96
POST-INSTALL)
97
	[ ! -z "${WITHOUT_SPAMASSASSIN_SYMLINK}" ] \
98
	    && [ ! -r ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
99
	    && ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf \
100
		${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf
101
	upgrade_lang_conf
102
	[ -f ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf ] \
103
		&& upgrade_mailscanner_conf
104
	initial_config
105
	exit 0
106
	;;
107
esac
(-)files/pkg-message.in (-23 / +11 lines)
Lines 11-40 Link Here
11
11
12
	You will need to make several modifications to config files
12
	You will need to make several modifications to config files
13
	before MailScanner will work correctly.
13
	before MailScanner will work correctly.
14
                                              
15
	If this is the first time you are installing this port you
16
	should create an initial set of configuration files with 
17
                                                               
18
	make initial-config 
19
20
	within this directory. Without this step you will only have
21
	.sample files instead of real .conf files and report
22
	templates.
23
24
	If you are upgrading your port you might consider 
25
	running
26
27
	make renew-wrapper
28
	make renew-autoupdate
29
	make renew-reports
30
31
	to update your virus-wrappers, autoupdates, reports and
32
	languages.conf
33
34
	The english languages.conf is updated automatically. For all
35
	other versions use the update_languages_conf tool found
36
	in the work directory of this port.
37
14
15
	The provided default configuration requires several directories
16
	to be created:
17
18
		/var/spool/MailScanner/incoming
19
		/var/spool/MailScanner/incoming/Locks
20
		/var/spool/MailScanner/quarantine
21
		/var/spool/mqueue
22
		/var/spool/mqueue.in
23
24
	Either create those directories or change the configuration.
25
                                              
38
	Sophos users: Please take a look at the Sophos install
26
	Sophos users: Please take a look at the Sophos install
39
	script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
27
	script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
40
28
(-)files/rcwarning.txt (-18 lines)
Removed Link Here
1
*************************************************************************
2
	    _  _____ _____ _____ _   _ _____ ___ ___  _   _ 	
3
	   / \|_   _|_   _| ____| \ | |_   _|_ _/ _ \| \ | |
4
	  / _ \ | |   | | |  _| |  \| | | |  | | | | |  \| |
5
	 / ___ \| |   | | | |___| |\  | | |  | | |_| | |\  |
6
	/_/   \_\_|   |_| |_____|_| \_| |_| |___\___/|_| \_|
7
							
8
9
  The MailScanner port uses new start/stop scripts according to rc.subr 
10
  standard. Your old scripts will be overwritten after you press ENTER.
11
  To start mailscanner and your mta, please put the correct statements in 
12
  your rc.conf. For examples/syntax please look at mailscanner.sh and
13
  mta.sh in your rc.d directory.
14
15
  Please: Also have a look at CHANGES.port in your MailScanner 
16
  doc dir (see above).
17
 
18
*************************************************************************

Return to bug 157065