diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2005-11-05 07:00:54 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2005-11-05 07:00:54 +0000 |
commit | 0824679bca51395f37b39d8612a432b4b298c415 (patch) | |
tree | dbcf72bca3e3c451b5829776d53d6dc137581e86 | |
parent | 0fd4b6ae5ff9696c11c01964e119b1462965c63f (diff) | |
download | ports-0824679bca51395f37b39d8612a432b4b298c415.tar.gz ports-0824679bca51395f37b39d8612a432b4b298c415.zip |
Notes
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/smx/Makefile | 183 | ||||
-rw-r--r-- | mail/smx/distinfo | 2 | ||||
-rw-r--r-- | mail/smx/files/batch.patch | 11 | ||||
-rw-r--r-- | mail/smx/files/patch-sm.setup.sh.in | 11 | ||||
-rw-r--r-- | mail/smx/pkg-descr | 24 | ||||
-rw-r--r-- | mail/smx/pkg-plist | 57 |
7 files changed, 289 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index 10c817ab3341..33535d76c410 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -487,6 +487,7 @@ SUBDIR += smtpproxy SUBDIR += smtprc SUBDIR += smtptrapd + SUBDIR += smx SUBDIR += solidpop3d SUBDIR += sortmail SUBDIR += spamass-milter diff --git a/mail/smx/Makefile b/mail/smx/Makefile new file mode 100644 index 000000000000..9d27bfa3ca80 --- /dev/null +++ b/mail/smx/Makefile @@ -0,0 +1,183 @@ +# New ports collection makefile for: sms +# Date created: 04 Nov 2005 +# Whom: dirk.meyer@dinoex.sub.org +# +# $FreeBSD$ +# + +PORTNAME= smx +PORTVERSION= 0.0.0.0 +CATEGORIES= mail ipv6 +MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \ + ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,} +PKGNAMESUFFIX?= ${TLS_SUFFIX}${SASL_SUFFIX}${LDAP_SUFFIX}${BERKELEYDB_SUFFIX}${PMILTER_SUFFIX}${PKGNAMESUFFIX2} +DISTNAME= ${PORTNAME2}-${PORTVERSION} + +MAINTAINER= dinoex@FreeBSD.org +COMMENT= Secure and efficient mail gateway + +PORTNAME2= smX +WRKSRC= ${WRKDIR}/${PORTNAME2}-${PORTVERSION} +USE_REINPLACE= yes +GNU_CONFIGURE= yes +CONFIGURE_TARGET= +CONFIGURE_ARGS+= --disable-dependency-tracking +MAKE_ENV+= SMXCONFDIR="${SMXCONFDIR}" +MAN5= sendmailx.conf.5 +MAN8= createmap.8 mailq.8 mcp.8 milter-spamd.8 qmgr.8 \ + qmgrctl.8 runas.8 sendmailx.8 smar.8 smtpc.8 smtps.8 +MLINKS= sendmailx.conf.5 smx.conf.5 \ + sendmailx.8 sendmailX.8 +PORTDOCS= README.dvi README.html README.pdf README.ps README.txt \ + img1.png img2.png img3.png img4.png img5.png img6.png \ + nx_grp_g.png overview1.eps overview1.gif overview1.pdf \ + prev_g.png up_g.png pmilter.api.tex +PLIST_SUB+= SPOOL=${DESTDIR}/var/spool +PLIST_SUB+= NOLOGIN=${NOLOGIN_CMD} +EXTRA_SBIN= libcheck/noroot libconf/tree libmta/statit \ + libmta/t-hostname checks/t-getgroup + +# Options to define Features: +# SMX_WITHOUT_TLS=yes +# SMX_WITHOUT_SASL=yes +# SMX_WITH_PMILTER=yes +# SMX_WITH_INTERNAL_BERKELEYD=yes +# SMX_WITH_BERKELEYDB_VER=41 +# SMX_WITH_BERKELEYDB_VER=42 +# SMX_WITH_BERKELEYDB_VER=43 + +# default config: +SMXCONFDIR?= ${PREFIX}/etc/smx + +.if defined(SMX_WITH_INTERNAL_BERKELEYD) +BERKELEYDB_SUFFIX= -intbdb +PLIST_SUB+= WITH_BDBINT="" +.else +.if !defined(SMX_WITH_BERKELEYDB_VER) +SMX_WITH_BERKELEYDB_VER=43 +.endif +.if ${SMX_WITH_BERKELEYDB_VER} == "41" +BERKELEYDB_PORT?= databases/db41 +BERKELEYDB_LIB?= db41 +BERKELEYDB_LIBDIR?= ${LOCALBASE}/lib +BERKELEYDB_INCLUDE?= ${LOCALBASE}/include/db41 +.elif ${SMX_WITH_BERKELEYDB_VER} == "42" +BERKELEYDB_PORT?= databases/db42 +BERKELEYDB_LIB?= db-4.2 +BERKELEYDB_LIBDIR?= ${LOCALBASE}/lib/db42 +BERKELEYDB_INCLUDE?= ${LOCALBASE}/include/db42 +.elif ${SMX_WITH_BERKELEYDB_VER} == "43" +BERKELEYDB_PORT?= databases/db43 +BERKELEYDB_LIB?= db-4.3 +BERKELEYDB_LIBDIR?= ${LOCALBASE}/lib/db43 +BERKELEYDB_INCLUDE?= ${LOCALBASE}/include/db43 +.endif +LIB_DEPENDS+= ${BERKELEYDB_LIB}:${PORTSDIR}/${BERKELEYDB_PORT} +CONFIGURE_ARGS+= --disable-included-bdb +CONFIGURE_ARGS+= --with-bdb-incdir=${BERKELEYDB_INCLUDE} +CONFIGURE_ARGS+= --with-bdb-libdir=${BERKELEYDB_LIBDIR} +PLIST_SUB+= WITH_BDBINT="@comment " +.endif + +.if defined(SMX_WITHOUT_SASL) +SASL_SUFFIX?= -nosasl +CONFIGURE_ARGS+= --disable-SASL +.else +LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2 +.if !defined(SMX_WITHOUT_SASLAUTHD) +RUN_DEPENDS+= ${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd +.endif +CONFIGURE_ARGS+= --enable-SASL +CONFIGURE_ARGS+= --with-sasl-incdir=${LOCALBASE}/include +CONFIGURE_ARGS+= --with-sasl-libdir=${LOCALBASE}/lib +.endif + +.if defined(SMX_WITHOUT_TLS) || defined(WITHOUT_TLS) +TLS_SUFFIX?= -notls +CONFIGURE_ARGS+= --disable-TLS +.else +CONFIGURE_ARGS+= --enable-TLS +.endif + +.if defined(SMX_WITH_PMILTER) || defined(WITH_PMILTER) +PMILTER_SUFFIX?= -pmilter +CONFIGURE_ARGS+= --enable-pmilter +USE_OPENSSL= yes +.else +CONFIGURE_ARGS+= --disable-pmilter +.endif + +.if defined(BATCH) +EXTRA_PATCHES+= ${FILESDIR}/batch.patch +.endif + +post-configure: + @${CP} ${WRKSRC}/misc/sm.check.sh ${WRKSRC}/misc/sm.setup.sh \ + ${WRKDIR}/ + @${REINPLACE_CMD} -e 's|/etc/smx|${SMXCONFDIR}|g' \ + -e 's|$${SD}/misc|${PREFIX}/bin|' \ + -e 's|$${SD}/libcheck|${PREFIX}/sbin|' \ + -e 's|$${SD}/libmta|${PREFIX}/sbin|' \ + -e 's|$${SD}/checks|${PREFIX}/sbin|' \ + ${WRKDIR}/sm.check.sh + @${REINPLACE_CMD} -e 's|/etc/smx|${SMXCONFDIR}|g' \ + -e 's|[.]/misc|${PREFIX}/bin|' \ + -e 's|$${S}/libconf|${PREFIX}/sbin|' \ + -e 's|[.]/libmta|${PREFIX}/sbin|' \ + -e 's|[.]/checks|${PREFIX}/sbin|' \ + -e 's|=mcp.sh|=${PREFIX}/etc/rc.d/smx-mcp.sh|' \ + ${WRKDIR}/sm.setup.sh + +test: + (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ + ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check) + +pre-install: + if ! pw groupshow smxm; then pw groupadd smxs -g 260; fi + if ! pw groupshow smxq; then pw groupadd smxq -g 261; fi + if ! pw groupshow smxc; then pw groupadd smxc -g 262; fi + if ! pw groupshow smxm; then pw groupadd smxm -g 263; fi + if ! pw groupshow smx; then pw groupadd smx -g 264; fi + if ! pw usershow smxs; then pw useradd smxs -g smxs -u 260 \ + -h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "Sendmail X SMTPS"; fi + if ! pw usershow smxq; then pw useradd smxq -g smxq -u 261 \ + -h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "Sendmail X QMGR"; fi + if ! pw usershow smxc; then pw useradd smxc -g smxc -u 262 \ + -h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "Sendmail X SMTPC"; fi + if ! pw usershow smxm; then pw useradd smxm -g smxm -u 263 \ + -h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "Sendmail X misc"; fi + if ! pw usershow smx; then pw useradd smx -g smx -u 264 \ + -h - -d ${NONEXISTENT} -s ${NOLOGIN_CMD} -c "Sendmail X other"; fi + pw groupmod smxc -m smxs + pw groupmod smxm -m smxs,smxq +.if !defined(BATCH) + ${SHELL} ${WRKSRC}/misc/sm.setup.sh +.endif + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/sm.check.sh ${PREFIX}/sbin/ + ${INSTALL_SCRIPT} ${WRKDIR}/sm.setup.sh ${PREFIX}/sbin/ +.for i in ${EXTRA_SBIN} + ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/sbin/ +.endfor +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + @cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/ +.endif + +.include <bsd.port.pre.mk> + +.if !defined(UID) +UID!= ${ID} -u +.endif +.if ${UID} != 0 +post-build: test +.endif + +.if ${OSVERSION} < 500000 +NOLOGIN_CMD?= /sbin/nologin +.else +NOLOGIN_CMD?= /usr/sbin/nologin +.endif + +.include <bsd.port.post.mk> diff --git a/mail/smx/distinfo b/mail/smx/distinfo new file mode 100644 index 000000000000..df2437fca5ad --- /dev/null +++ b/mail/smx/distinfo @@ -0,0 +1,2 @@ +MD5 (smX-0.0.0.0.tar.gz) = 280dc042552dd8221322b1892ffc4fcd +SIZE (smX-0.0.0.0.tar.gz) = 3919940 diff --git a/mail/smx/files/batch.patch b/mail/smx/files/batch.patch new file mode 100644 index 000000000000..c0c668be580e --- /dev/null +++ b/mail/smx/files/batch.patch @@ -0,0 +1,11 @@ +--- Makefile.in.orig Sat Oct 29 01:06:00 2005 ++++ Makefile.in Fri Nov 4 17:53:22 2005 +@@ -886,7 +886,7 @@ + + install-data-hook: + ${CHMOD} +x ./misc/sm.setup.sh +- ${SHELL} ./misc/sm.setup.sh ++# ${SHELL} ./misc/sm.setup.sh + + # fix this... + diff --git a/mail/smx/files/patch-sm.setup.sh.in b/mail/smx/files/patch-sm.setup.sh.in new file mode 100644 index 000000000000..133f4997b02b --- /dev/null +++ b/mail/smx/files/patch-sm.setup.sh.in @@ -0,0 +1,11 @@ +--- misc/sm.setup.sh.in.orig Tue Sep 6 07:40:58 2005 ++++ misc/sm.setup.sh.in Fri Nov 4 18:23:36 2005 +@@ -202,7 +202,7 @@ + SMXCNF=${SMXETC}/${SMXCNFB} + if test -s ${SMXCNF} + then +- SMXCONFPRG=./misc/smxconf ++ SMXCONFPRG=./misc/smconf + if test -x ${SMXCONFPRG} + then + ${SMXCONFPRG} ${SMXCNF} >/dev/null 2>&1 diff --git a/mail/smx/pkg-descr b/mail/smx/pkg-descr new file mode 100644 index 000000000000..a4a085b64656 --- /dev/null +++ b/mail/smx/pkg-descr @@ -0,0 +1,24 @@ +sendmail X is a message transfer system that has been designed with +these main topics in minds: + +- security +- reliability +- efficiency +- configurability +- extendibility + +sendmail X consists of five main modules of which only one runs +as root: + +- mcp: the main control program is similar to inetd(8): it starts + all other sendmail X modules and watches over their execution. + mcp runs as root in order to bind to port 25 and to change the + uid of the processes it starts. +- smtps: the SMTP server receives e-mails. +- smtpc: the SMTP client sends e-mails. +- smar: the address resolver provides lookups in various maps including + DNS for mail routing. +- qmgr: the queue manager controls the flow of e-mails through the SMTP + servers and clients. + +WWW: http://www.sendmail.org/ diff --git a/mail/smx/pkg-plist b/mail/smx/pkg-plist new file mode 100644 index 000000000000..4c8fc30ebd40 --- /dev/null +++ b/mail/smx/pkg-plist @@ -0,0 +1,57 @@ +@exec if ! pw groupshow smxs 2>/dev/null; then pw groupadd smxs -g 260; fi +@exec if ! pw groupshow smxq 2>/dev/null; then pw groupadd smxq -g 261; fi +@exec if ! pw groupshow smxc 2>/dev/null; then pw groupadd smxc -g 262; fi +@exec if ! pw groupshow smxm 2>/dev/null; then pw groupadd smxm -g 263; fi +@exec if ! pw groupshow smx 2>/dev/null; then pw groupadd smx -g 264; fi +@exec if ! pw usershow smxs 2>/dev/null; then pw useradd smxs -g smxs -u 260 -h - -d /nonexistent -s %%NOLOGIN%% -c "Sendmail X SMTPS"; fi +@exec if ! pw usershow smxq 2>/dev/null; then pw useradd smxq -g smxq -u 261 -h - -d /nonexistent -s %%NOLOGIN%% -c "Sendmail X QMGR"; fi +@exec if ! pw usershow smxc 2>/dev/null; then pw useradd smxc -g smxc -u 262 -h - -d /nonexistent -s %%NOLOGIN%% -c "Sendmail X SMTPC"; fi +@exec if ! pw usershow smxm 2>/dev/null; then pw useradd smxm -g smxm -u 263 -h - -d /nonexistent -s %%NOLOGIN%% -c "Sendmail X misc"; fi +@exec if ! pw usershow smx 2>/dev/null; then pw useradd smx -g smx -u 264 -h - -d /nonexistent -s %%NOLOGIN%% -c "Sendmail X other"; fi +@exec pw groupmod smxc -m smxs +@exec pw groupmod smxm -m smxs,smxq +@unexec if pw usershow smxs; then pw userdel smxs; fi +@unexec if pw usershow smxq; then pw userdel smxq; fi +@unexec if pw usershow smxc; then pw userdel smxc; fi +@unexec if pw usershow smxm; then pw userdel smxm; fi +@unexec if pw usershow smx; then pw userdel smx; fi +%%WITH_BDBINT%%bin/db_archive +%%WITH_BDBINT%%bin/db_checkpoint +%%WITH_BDBINT%%bin/db_deadlock +%%WITH_BDBINT%%bin/db_dump +%%WITH_BDBINT%%bin/db_load +%%WITH_BDBINT%%bin/db_printlog +%%WITH_BDBINT%%bin/db_recover +%%WITH_BDBINT%%bin/db_stat +%%WITH_BDBINT%%bin/db_upgrade +%%WITH_BDBINT%%bin/db_verify +%%WITH_BDBINT%%include/db.h +%%WITH_BDBINT%%lib/libdb-4.3.a +%%WITH_BDBINT%%lib/libdb.a +bin/createmap +bin/log2time +bin/mailq +bin/qmgrctl +bin/rcvrenvfromlog.sh +bin/runas +bin/smconf +include/smX/mfapi.h +include/smX/pmfapi.h +include/smX/pmfdef.h +include/smX/smreplycodes.h +libexec/qmgr +libexec/smar +libexec/smtpc +libexec/smtps +sbin/greyprint +sbin/greyrm +sbin/mcp +sbin/noroot +sbin/sm.check.sh +sbin/sm.setup.sh +sbin/statit +sbin/t-hostname +sbin/t-getgroup +sbin/tree +@dirrm include/smX +@exec %D/sbin/sm.setup.sh |