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

Collapse All | Expand All

(-)Makefile (-19 / +40 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	maia
8
PORTNAME=	maia
9
DISTVERSION=	1.0.3-${SVNREVISION}
9
DISTVERSION=	1.0.3-${SVNREVISION}
10
PORTREVISION=	1
10
CATEGORIES=	security
11
CATEGORIES=	security
11
MASTER_SITES=	http://www.purplehat.org/downloads/maia/
12
MASTER_SITES=	http://www.purplehat.org/downloads/maia/
12
13
Lines 18-23 Link Here
18
		p5-Convert-TNEF>=0.08:${PORTSDIR}/converters/p5-Convert-TNEF \
19
		p5-Convert-TNEF>=0.08:${PORTSDIR}/converters/p5-Convert-TNEF \
19
		p5-Convert-UUlib>=1.08,1:${PORTSDIR}/converters/p5-Convert-UUlib \
20
		p5-Convert-UUlib>=1.08,1:${PORTSDIR}/converters/p5-Convert-UUlib \
20
		p5-Net-CIDR-Lite>=0.18:${PORTSDIR}/net/p5-Net-CIDR-Lite \
21
		p5-Net-CIDR-Lite>=0.18:${PORTSDIR}/net/p5-Net-CIDR-Lite \
22
		p5-forks>=0.34:${PORTSDIR}/devel/p5-forks \
21
		p5-Archive-Zip>=0.10:${PORTSDIR}/archivers/p5-Archive-Zip \
23
		p5-Archive-Zip>=0.10:${PORTSDIR}/archivers/p5-Archive-Zip \
22
		p5-IO-stringy>=1.203:${PORTSDIR}/devel/p5-IO-stringy \
24
		p5-IO-stringy>=1.203:${PORTSDIR}/devel/p5-IO-stringy \
23
		p5-IO-Socket-INET6>=1.27:${PORTSDIR}/net/p5-IO-Socket-INET6 \
25
		p5-IO-Socket-INET6>=1.27:${PORTSDIR}/net/p5-IO-Socket-INET6 \
Lines 59-65 Link Here
59
		CRYPT	"Encryption support"	off \
61
		CRYPT	"Encryption support"	off \
60
		IPCOUNTRY	"SpamAssassin IP Country plugin"	on \
62
		IPCOUNTRY	"SpamAssassin IP Country plugin"	on \
61
		DOMAINKEYS	"SpamAssassin DomainKey plugin"	on \
63
		DOMAINKEYS	"SpamAssassin DomainKey plugin"	on \
62
		SPFQUERY	"SpamAssassin SPF Query plugin"	on \
64
		SPF	"SpamAssassin SPF plugin"	on \
65
		DKIM	"SpamAssassin DKIM plugin"	on \
63
		FILE	"Use newer file(1) utility from ports"	on \
66
		FILE	"Use newer file(1) utility from ports"	on \
64
		RAR	"RAR support with archivers/rar"	off \
67
		RAR	"RAR support with archivers/rar"	off \
65
		UNRAR	"RAR support with archivers/unrar"	on \
68
		UNRAR	"RAR support with archivers/unrar"	on \
Lines 197-206 Link Here
197
RUN_DEPENDS+=	${SITE_PERL}/Mail/DomainKeys.pm:${PORTSDIR}/mail/p5-Mail-DomainKeys
200
RUN_DEPENDS+=	${SITE_PERL}/Mail/DomainKeys.pm:${PORTSDIR}/mail/p5-Mail-DomainKeys
198
.endif
201
.endif
199
202
200
.if defined(WITH_SPFQUERY)
203
.if defined(WITH_SPF)
201
RUN_DEPENDS+=	${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF
204
RUN_DEPENDS+=	${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF
202
.endif
205
.endif
203
206
207
.if defined(WITH_DKIM)
208
RUN_DEPENDS+=	${SITE_PERL}/Mail/DKIM.pm:${PORTSDIR}/mail/p5-Mail-DKIM
209
.endif
210
204
.if defined(WITH_FILE)
211
.if defined(WITH_FILE)
205
# security fix, file > 4.21 needed
212
# security fix, file > 4.21 needed
206
RUN_DEPENDS+=	file>=4.21:${PORTSDIR}/sysutils/file
213
RUN_DEPENDS+=	file>=4.21:${PORTSDIR}/sysutils/file
Lines 272-300 Link Here
272
.endif
279
.endif
273
280
274
post-patch:
281
post-patch:
275
.for f in maiad.conf.dist maiad
282
.for m in scripts/configtest.pl scripts/expire-quarantine-cache.pl \
276
	@${REINPLACE_CMD} "s@'zoo'\]@['zoo','unzoo'] ]@" ${WRKSRC}/${f}
283
	scripts/generate-key.pl scripts/load-sa-rules.pl scripts/maiadbtool.pl \
284
	scripts/process-quarantine.pl scripts/resend.pl scripts/send-quarantine-digests.pl \
285
	scripts/send-quarantine-reminders.pl scripts/stats-snapshot.pl
286
		@${REINPLACE_CMD} -e "s|/etc/maia/maia.conf|${PREFIX}/etc/maia.conf|" \
287
			${WRKSRC}/${m}
288
277
.endfor
289
.endfor
278
.for i in maiad.conf.dist maiad
290
.for a in maiad.conf.dist
279
	@${REINPLACE_CMD} -e "s|$daemon_user  = \'amavis\';|$daemon_user  = \'${USERS}\';|" \
291
	@${REINPLACE_CMD} -e "s|daemon_user  = 'maia'|daemon_user  = '${USERS}'|" \
280
	    -e "s|$daemon_group = \'amavis\';|$daemon_group = \'${GROUPS}\';|" \
292
		-e "s|daemon_group = 'maia'|daemon_group = '${GROUPS}'|" \
281
	    -e 's|$$log_level = 0;|$$log_level = 1;|' \
293
		-e "s|/var/lib/maia|${MAIADIR}|" \
282
	    -e 's|/etc/maiad.conf|${PREFIX}/etc/maiad.conf|' \
294
		-e "s|/var/log/maia|${MAIADIR}|" ${WRKSRC}/${a}
283
	    -e "s|/var/virusmails|${MAIAQUARANTINE}|" ${WRKSRC}/${i}
284
.endfor
295
.endfor
285
.for f in maiad maiad.conf.dist maia.conf.dist scripts/send-quarantine-digests.pl \
296
.for i in maia.conf.dist
286
	scripts/process-quarantine.pl scripts/load-sa-rules.pl
297
	@${REINPLACE_CMD} -e "s|/etc/maia.conf|${PREFIX}/etc/maia.conf|" \
287
		@${REINPLACE_CMD} "s|/var/maiad|${MAIADIR}|" ${WRKSRC}/${f}
298
		-e "s|username = 'maia'|username = '${USERS}'|" \
299
		-e "s|/var/lib/maia|${MAIADIR}/maia|" \
300
		-e "s|/usr/bin/sa-learn|/usr/local/bin/sa-learn|" \
301
		-e "s|local_cf_dir = undef|local_cf_dir = '${PREFIX}/etc/mail/spamassassin'|" \
302
		-e "s|system_rules_dir = undef|system_rules_dir = '/var/db/spamassassin'|" \
303
		-e "s|user_rules_dir = undef|user_rules_dir = '${MAIADIR}/.spamassassin'|" \
304
		-e "s|pid_dir = '/var/run/maia/'|pid_dir = '${MAIADIR}/'|" \
305
		-e "s|log_dir = '/var/log/maia'|log_dir = '${MAIADIR}'|" \
306
		-e "s|template_dir = '/etc/maia/templates/'|template_dir = '${MAIADIR}/maia/templates/'|" \
307
			${WRKSRC}/${i}
288
.endfor
308
.endfor
289
.for i in maia.conf.dist scripts/expire-quarantine-cache.pl scripts/stats-snapshot.pl \
309
.for a in maiad
290
	scripts/maiadbtool.pl scripts/configtest.pl scripts/send-quarantine-reminders.pl \
310
	@${REINPLACE_CMD} -e "s|/etc/maia/maiad.conf|${PREFIX}/etc/maiad.conf|" \
291
	scripts/send-quarantine-digests.pl scripts/process-quarantine.pl \
311
		-e "s|/var/lib/maia|${MAIADIR}|" \
292
	scripts/load-sa-rules.pl
312
		-e "s@'zoo'\]@['zoo','unzoo'] ]@" ${WRKSRC}/${a}
293
		@${REINPLACE_CMD} "s|/etc/maia.conf|${PREFIX}/etc/maia.conf|" ${WRKSRC}/${i}
294
.endfor
313
.endfor
314
#	@${FIND} -E ${WRKSRC} -iregex '.*(bak|~)$$' -delete
295
315
296
pre-install:
316
pre-install:
297
	@${FIND} -E ${WRKSRC} -iregex '.*(bak|~)$$' -delete
298
	@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
317
	@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
299
318
300
do-install:
319
do-install:
Lines 330-335 Link Here
330
		${CP} -p ${PREFIX}/etc/${maiaconf}.conf.dist \
349
		${CP} -p ${PREFIX}/etc/${maiaconf}.conf.dist \
331
		${PREFIX}/etc/${maiaconf}.conf ; \
350
		${PREFIX}/etc/${maiaconf}.conf ; \
332
	fi
351
	fi
352
	@${CHOWN} ${USERS}:${GROUPS} ${PREFIX}/etc/${maiaconf}.conf \
353
		${PREFIX}/etc/${maiaconf}.conf.dist
333
.endfor
354
.endfor
334
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
355
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
335
	@${CHOWN} -R ${USERS}:${GROUPS} ${MAIADIR}/
356
	@${CHOWN} -R ${USERS}:${GROUPS} ${MAIADIR}/
(-)pkg-plist (+1 lines)
Lines 4-9 Link Here
4
@unexec if cmp -s %D/etc/maia.conf.dist %D/etc/maia.conf; then rm -f %D/etc/maia.conf; fi
4
@unexec if cmp -s %D/etc/maia.conf.dist %D/etc/maia.conf; then rm -f %D/etc/maia.conf; fi
5
etc/maia.conf.dist
5
etc/maia.conf.dist
6
@exec if [ ! -f %D/etc/maia.conf ] ; then cp -p %D/%F %B/maia.conf; fi
6
@exec if [ ! -f %D/etc/maia.conf ] ; then cp -p %D/%F %B/maia.conf; fi
7
etc/rc.d/maiad
7
sbin/maiad
8
sbin/maiad
8
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
9
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
9
%%PORTDOCS%%%%DOCSDIR%%/README
10
%%PORTDOCS%%%%DOCSDIR%%/README
(-)files/pkg-deinstall.in (-2 lines)
Lines 8-18 Link Here
8
MAIAWEB=%%PREFIX%%/www/maia
8
MAIAWEB=%%PREFIX%%/www/maia
9
9
10
if [ "$2" = "POST-DEINSTALL" ]; then
10
if [ "$2" = "POST-DEINSTALL" ]; then
11
12
    if [ -e ${DIR} ]; then
11
    if [ -e ${DIR} ]; then
13
	echo "You should manually remove the \"${DIR}\" directory."
12
	echo "You should manually remove the \"${DIR}\" directory."
14
    fi
13
    fi
15
    
16
    if [ -e ${QUARANTINE} ]; then
14
    if [ -e ${QUARANTINE} ]; then
17
      echo "You should manually remove the \"${QUARANTINE}\" directory."
15
      echo "You should manually remove the \"${QUARANTINE}\" directory."
18
    fi
16
    fi
(-)files/pkg-install.in (-1 lines)
Lines 9-15 Link Here
9
QUARANTINE=%%MAIAQUARANTINE%%
9
QUARANTINE=%%MAIAQUARANTINE%%
10
10
11
if [ "$2" = "PRE-INSTALL" ]; then
11
if [ "$2" = "PRE-INSTALL" ]; then
12
13
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}
12
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}
14
    echo "Created \"${DIR}\" directory."
13
    echo "Created \"${DIR}\" directory."
15
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/db
14
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/db
(-)files/pkg-message.in (-8 / +15 lines)
Lines 1-11 Link Here
1
To use Maia-Mailguard, you need to install at least one virus scanner.
2
The following virus scanners are available in the FreeBSD ports
3
collection:
4
1
5
   security/clamav	Clam Antivirus
2
*******************************************************************
6
   security/f-prot	F-Prot Antivirus
3
 To use Maia-Mailguard, you need to install at least one virus scanner.
7
   security/drweb	DrWeb antivirus suite
4
 The following virus scanners are available in the FreeBSD ports
5
 collection:
6
 
7
    security/clamav	Clam Antivirus
8
    security/f-prot	F-Prot Antivirus
9
    security/drweb	DrWeb antivirus suite
8
10
9
Enable Maia-Mailguard in /etc/rc.conf with the following line:
11
 Enable Maia-Mailguard in /etc/rc.conf with the following line:
12
13
    maiad_enable="YES"
14
15
 Configuration templates are available in %%PREFIX%%/etc
16
 as maia.conf.dist and maiad.conf.dist.
17
*******************************************************************
10
18
11
   maiad_enable="YES"

Return to bug 160379