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

(-)Makefile (-27 / +15 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	milter-greylist
8
PORTNAME=	milter-greylist
9
PORTVERSION=	4.0
9
PORTVERSION=	4.0
10
PORTREVISION=	1
10
CATEGORIES=	mail
11
CATEGORIES=	mail
11
MASTER_SITES=	ftp://ftp.espci.fr/pub/milter-greylist/
12
MASTER_SITES=	ftp://ftp.espci.fr/pub/milter-greylist/
12
DISTNAME=	milter-greylist-${PORTVERSION}
13
DISTNAME=	milter-greylist-${PORTVERSION}
Lines 29-38 Link Here
29
# installed port preference over it.
30
# installed port preference over it.
30
##
31
##
31
32
33
.if !defined (NO_INSTALL_MANPAGES)
32
MAN5=		greylist.conf.5
34
MAN5=		greylist.conf.5
33
MAN8=		milter-greylist.8
35
MAN8=		milter-greylist.8
34
36
.endif
35
.include <bsd.port.pre.mk>
36
37
37
.if !defined(WITH_SENDMAIL_BASE) && \
38
.if !defined(WITH_SENDMAIL_BASE) && \
38
    !defined(WITH_SENDMAIL_PORT) && \
39
    !defined(WITH_SENDMAIL_PORT) && \
Lines 45-51 Link Here
45
_MILT_DEP=
46
_MILT_DEP=
46
MILTERBASE=	/usr
47
MILTERBASE=	/usr
47
.else
48
.else
48
BROKEN=		"Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes"
49
BROKEN=		Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes
49
.endif
50
.endif
50
.else
51
.else
51
_MILT_DEP=	${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
52
_MILT_DEP=	${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
Lines 56-78 Link Here
56
# If you have a reentrant resolver (starting with RELENG_5_2) you can use SPF
57
# If you have a reentrant resolver (starting with RELENG_5_2) you can use SPF
57
##
58
##
58
.if defined(WITH_LIBSPF2)
59
.if defined(WITH_LIBSPF2)
59
.if ${OSVERSION} < 502102
60
IGNORE=		Using libspf2 requires a thread safe resolver
61
.else
62
BUILD_DEPENDS+=	libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
60
BUILD_DEPENDS+=	libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
63
CONFIGURE_ARGS+= 	--with-libspf2=${LOCALBASE}
61
CONFIGURE_ARGS+=	--with-libspf2=${LOCALBASE}
64
.endif
65
.endif
62
.endif
66
.if defined(WITH_GEOIP)
63
.if defined(WITH_GEOIP)
67
BUILD_DEPENDS+=	GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
64
BUILD_DEPENDS+=	GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
68
CONFIGURE_ARGS+= 	--with-libGeoIP=${LOCALBASE}
65
CONFIGURE_ARGS+=	--with-libGeoIP=${LOCALBASE}
69
.endif
66
.endif
70
.if defined(WITH_CURL)
67
.if defined(WITH_CURL)
71
BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl
68
BUILD_DEPENDS+=	curl>=7.18:${PORTSDIR}/ftp/curl
72
CONFIGURE_ARGS+=	--with-curl=${LOCALBASE}
69
CONFIGURE_ARGS+=	--with-curl=${LOCALBASE}
73
.endif
70
.endif
74
RUN_DEPENDS+=	${BUILD_DEPENDS}
71
RUN_DEPENDS+=	${BUILD_DEPENDS}
75
BUILD_DEPENDS+= ${_MILT_DEP}
72
BUILD_DEPENDS+=	${_MILT_DEP}
76
73
77
CFLAGS+=	${PTHREAD_CFLAGS}
74
CFLAGS+=	${PTHREAD_CFLAGS}
78
LIBS+=		${PTHREAD_LIBS}
75
LIBS+=		${PTHREAD_LIBS}
Lines 80-118 Link Here
80
GNU_CONFIGURE=	yes
77
GNU_CONFIGURE=	yes
81
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
78
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
82
CONFIGURE_ARGS+=	--with-user=mailnull --with-libmilter=${MILTERBASE}
79
CONFIGURE_ARGS+=	--with-user=mailnull --with-libmilter=${MILTERBASE}
83
.if ${OSVERSION} >= 502102
84
CONFIGURE_ARGS+=	--enable-dnsrbl --with-thread-safe-resolver
85
.endif
86
CONFIGURE_ENV+=	CFLAGS="${CFLAGS}" LIBS="${LIBS} "
80
CONFIGURE_ENV+=	CFLAGS="${CFLAGS}" LIBS="${LIBS} "
87
81
88
ALL_TARGET=	milter-greylist
82
ALL_TARGET=	milter-greylist
83
SUB_FILES+=	pkg-message
89
84
90
USE_RC_SUBR=	yes
85
USE_RC_SUBR=	milter-greylist
91
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
92
93
post-extract:
94
	@${SED}	${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
95
		${FILESDIR}/milter-greylist.sh > ${WRKSRC}/milter-greylist.sh
96
86
97
do-install:
87
do-install:
98
	@${MKDIR} ${PREFIX}/etc/mail
88
	@${MKDIR} ${PREFIX}/etc/mail
99
	@${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec
100
	@${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${PREFIX}/man/man5
89
	@${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${PREFIX}/man/man5
101
	@${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${PREFIX}/man/man8
90
	@${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${PREFIX}/man/man8
91
	@${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec
102
	@${INSTALL_DATA} ${WRKSRC}/greylist.conf \
92
	@${INSTALL_DATA} ${WRKSRC}/greylist.conf \
103
			${PREFIX}/etc/mail/greylist.conf.sample
93
			${PREFIX}/etc/mail/greylist.conf.sample
104
	@${INSTALL_SCRIPT} ${WRKSRC}/milter-greylist.sh ${PREFIX}/etc/rc.d/
105
	@${SED} -e "s,%%DOCSDIR%%,${DOCSDIR},g" \
106
		-e "s,%%PREFIX%%,${PREFIX},g" \
107
		${.CURDIR}/pkg-message > ${PKGMESSAGE}
108
94
109
post-install:
95
post-install:
110
	@${MKDIR} /var/milter-greylist
96
	@${MKDIR} /var/milter-greylist
111
	@${CHOWN} -R mailnull /var/milter-greylist
97
	@${CHOWN} -R mailnull /var/milter-greylist
112
.if !defined(NOPORTDOCS)
98
.if !defined(NOPORTDOCS)
113
	@${MKDIR} ${DOCSDIR}
99
	@${MKDIR} ${DOCSDIR}
114
	@${MKDIR} ${EXAMPLESDIR}
115
	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
100
	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
101
.endif
102
.if !defined (NOPORTEXAMPLES)
103
	@${MKDIR} ${EXAMPLESDIR}
116
	@${INSTALL_DATA} ${WRKSRC}/greylist.conf ${EXAMPLESDIR}
104
	@${INSTALL_DATA} ${WRKSRC}/greylist.conf ${EXAMPLESDIR}
117
.endif
105
.endif
118
	@${TEST} -f /var/db/milter-greylist/greylist.db && ( \
106
	@${TEST} -f /var/db/milter-greylist/greylist.db && ( \
Lines 131-134 Link Here
131
	) || ${TRUE}
119
	) || ${TRUE}
132
	@${CAT} ${PKGMESSAGE}
120
	@${CAT} ${PKGMESSAGE}
133
121
134
.include <bsd.port.post.mk>
122
.include <bsd.port.mk>
(-)pkg-message (-20 lines)
Removed Link Here
1
===> IMPORTANT NOTE
2
3
    A sample configuration file has been installed in %%PREFIX%%/etc/mail
4
    directory. Copy and edit it to suit your needs before launching
5
    milter-greylist.
6
7
    Add following lines
8
9
dnl j,{if_addr},{cert_subject},i,{auth_authen} are already enabled by default
10
define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO``, {verify}'')
11
define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {greylist}'')
12
INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock, F=T, T=R:30s')
13
14
    to your /etc/mail/<your_host>.mc configuration.
15
16
    To run milter-greylist from startup, add miltergreylist_enable="YES"
17
    in your /etc/rc.conf or your /etc/rc.conf.local
18
19
    See %%DOCSDIR%%/README for operation details.
20
(-)pkg-plist (-4 / +3 lines)
Lines 1-12 Link Here
1
libexec/milter-greylist
1
libexec/milter-greylist
2
etc/mail/greylist.conf.sample
2
etc/mail/greylist.conf.sample
3
etc/rc.d/milter-greylist.sh
4
%%PORTDOCS%%%%DOCSDIR%%/README
3
%%PORTDOCS%%%%DOCSDIR%%/README
5
%%PORTDOCS%%%%EXAMPLESDIR%%/greylist.conf
4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/greylist.conf
6
@exec /bin/mkdir -p /var/milter-greylist
5
@exec /bin/mkdir -p /var/milter-greylist
7
@exec /usr/sbin/chown -R mailnull /var/milter-greylist
6
@exec /usr/sbin/chown -R mailnull /var/milter-greylist
8
@exec [ -f /var/db/milter-greylist/greylist.db ] && printf '\n\n************************************************************\n************************************************************\n**                                                        **\n**                        WARNING                         **\n**                                                        **\n** The default dump file location has changed.            **\n** Please move greylist.db from /var/db/milter-greylist/  **\n** to /var/milter-greylist/ and update your greylist.conf **\n** accordingly.                                           **\n**                                                        **\n************************************************************\n************************************************************\n' ||true
7
@exec [ -f /var/db/milter-greylist/greylist.db ] && printf '\n\n************************************************************\n************************************************************\n**                                                        **\n**                        WARNING                         **\n**                                                        **\n** The default dump file location has changed.            **\n** Please move greylist.db from /var/db/milter-greylist/  **\n** to /var/milter-greylist/ and update your greylist.conf **\n** accordingly.                                           **\n**                                                        **\n************************************************************\n************************************************************\n' ||true
9
%%PORTDOCS%%@dirrm %%DOCSDIR%%
8
%%PORTDOCS%%@dirrm %%DOCSDIR%%
10
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
9
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
11
@unexec /bin/rmdir %D/etc/mail 2>/dev/null || true
10
@dirrmtry etc/mail
12
@unexec [ -f /var/milter-greylist/greylist.db ] || /bin/rmdir /var/milter-greylist || true
11
@unexec [ -f /var/milter-greylist/greylist.db ] || /bin/rmdir /var/milter-greylist || true
(-)files/milter-greylist.in (+34 lines)
Added Link Here
1
#!/bin/sh
2
# $FreeBSD: ports/mail/milter-greylist/files/milter-greylist.sh,v 1.4 2006/12/10 05:10:38 ache Exp $
3
4
# PROVIDE: miltergreylist
5
# REQUIRE: LOGIN
6
# BEFORE: sendmail
7
# KEYWORD: milter-greylist
8
9
# Define these miltergreylist_* variables in one of these files:
10
#       /etc/rc.conf
11
#       /etc/rc.conf.local
12
#       /etc/rc.conf.d/miltergreylist
13
#
14
# DO NOT CHANGE THESE DEFAULT VALUES HERE
15
#
16
17
. %%RC_SUBR%%
18
19
name="miltergreylist"
20
rcvar=`set_rcvar`
21
22
command="%%PREFIX%%/libexec/milter-greylist"
23
24
load_rc_config $name
25
26
miltergreylist_enable=${miltergreylist_enable-"NO"}
27
miltergreylist_runas=${miltergreylist_runas-"mailnull"}
28
miltergreylist_pidfile=${miltergreylist_pidfile-"/var/run/milter-greylist.pid"}
29
miltergreylist_sockfile=${miltergreylist_sockfile-"/var/milter-greylist/milter-greylist.sock"}
30
miltergreylist_cfgfile=${miltergreylist_cfgfile-"%%PREFIX%%/etc/mail/greylist.conf"}
31
miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \
32
-f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"}
33
34
run_rc_command "$1"
(-)files/milter-greylist.sh (-34 lines)
Removed Link Here
1
#!/bin/sh
2
# $FreeBSD: ports/mail/milter-greylist/files/milter-greylist.sh,v 1.4 2006/12/10 05:10:38 ache Exp $
3
4
# PROVIDE: miltergreylist
5
# REQUIRE: LOGIN
6
# BEFORE: sendmail
7
# KEYWORD: milter-greylist
8
9
# Define these miltergreylist_* variables in one of these files:
10
#       /etc/rc.conf
11
#       /etc/rc.conf.local
12
#       /etc/rc.conf.d/miltergreylist
13
#
14
# DO NOT CHANGE THESE DEFAULT VALUES HERE
15
#
16
17
. %%RC_SUBR%%
18
19
name="miltergreylist"
20
rcvar=`set_rcvar`
21
22
load_rc_config $name
23
24
miltergreylist_enable=${miltergreylist_enable-"NO"}
25
miltergreylist_runas=${miltergreylist_runas-"mailnull"}
26
miltergreylist_pidfile=${miltergreylist_pidfile-"/var/run/milter-greylist.pid"}
27
miltergreylist_sockfile=${miltergreylist_sockfile-"/var/milter-greylist/milter-greylist.sock"}
28
miltergreylist_cfgfile=${miltergreylist_cfgfile-"%%PREFIX%%/etc/mail/greylist.conf"}
29
miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \
30
-f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"}
31
32
command="%%PREFIX%%/libexec/milter-greylist"
33
34
run_rc_command "$1"
(-)files/pkg-message.in (+20 lines)
Added Link Here
1
===> IMPORTANT NOTE
2
3
    A sample configuration file has been installed in %%PREFIX%%/etc/mail
4
    directory. Copy and edit it to suit your needs before launching
5
    milter-greylist.
6
7
    Add following lines
8
9
dnl j,{if_addr},{cert_subject},i,{auth_authen} are already enabled by default
10
define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO``, {verify}'')
11
define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {greylist}'')
12
INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock, F=T, T=R:30s')
13
14
    to your /etc/mail/<your_host>.mc configuration.
15
16
    To run milter-greylist from startup, add miltergreylist_enable="YES"
17
    in your /etc/rc.conf or your /etc/rc.conf.local
18
19
    See %%DOCSDIR%%/README for operation details.
20

Return to bug 125653