blob: 18274943d1257ea3f3aa8b10cde4962e0135d026 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
# New ports collection makefile for: qmail-spamcontrol
# Date created: 2005-02-01
# Whom: Renato Botelho <renato@galle.com.br>
#
# $FreeBSD$
#
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
CATEGORIES= mail
MASTER_SITES+= http://www.fehcom.de/qmail/spamcontrol/:spamcontrol
PKGNAMESUFFIX= -spamcontrol
DISTFILES= ${QMAIL_DIST} ${SPAMCONTROL_DIST}:spamcontrol
EXTRACT_ONLY= ${QMAIL_DIST}
MAINTAINER= renato@galle.com.br
COMMENT= Qmail MTA with SpamControl patches
# Distfiles
QMAIL_DIST= ${PORTNAME}-${QMAIL_VERSION}${EXTRACT_SUFX}
SPAMCONTROL_DIST= spamcontrol-${SPAMCONTROL_VERSION}_tgz.bin
SPAMCONTROL_VERSION= 2312
PREFIX?= ${QMAIL_PORT_PREFIX}
LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
OPTIONS= RELAYMAILFROM "Open relay based on mailfrom" off \
QUITASAP "Close session in case of a filter condition" off \
REQBRACKETS "Require brackets in <addresses>" on \
VERP "VERP addresses for recipients" on \
RECIPIENTS550 "Get a 550 reply instead of a deferred bounce" off \
LOCALMFREQAUTH "Require auth when from is @ your domains" off \
AUTHCRAM "Aditional CRAM-MD5 support" off \
MOREIPME "Additional control files moreipme & notipme" off \
BIGTODO "Bruce Guenter's BigToDo patch" off
.if !defined(PRE_MK_INCLUDED)
.include <bsd.port.pre.mk>
.endif
# Using default from master port, i.e., /var/qmail
QMAIL_PORT= ${PORTSDIR}/mail/qmail
QMAIL_PORT_PREFIX!= cd ${QMAIL_PORT} && ${MAKE} -V PREFIX
MASTERDIR= ${QMAIL_PORT}
# Block some patches because SpamControl contain the same patches inside
MAIN_QMAIL_PORT_BUILD_WITH_OPTIONS_ADVERTISE_BARRIER= yes
MAIN_QMAIL_PORT_DNS_PATCH_BARRIER= yes
MAIN_QMAIL_PORT_SENDMAIL_F_PATCH_BARRIER= yes
MAIN_QMAIL_PORT_WITH_BIG_CONCURRENCY_PATCH_BARRIER= yes
MAIN_QMAIL_PORT_WITH_BIG_TODO_PATCH_BARRIER= yes
MAIN_QMAIL_PORT_WITH_OUTGOINGIP_PATCH_BARRIER= yes
MAIN_QMAIL_PORT_WITH_QMAILQUEUE_PATCH_BARRIER= yes
ALL_TARGET+= ${EXTRA_MAN8}
# Local overrides
DESCR= ${.CURDIR}/pkg-descr
PLIST= ${.CURDIR}/pkg-plist
MD5_FILE= ${.CURDIR}/distinfo
EXTRA_MAN8= qmail-badloadertypes.8 qmail-badmimetypes.8 qmail-recipients.8
MAN8+= ${EXTRA_MAN8}
DOCFILES+= ${WRKDIR}/doc/FILES.spamcontrol ${WRKDIR}/doc/HISTORY.spamcontrol \
${WRKDIR}/doc/INSTALL.spamcontrol ${WRKDIR}/doc/LICENSE.spamcontrol \
${WRKDIR}/doc/LOGGING.spamcontrol ${WRKDIR}/doc/Makefile.djbdns \
${WRKDIR}/doc/README.auth ${WRKDIR}/doc/README.bigtodo \
${WRKDIR}/doc/README.bouncemaxbytes ${WRKDIR}/doc/README.djbdns \
${WRKDIR}/doc/README.doublebouncetrim ${WRKDIR}/doc/README.moreipme \
${WRKDIR}/doc/README.qmailqueue ${WRKDIR}/doc/README.recipients \
${WRKDIR}/doc/README.spamcontrol ${WRKDIR}/doc/README.wildmat \
${WRKDIR}/doc/README_spamcontrol.html \
${WRKDIR}/doc/RELEASE_22.spamcontrol \
${WRKDIR}/doc/RELEASE_23.spamcontrol \
${WRKDIR}/doc/SMTPREPLY.spamcontrol ${WRKDIR}/doc/TESTING.spamcontrol \
${WRKDIR}/doc/TODO.spamcontrol ${WRKDIR}/doc/badloadertypes \
${WRKDIR}/doc/badmailfrom ${WRKDIR}/doc/badmimetypes \
${WRKDIR}/doc/badrcptto ${WRKDIR}/doc/conf-spamcontrol \
${WRKDIR}/doc/install_spamcontrol.sh ${WRKDIR}/doc/tarpitcount
SCRIPTS= qmail-alias2recipients qmail-pwd2recipients \
qmail-users2recipients qmail-vpopmail2recipients
# Fill SELECTED_OPTIONS with options to write conf-spamcontrol
.if defined(WITH_RELAYMAILFROM)
SELECTED_OPTIONS+= relaymailfrom=yes
.else
SELECTED_OPTIONS+= relaymailfrom=no
.endif
.if defined(WITH_QUITASAP)
SELECTED_OPTIONS+= quitasap=yes
.else
SELECTED_OPTIONS+= quitasap=no
.endif
.if !defined(WITHOUT_REQBRACKETS)
SELECTED_OPTIONS+= reqbrackets=yes
.else
SELECTED_OPTIONS+= reqbrackets=no
.endif
.if !defined(WITHOUT_VERP)
SELECTED_OPTIONS+= verp=yes
.else
SELECTED_OPTIONS+= verp=no
.endif
.if defined(WITH_RECIPIENTS550)
SELECTED_OPTIONS+= recipients550=yes
.else
SELECTED_OPTIONS+= recipients550=no
.endif
.if defined(WITH_LOCALMFREQAUTH)
SELECTED_OPTIONS+= localmfreqauth=yes
.else
SELECTED_OPTIONS+= localmfreqauth=no
.endif
.if defined(WITH_AUTHCRAM)
SELECTED_OPTIONS+= authcram=yes
.else
SELECTED_OPTIONS+= authcram=no
.endif
.if defined(WITH_MOREIPME)
SELECTED_OPTIONS+= moreipme=yes
.else
SELECTED_OPTIONS+= moreipme=no
.endif
.if defined(WITH_BIGTODO)
SELECTED_OPTIONS+= bigtodo=yes
.else
SELECTED_OPTIONS+= bigtodo=no
.endif
post-extract:
@cd ${WRKSRC} && ${TAR} -xzf ${DISTDIR}/${SPAMCONTROL_DIST}
slaveport-post-patch:
@cd ${WRKSRC} && \
${PATCH} -s < ${.CURDIR}/files/patch-qmail-smtpd.c.patch
pre-configure:
@${ECHO_CMD} ${WRKDIR} > ${WRKSRC}/conf-qmail
@${ECHO_CMD} "# Generated by qmail-spamcontrol FreeBSD port" \
> ${WRKSRC}/conf-spamcontrol
.for option in ${SELECTED_OPTIONS}
@${ECHO_CMD} ${option} >> ${WRKSRC}/conf-spamcontrol
.endfor
@cd ${WRKSRC} && ./install_spamcontrol.sh
post-install:
@${MKDIR} ${PREFIX}/scripts
.for script in ${SCRIPTS}
@${INSTALL_SCRIPT} ${WRKDIR}/scripts/${script} ${PREFIX}/scripts
.endfor
.include "${MASTERDIR}/Makefile"
|