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

(-)mail/exim/Makefile (-10 / +44 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	exim
8
PORTNAME=	exim
9
PORTVERSION=	4.22
9
PORTVERSION=	4.22
10
PORTREVISION=	3
10
PORTREVISION=	4
11
CATEGORIES=	mail
11
CATEGORIES=	mail
12
MASTER_SITES=	${MASTER_SITE_EXIM}
12
MASTER_SITES=	${MASTER_SITE_EXIM}
13
MASTER_SITE_SUBDIR=	exim4
13
MASTER_SITE_SUBDIR=	exim4
Lines 29-40 Link Here
29
USE_PERL5=	yes
29
USE_PERL5=	yes
30
MAN8=		exim.8
30
MAN8=		exim.8
31
31
32
DAILY_SCRIPTS=	150.exim-tidydb 460.exim-mail-rejects
33
32
EXISCAN_ACL_VERSION=	${PORTVERSION}-12
34
EXISCAN_ACL_VERSION=	${PORTVERSION}-12
33
35
34
PLIST_SUB+=	EXIM_VERSION="${PORTVERSION}"
36
PLIST_SUB+=	EXIM_VERSION="${PORTVERSION}"
35
37
36
.if defined(NOPORTDOCS)
38
.if defined(NOPORTDOCS)
37
PKGMESSAGE=	${WRKDIR}/POST-INSTALL-NOTES
39
PKGMESSAGE=	${WRKDIR}/POST-INSTALL-NOTES
40
.else
41
PKGMESSAGE=	${WRKDIR}/pkg-message
38
.endif
42
.endif
39
43
40
MAKE_ENV+=	OSTYPE=${OPSYS} ARCHTYPE=${MACHINE_ARCH} LOCALBASE=${LOCALBASE}
44
MAKE_ENV+=	OSTYPE=${OPSYS} ARCHTYPE=${MACHINE_ARCH} LOCALBASE=${LOCALBASE}
Lines 135-140 Link Here
135
139
136
.include <bsd.port.pre.mk>
140
.include <bsd.port.pre.mk>
137
141
142
.if ${OSVERSION} >= 500038
143
RC_SUBR?=	${DESTDIR}/etc/rc.subr
144
RC_DIR=		${DESTDIR}/etc/rc.d
145
RC_SUFX=
146
.else
147
USE_RC_SUBR=	yes
148
RC_DIR=		${PREFIX}/etc/rc.d
149
RC_SUFX=	.sh
150
.endif
151
152
SED_SCRIPT=	-e 's,%%PREFIX%%,${PREFIX},g' \
153
		-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
154
		-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
155
		-e 's,%%RC_DIR%%,${RC_DIR},g' \
156
		-e 's,%%RC_SUFX%%,${RC_SUFX},g'
157
158
PLIST_SUB+=	RC_DIR=${RC_DIR} \
159
		RC_SUFX=${RC_SUFX}
160
138
PORTDOC_FILES=	Exim3.upgrade Exim4.upgrade OptionLists.txt README \
161
PORTDOC_FILES=	Exim3.upgrade Exim4.upgrade OptionLists.txt README \
139
		dbm.discuss.txt filter.txt pcrepattern.txt pcretest.txt \
162
		dbm.discuss.txt filter.txt pcrepattern.txt pcretest.txt \
140
		spec.txt
163
		spec.txt
Lines 326-353 Link Here
326
	@${ECHO} ''
349
	@${ECHO} ''
327
.endif
350
.endif
328
351
329
post-patch:
352
do-configure:
353
	${MKDIR} ${WRKSRC}/Local
354
	${SED} ${SEDLIST} ${WRKSRC}/src/EDITME > ${WRKSRC}/Local/Makefile
355
356
post-build:
357
.for script in exim ${DAILY_SCRIPTS}
358
	@${SED} ${SED_SCRIPT} ${FILESDIR}/${script}.sh > ${WRKDIR}/${script}.sh
359
.endfor
330
.if !defined(WITHOUT_EXISCAN)
360
.if !defined(WITHOUT_EXISCAN)
331
	@${CAT} ${FILESDIR}/POST-INSTALL-NOTES.exiscan-acl \
361
	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES.exiscan-acl \
332
	    ${FILESDIR}/POST-INSTALL-NOTES > ${WRKDIR}/POST-INSTALL-NOTES
362
	    ${FILESDIR}/POST-INSTALL-NOTES > ${WRKDIR}/POST-INSTALL-NOTES
363
	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES.clamd > ${WRKDIR}/POST-INSTALL-NOTES.clamd
333
.else
364
.else
334
	@${CAT} ${FILESDIR}/POST-INSTALL-NOTES > ${WRKDIR}/POST-INSTALL-NOTES
365
	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES > ${WRKDIR}/POST-INSTALL-NOTES
335
.endif
366
.endif
336
367
	@${SED} ${SED_SCRIPT} ${MASTERDIR}/pkg-message > ${WRKDIR}/pkg-message
337
do-configure:
338
	${MKDIR} ${WRKSRC}/Local
339
	${SED} ${SEDLIST} < ${WRKSRC}/src/EDITME > ${WRKSRC}/Local/Makefile
340
368
341
pre-install:
369
pre-install:
342
	@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
370
	@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
343
371
344
post-install:
372
post-install:
345
	${INSTALL_SCRIPT} ${FILESDIR}/exim.sh ${PREFIX}/etc/rc.d
373
	@${INSTALL_SCRIPT} ${WRKDIR}/exim.sh ${RC_DIR}/exim${RC_SUFX}
374
	@${MKDIR} ${PREFIX}/etc/periodic/daily
375
.for script in ${DAILY_SCRIPTS}
376
	@${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${PREFIX}/etc/periodic/daily/${script}
377
.endfor
378
	@[ -f ${PREFIX}/etc/exim/configure ] || \
379
		${CP} ${PREFIX}/etc/exim/configure.default ${PREFIX}/etc/exim/configure
346
.if !defined(NOPORTDOCS)
380
.if !defined(NOPORTDOCS)
347
	${MKDIR} ${DOCSDIR}
381
	${MKDIR} ${DOCSDIR}
348
	${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DOCSDIR}
382
	${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DOCSDIR}
349
.if !defined(WITHOUT_EXISCAN)
383
.if !defined(WITHOUT_EXISCAN)
350
	${INSTALL_DATA} ${FILESDIR}/POST-INSTALL-NOTES.clamd ${DOCSDIR}
384
	${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${DOCSDIR}
351
.endif
385
.endif
352
.for docfile in ${PORTDOC_FILES}
386
.for docfile in ${PORTDOC_FILES}
353
	${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DOCSDIR}
387
	${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DOCSDIR}
(-)mail/exim/files/150.exim-tidydb.sh (+34 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# Exim hints database maintenance
6
# 
7
#   contributed by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
8
#
9
10
# If there is a global system configuration file, suck it in.
11
#
12
if [ -r /etc/defaults/periodic.conf ]; then
13
    . /etc/defaults/periodic.conf
14
    source_periodic_confs
15
fi
16
17
exim_tidydb_enable=${exim_tidydb_enable:-"YES"}
18
exim_tidydb=${exim_tidydb:-"/usr/local/sbin/exim_tidydb"}
19
exim_dbdir=${exim_dbdir:-"/var/spool/exim"}
20
21
case "$exim_tidydb_enable" in
22
    [Yy][Ee][Ss])
23
	echo ""
24
	echo "Tidying Exim hints databases:"
25
	for db in "$exim_dbdir"/db/*.lockfile; do
26
	    echo ""
27
	    "$exim_tidydb" "$exim_dbdir" `basename $db .lockfile`
28
	done
29
	rc=1;;
30
31
    *)  rc=0;;
32
esac
33
34
exit $rc
(-)mail/exim/files/460.exim-mail-rejects.sh (+68 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# Check for rejected mail
6
# Log lines that end with ' : IGNORE' will not be reported
7
# 
8
#   contributed by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
9
#
10
11
# If there is a global system configuration file, suck it in.
12
#
13
if [ -r /etc/defaults/periodic.conf ]
14
then
15
    . /etc/defaults/periodic.conf
16
    source_periodic_confs
17
fi
18
19
exim_status_mail_rejects_enable=${exim_status_mail_rejects_enable:-"YES"}
20
exim_status_mail_rejects_logs=${exim_status_mail_rejects_logs:-2}
21
exim_rejectlog=${exim_rejectlog:-"/var/log/exim/rejectlog"}
22
23
case "$exim_status_mail_rejects_enable" in
24
    [Yy][Ee][Ss])
25
	if [ ! -d `dirname "$exim_rejectlog"` ]
26
	then
27
	    echo '$exim_status_mail_rejects_enable is set but' \
28
		"`dirname "$exim_rejectlog"` doesn't exist"
29
	    rc=2
30
	elif [ "$exim_status_mail_rejects_logs" -le 0 ]
31
	then
32
	    echo '$exim_status_mail_rejects_enable is set but' \
33
		'$exim_status_mail_rejects_logs is not greater than zero'
34
	    rc=2
35
	else
36
	    echo
37
	    echo Checking for rejected mail:
38
39
	    start=`date -v-1d '+%Y-%m-%d'`
40
	    n=$(($exim_status_mail_rejects_logs - 2))
41
	    rc=$({
42
		while [ $n -ge 0 ]
43
		do
44
		    if [ -f "$exim_rejectlog.$n" ]
45
		    then
46
			cat "$exim_rejectlog.$n"
47
		    elif [ -f "$exim_rejectlog.$n.gz" ]
48
		    then
49
			zcat -fc "$exim_rejectlog.$n.gz"
50
		    elif [ -f "$exim_rejectlog.$n.bz2" ]
51
		    then
52
			bzcat -fc "$exim_rejectlog.$n.bz2"
53
		    fi
54
		    n=$(($n - 1))
55
		done
56
		if [ -f "$exim_rejectlog" ]
57
		then
58
		    cat "$exim_rejectlog"
59
		fi
60
	    } |
61
		grep -e "^$start" | grep -v ' : IGNORE$' | tee /dev/stderr | wc -l)
62
	    [ $rc -gt 0 ] && rc=1
63
	fi;;
64
65
    *)  rc=0;;
66
esac
67
68
exit $rc
(-)mail/exim/files/POST-INSTALL-NOTES (-5 / +5 lines)
Lines 6-27 Link Here
6
In addition, plain text versions of these documents have been installed
6
In addition, plain text versions of these documents have been installed
7
as:
7
as:
8
8
9
    ${PREFIX}/share/doc/exim/filter.txt
9
    %%DOCSDIR%%/filter.txt
10
    ${PREFIX}/share/doc/exim/spec.txt
10
    %%DOCSDIR%%/spec.txt
11
11
12
Postscript, PDF, HTML and plain text versions of these documents, as well
12
Postscript, PDF, HTML and plain text versions of these documents, as well
13
as a comprehensive FAQ list, are available at http://www.exim.org/ .
13
as a comprehensive FAQ list, are available at http://www.exim.org/ .
14
14
15
To use Exim instead of sendmail on startup:
15
To use Exim instead of sendmail on startup:
16
16
17
*) Create exim/configure from exim/configure.default .
18
*) Clear the sendmail queue and stop the sendmail daemon.
17
*) Clear the sendmail queue and stop the sendmail daemon.
19
*) Adjust mailer.conf(5) as appropriate.
18
*) Adjust mailer.conf(5) as appropriate.
20
*) Set the 'sendmail_enable' rc.conf(5) variable to 'NONE'.
19
*) Set the 'sendmail_enable' rc.conf(5) variable to 'NONE'.
21
*) Set the 'daily_status_include_submit_mailq' and
20
*) Set the 'daily_status_include_submit_mailq' and
22
   'daily_clean_hoststat_enable' periodic.conf(5)
21
   'daily_clean_hoststat_enable' periodic.conf(5)
23
   variables to 'NO'.
22
   variables to 'NO'.
24
*) Start exim with '${PREFIX}/etc/rc.d/exim.sh start'.
23
*) Set the 'exim_enable' rc.conf(5) variable to 'YES'.
24
*) Start exim with '%%RC_DIR%%/exim%%RC_SUFX%% start'.
25
25
26
You may also want to configure newsyslog(8) to rotate Exim log files:
26
You may also want to configure newsyslog(8) to rotate Exim log files:
27
27
Lines 36-41 Link Here
36
Access Control Lists instead of separate options. All this means that
36
Access Control Lists instead of separate options. All this means that
37
pre-4.00 configuration files have to be massively converted. If you
37
pre-4.00 configuration files have to be massively converted. If you
38
are coming from a 3.xx release, please read the document in the file
38
are coming from a 3.xx release, please read the document in the file
39
${PREFIX}/share/doc/exim/Exim4.upgrade, and allow some time to complete
39
%%DOCSDIR%%/Exim4.upgrade, and allow some time to complete
40
the upgrade.
40
the upgrade.
41
41
(-)mail/exim/files/POST-INSTALL-NOTES.clamd (-1 / +1 lines)
Lines 38-44 Link Here
38
38
39
*  Start clamd with /usr/local/etc/rc.d/clamd.sh start .
39
*  Start clamd with /usr/local/etc/rc.d/clamd.sh start .
40
40
41
*  Start Exim with /usr/local/etc/rc.d/exim.sh start .
41
*  Start Exim with %%RC_DIR%%/exim%%RC_SUFX%% start .
42
42
43
Sheldon Hearn <sheldonh@FreeBSD.org>
43
Sheldon Hearn <sheldonh@FreeBSD.org>
44
44
(-)mail/exim/files/POST-INSTALL-NOTES.exiscan-acl (-2 / +2 lines)
Lines 1-11 Link Here
1
This installation of Exim includes Exiscan content scanning support,
1
This installation of Exim includes Exiscan content scanning support,
2
from http://duncanthrax.net/exiscan-acl/, which is documented in
2
from http://duncanthrax.net/exiscan-acl/, which is documented in
3
${PREFIX}/share/doc/exim/exiscan-acl-spec.txt.  The ports tree
3
%%DOCSDIR%%/exiscan-acl-spec.txt.  The ports tree
4
includes various content scanners that might be useful, e.g.
4
includes various content scanners that might be useful, e.g.
5
mail/p5-Mail-SpamAssassin and security/clamav.
5
mail/p5-Mail-SpamAssassin and security/clamav.
6
6
7
Notes for enabling malware scanning with the excellent clamd scanner
7
Notes for enabling malware scanning with the excellent clamd scanner
8
are in ${PREFIX}/share/doc/exim/POST-INSTALL-NOTES.clamd.
8
are in %%DOCSDIR%%/POST-INSTALL-NOTES.clamd.
9
9
10
When Exiscan is actually enabled in the Exim configure file, great
10
When Exiscan is actually enabled in the Exim configure file, great
11
care should be taken to test upgrades, since Exiscan updates tend
11
care should be taken to test upgrades, since Exiscan updates tend
(-)mail/exim/files/exim.sh (-22 / +56 lines)
Lines 2-30 Link Here
2
#
2
#
3
# $FreeBSD: ports/mail/exim/files/exim.sh,v 1.5 2003/06/02 13:17:43 sheldonh Exp $
3
# $FreeBSD: ports/mail/exim/files/exim.sh,v 1.5 2003/06/02 13:17:43 sheldonh Exp $
4
#
4
#
5
# Note that 'pidfile' may need to be changed if 'args' is altered; see
5
6
# the description of the 'pid_file_path' Exim configuration option in
6
# PROVIDE: mail
7
# the Exim Specification.
7
# REQUIRE: LOGIN
8
# KEYWORD: FreeBSD shutdown
9
#	we make mail start late, so that things like .forward's are not
10
#	processed until the system is fully operational
11
12
#
13
# Add the following lines to /etc/rc.conf to enable exim:
8
#
14
#
9
args='-bd -q30m'
15
#exim_enable="YES"
10
pidfile='/var/run/exim.pid'
16
#
17
# See exim(8) for flags
18
#
19
20
. %%RC_SUBR%%
21
22
name=exim
23
rcvar=`set_rcvar`
24
25
command=%%PREFIX%%/sbin/exim
26
pidfile=/var/run/exim.pid
27
required_dirs=/var/log/exim
28
required_files=%%PREFIX%%/etc/exim/configure
29
30
start_precmd=start_precmd
31
stop_postcmd=stop_postcmd
32
33
extra_commands="reload"
34
35
start_precmd()
36
{
37
  case $sendmail_enable in
38
  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
39
    warn "sendmail_enable should be set to NONE"
40
    ;;
41
  [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
42
    case $sendmail_submit_enable in
43
    [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
44
      warn "sendmail_submit_enable should be set to NO"
45
      ;;
46
    esac
47
    ;;
48
  [Nn][Oo][Nn][Ee])
49
    ;;
50
  esac
51
}
52
53
stop_postcmd()
54
{
55
  rm -f $pidfile
56
}
11
57
12
case "$1" in
58
# set defaults
13
start)
14
        [ -x /usr/local/sbin/exim ] && /usr/local/sbin/exim ${args} && \
15
	    echo -n ' exim'
16
        ;;
17
stop)
18
        kill `cat ${pidfile}` && echo -n ' exim'
19
        ;;
20
reload)
21
        kill -HUP `cat ${pidfile}` && echo -n ' exim'
22
        ;;
23
*)
24
        echo "Usage: `basename $0` {start|stop|reload}" >&2
25
        exit 64
26
        ;;
27
esac
28
59
29
exit 0
60
exim_enable=${exim_enable:-"NO"}
61
exim_flags=${exim_flags:-"-bd -q30m"}
30
62
63
load_rc_config $name
64
run_rc_command "$1"
(-)mail/exim/pkg-message (-1 / +3 lines)
Lines 2-7 Link Here
2
IMPORTANT NOTE:
2
IMPORTANT NOTE:
3
===============
3
===============
4
4
5
Please read ${PREFIX}/share/doc/exim/POST-INSTALL-NOTES for important
5
Please read %%DOCSDIR%%/POST-INSTALL-NOTES for important
6
information regarding your Exim installation.
6
information regarding your Exim installation.
7
8
Don't forget to add 'exim_enable="YES"' to rc.conf(5)
7
9
(-)mail/exim/pkg-plist (-3 / +12 lines)
Lines 1-5 Link Here
1
etc/exim/configure.default
1
@comment $FreeBSD$
2
etc/rc.d/exim.sh
2
@unexec [ ! -f /var/run/exim.pid ] || %%RC_DIR%%/exim%%RC_SUFX%% stop || true
3
sbin/exim
3
sbin/exim
4
sbin/exim-%%EXIM_VERSION%%-1
4
sbin/exim-%%EXIM_VERSION%%-1
5
sbin/exim_checkaccess
5
sbin/exim_checkaccess
Lines 28-32 Link Here
28
%%PORTDOCS%%%%EXISCAN_ACL%%%%DOCSDIR%%/POST-INSTALL-NOTES.clamd
28
%%PORTDOCS%%%%EXISCAN_ACL%%%%DOCSDIR%%/POST-INSTALL-NOTES.clamd
29
%%PORTDOCS%%%%EXISCAN_ACL%%%%DOCSDIR%%/exiscan-acl-examples.txt
29
%%PORTDOCS%%%%EXISCAN_ACL%%%%DOCSDIR%%/exiscan-acl-examples.txt
30
%%PORTDOCS%%%%EXISCAN_ACL%%%%DOCSDIR%%/exiscan-acl-spec.txt
30
%%PORTDOCS%%%%EXISCAN_ACL%%%%DOCSDIR%%/exiscan-acl-spec.txt
31
@dirrm etc/exim
32
%%PORTDOCS%%@dirrm %%DOCSDIR%%
31
%%PORTDOCS%%@dirrm %%DOCSDIR%%
32
etc/periodic/daily/150.exim-tidydb
33
etc/periodic/daily/460.exim-mail-rejects
34
@unexec rmdir %D/etc/periodic/daily 2>/dev/null || true
35
@unexec rmdir %D/etc/periodic 2>/dev/null || true
36
@unexec if cmp -s %D/etc/exim/configure %D/etc/exim/configure.default; then rm -f %D/etc/exim/configure; fi
37
etc/exim/configure.default
38
@exec [ -f %B/configure ] || cp %B/%f %B/configure
39
@unexec rmdir %B 2>/dev/null || true
40
@cwd %%RC_DIR%%
41
exim%%RC_SUFX%%

Return to bug 56450