2000-10-14 06:51:41 +02:00
|
|
|
# New ports collection makefile for: sendmail
|
|
|
|
# Date created: 20 Apr 2000
|
|
|
|
# Whom: dirk.meyer@dinoex.sub.org
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= sendmail
|
2006-08-10 06:37:24 +02:00
|
|
|
PORTVERSION= 8.13.8
|
2000-12-21 08:32:18 +01:00
|
|
|
CATEGORIES= mail ipv6
|
2001-05-29 19:09:12 +02:00
|
|
|
MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \
|
|
|
|
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,}
|
2004-10-21 22:08:12 +02:00
|
|
|
PKGNAMESUFFIX?= ${TLS_SUFFIX}${SASL_SUFFIX}${LDAP_SUFFIX}${BERKELEYDB_SUFFIX}${PKGNAMESUFFIX2}
|
2000-10-14 06:51:41 +02:00
|
|
|
DISTNAME= ${PORTNAME}.${PORTVERSION}
|
|
|
|
|
2001-06-24 06:28:57 +02:00
|
|
|
MAINTAINER= dinoex@FreeBSD.org
|
2003-02-20 19:26:42 +01:00
|
|
|
COMMENT= Reliable, highly configurable mail transfer agent with utilities
|
2000-10-14 06:51:41 +02:00
|
|
|
|
2004-03-26 15:05:33 +01:00
|
|
|
CONFLICTS?= courier-0.* postfix-1.* postfix-2.* smail-3.* zmailer-2.*
|
|
|
|
CONFLICTS+= sendmail-8.11.* sendmail-*-8.11.* sendmail+*-8.11.*
|
2004-07-17 20:52:01 +02:00
|
|
|
CONFLICTS+= sendmail-8.12.* sendmail-*-8.12.* sendmail+*-8.12.*
|
2003-10-12 14:13:25 +02:00
|
|
|
|
2000-10-14 06:51:41 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2001-01-05 04:15:42 +01:00
|
|
|
WCONF= ${WRKSRC}/devtools/Site
|
2001-06-15 19:28:11 +02:00
|
|
|
SITE= ${FILESDIR}/site.config.m4.pre4
|
2000-10-14 06:51:41 +02:00
|
|
|
PLIST= ${WRKDIR}/.PLIST.more
|
2001-06-15 19:28:11 +02:00
|
|
|
DOCS= KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \
|
2001-10-07 08:40:42 +02:00
|
|
|
sendmail/TRACEFLAGS sendmail/SECURITY sendmail/TUNING
|
2001-06-15 19:28:11 +02:00
|
|
|
MAN1= mailq.1 newaliases.1 vacation.1
|
|
|
|
MAN5= aliases.5
|
|
|
|
MAN8= sendmail.8 mailstats.8 makemap.8 praliases.8 smrsh.8 \
|
2001-10-07 08:40:42 +02:00
|
|
|
mail.local.8 rmail.8 editmap.8
|
2002-08-31 18:31:11 +02:00
|
|
|
SENDMAIL= ${PREFIX}/sbin/sendmail
|
2003-08-28 17:38:48 +02:00
|
|
|
BASEMAIL= /usr/libexec/sendmail/sendmail
|
2002-08-31 18:31:11 +02:00
|
|
|
PLIST_SUB+= PREFIX=${PREFIX:S=${PREFIX}/==}
|
2003-11-17 06:00:06 +01:00
|
|
|
PKGMESSAGE= ${WRKSRC}/pkg-message
|
2004-12-16 17:33:54 +01:00
|
|
|
MILTER_SOVER?= 3
|
2000-10-14 06:51:41 +02:00
|
|
|
|
2001-03-13 07:44:50 +01:00
|
|
|
# Options to define Features:
|
2001-06-15 19:28:11 +02:00
|
|
|
# SENDMAIL_WITHOUT_IPV6=yes
|
2002-02-09 13:17:38 +01:00
|
|
|
# SENDMAIL_WITHOUT_MILTER=yes
|
2005-01-08 15:35:41 +01:00
|
|
|
# SENDMAIL_WITHOUT_NIS=yes
|
2003-10-09 18:23:40 +02:00
|
|
|
# SENDMAIL_WITHOUT_SHMEM=yes
|
2006-03-25 10:33:30 +01:00
|
|
|
# SENDMAIL_WITHOUT_SEM=yes
|
2001-06-15 19:28:11 +02:00
|
|
|
# SENDMAIL_WITH_TLS=yes
|
2003-04-16 16:39:22 +02:00
|
|
|
# SENDMAIL_WITH_SMTPS=yes
|
2001-06-15 19:28:11 +02:00
|
|
|
# SENDMAIL_WITH_SASL=yes
|
2002-08-31 22:16:32 +02:00
|
|
|
# SENDMAIL_WITH_SASL2=yes
|
2001-06-15 19:28:11 +02:00
|
|
|
# SENDMAIL_WITH_LDAP=yes
|
2006-04-23 21:03:52 +02:00
|
|
|
# SENDMAIL_WITH_BERKELEYDB=yes
|
|
|
|
# Set either WITH_BDB_VER or SENDMAIL_WITH_BDB_VER
|
|
|
|
# to the version of Berkeley DB to use.
|
2004-03-26 15:05:33 +01:00
|
|
|
# SENDMAIL_WITH_SOCKETMAP=yes
|
2004-04-11 08:23:18 +02:00
|
|
|
# SENDMAIL_WITH_CYRUSLOOKUP=yes
|
2002-08-28 06:21:05 +02:00
|
|
|
# SENDMAIL_WITH_PICKY_HELO_CHECK=yes
|
2004-12-16 17:33:54 +01:00
|
|
|
# SENDMAIL_WITH_SHARED_MILTER=yes
|
2001-03-13 07:44:50 +01:00
|
|
|
|
2004-04-11 08:23:18 +02:00
|
|
|
.if defined(SENDMAIL_WITH_SMTPS) && !defined(SENDMAIL_WITH_TLS) && !defined(WITH_TLS)
|
2003-04-16 16:39:22 +02:00
|
|
|
SENDMAIL_WITH_TLS=yes
|
2004-04-11 08:23:18 +02:00
|
|
|
AUTO_ENABLED_TLS=yes
|
2003-04-16 16:39:22 +02:00
|
|
|
.endif
|
2004-04-11 08:23:18 +02:00
|
|
|
.if defined(SENDMAIL_WITH_CYRUSLOOKUP) && !defined(SENDMAIL_WITH_SOCKETMAP)
|
|
|
|
SENDMAIL_WITH_SOCKETMAP=yes
|
|
|
|
AUTO_ENABLED_SOCKETMAP=yes
|
2003-04-16 16:39:22 +02:00
|
|
|
.endif
|
|
|
|
|
2004-10-21 22:08:12 +02:00
|
|
|
.if defined(SENDMAIL_WITH_BERKELEYDB_VER)
|
2006-04-23 21:03:52 +02:00
|
|
|
SENDMAIL_WITH_BERKELEYDB= yes
|
|
|
|
OBSOLETE_BDB_VAR= SENDMAIL_WITH_BERKELEYDB_VER BERKELEYDB_PORT \
|
|
|
|
BERKELEYDB_LIB BERKELEYDB_INCLUDE
|
2006-12-26 13:03:16 +01:00
|
|
|
IGNORE= use SENDMAIL_WITH_BERKELEYDB to select Berkeley DB
|
2004-10-21 22:08:12 +02:00
|
|
|
.endif
|
2006-04-23 21:03:52 +02:00
|
|
|
|
|
|
|
.if defined(SENDMAIL_WITH_BDB_VER)
|
|
|
|
SENDMAIL_WITH_BERKELEYDB= yes
|
2005-11-05 09:34:30 +01:00
|
|
|
.endif
|
2006-04-23 21:03:52 +02:00
|
|
|
|
|
|
|
.if defined(SENDMAIL_WITH_BERKELEYDB)
|
|
|
|
USE_BDB= yes
|
|
|
|
BERKELEYDB_SUFFIX= +${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
|
2006-03-25 10:33:30 +01:00
|
|
|
CONFLICTS+= sendmail-ldap-8.* sendmail-sasl-8.* sendmail-sasl2-8.* sendmail-tls-8.*
|
2004-10-21 22:08:12 +02:00
|
|
|
.endif
|
2001-06-12 22:02:22 +02:00
|
|
|
.if defined(SENDMAIL_WITH_LDAP)
|
2004-03-26 15:05:33 +01:00
|
|
|
LDAP_SUFFIX?= +ldap
|
2003-10-12 14:13:25 +02:00
|
|
|
CONFLICTS+= sendmail-sasl-8.* sendmail-sasl2-8.* sendmail-tls-8.*
|
2004-12-16 06:04:40 +01:00
|
|
|
USE_OPENLDAP= yes
|
2000-12-21 08:32:18 +01:00
|
|
|
.endif
|
2004-03-26 21:49:23 +01:00
|
|
|
.if defined(SENDMAIL_WITH_SASL) && !defined(SENDMAIL_WITH_SASL2)
|
2004-03-26 15:05:33 +01:00
|
|
|
SASL_SUFFIX?= +sasl1
|
2003-10-12 14:13:25 +02:00
|
|
|
CONFLICTS+= sendmail-ldap-8.* sendmail-sasl2-8.* sendmail-tls-8.*
|
2004-03-26 15:05:33 +01:00
|
|
|
LIB_DEPENDS+= sasl.8:${PORTSDIR}/security/cyrus-sasl
|
2001-06-12 22:02:22 +02:00
|
|
|
.endif
|
2002-08-31 18:31:11 +02:00
|
|
|
.if defined(SENDMAIL_WITH_SASL2)
|
2004-03-26 15:05:33 +01:00
|
|
|
SASL_SUFFIX?= +sasl2
|
|
|
|
CONFLICTS+= sendmail-ldap-8.* sendmail-sasl-8.* sendmail-tls-8.*
|
2002-08-31 18:31:11 +02:00
|
|
|
LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
|
2004-08-05 17:17:30 +02:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_SASLAUTHD)
|
2003-08-03 11:39:52 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd
|
2004-08-05 17:17:30 +02:00
|
|
|
.endif
|
2004-03-26 15:05:33 +01:00
|
|
|
.endif
|
2004-04-11 08:23:18 +02:00
|
|
|
.if defined(SENDMAIL_WITH_CYRUSLOOKUP)
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/cyruslookup.patch
|
|
|
|
.endif
|
2001-06-15 19:28:11 +02:00
|
|
|
.if defined(SENDMAIL_WITH_TLS) || defined(WITH_TLS)
|
2004-03-26 15:05:33 +01:00
|
|
|
TLS_SUFFIX?= +tls
|
2003-10-12 14:13:25 +02:00
|
|
|
CONFLICTS+= sendmail-ldap-8.* sendmail-sasl-8.* sendmail-sasl2-8.*
|
2001-01-25 15:34:48 +01:00
|
|
|
.endif
|
2000-12-21 08:32:18 +01:00
|
|
|
|
2006-12-26 13:03:16 +01:00
|
|
|
MAKE_PKGNAMES= for i in "" +tls; do \
|
|
|
|
for j in "" +sasl +sasl1 +sasl2; do \
|
|
|
|
for k in "" +ldap; do \
|
|
|
|
for l in "" +db2 +db3 +db4 +db41 +db42 +db43 +db44; do \
|
|
|
|
echo "sendmail$${i}$${j}$${k}$${l}-8.*" ;\
|
|
|
|
done done done done
|
|
|
|
|
|
|
|
ALL_PKGNAMES!= ${MAKE_PKGNAMES}
|
|
|
|
CONFLICTS2!= ${MAKE_PKGNAMES} | grep -v "${PORTNAME}${PKGNAMESUFFIX}-8."
|
|
|
|
CONFLICTS+= ${CONFLICTS2}
|
|
|
|
|
2001-06-15 19:28:11 +02:00
|
|
|
# Build site.config.m4
|
2000-12-21 08:32:18 +01:00
|
|
|
.if exists(${DESTDIR}/etc/mail/mailer.conf)
|
2001-06-15 19:28:11 +02:00
|
|
|
SITE+= ${FILESDIR}/site.config.m4
|
2006-06-15 21:11:12 +02:00
|
|
|
.endif
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_IPV6)
|
2001-06-15 19:28:11 +02:00
|
|
|
SITE+= ${FILESDIR}/site.config.m4.ipv6
|
|
|
|
.endif
|
|
|
|
.if defined(SENDMAIL_WITH_SASL)
|
|
|
|
SITE+= ${FILESDIR}/site.config.m4.sasl
|
2001-05-13 09:13:39 +02:00
|
|
|
.endif
|
2002-08-31 18:31:11 +02:00
|
|
|
.if defined(SENDMAIL_WITH_SASL2)
|
|
|
|
SITE+= ${FILESDIR}/site.config.m4.sasl2
|
|
|
|
.endif
|
2001-05-01 14:10:05 +02:00
|
|
|
.if defined(SENDMAIL_WITH_LDAP)
|
2001-06-15 19:28:11 +02:00
|
|
|
SITE+= ${FILESDIR}/site.config.m4.ldap
|
|
|
|
.endif
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER)
|
2001-10-08 17:37:43 +02:00
|
|
|
SITE+= ${FILESDIR}/site.config.m4.milter
|
|
|
|
.endif
|
2003-08-28 17:38:48 +02:00
|
|
|
.if defined(SENDMAIL_WITH_TLS) || defined(WITH_TLS)
|
|
|
|
USE_OPENSSL= yes
|
|
|
|
.endif
|
2000-10-14 06:51:41 +02:00
|
|
|
|
2001-06-15 19:28:11 +02:00
|
|
|
# install directly if no mailwrapper support
|
2001-05-13 09:13:39 +02:00
|
|
|
.if ! exists(${DESTDIR}/etc/mail/mailer.conf)
|
2000-10-14 06:51:41 +02:00
|
|
|
PREFIX?= ${DESTDIR}/usr
|
|
|
|
MANPREFIX?= ${DESTDIR}/usr/share
|
2002-09-16 05:17:13 +02:00
|
|
|
PLIST_SUB+= ETCPORT="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= ETCPORT=""
|
2000-10-14 06:51:41 +02:00
|
|
|
.endif
|
|
|
|
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER)
|
|
|
|
.if defined(SENDMAIL_WITH_SHARED_MILTER)
|
|
|
|
PLIST_SUB+= MILTER_SHARED=""
|
|
|
|
PLIST_SUB+= MILTER_SOVER=${MILTER_SOVER}
|
2004-12-16 21:43:16 +01:00
|
|
|
MAKE_ENV+= MILTER_SOVER=${MILTER_SOVER}
|
2004-12-16 17:33:54 +01:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= MILTER_SHARED="@comment "
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2005-01-08 15:35:41 +01:00
|
|
|
SED_SCRIPT= -e "s;\`-pthread\';\`${PTHREAD_LIBS}\';" \
|
|
|
|
-e "s;\`-O\';\`${CFLAGS}\';"
|
|
|
|
|
|
|
|
.if defined(SENDMAIL_WITHOUT_NIS)
|
|
|
|
SED_SCRIPT+= -e "s;-DNIS ;;"
|
|
|
|
.endif
|
|
|
|
|
2001-10-07 08:40:42 +02:00
|
|
|
post-extract:
|
|
|
|
@${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/sm-client.sh \
|
|
|
|
> ${WRKSRC}/sm-client.sh
|
2002-09-16 06:27:00 +02:00
|
|
|
@${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/sendmail.sh \
|
2002-04-06 10:17:34 +02:00
|
|
|
> ${WRKSRC}/sendmail.sh
|
2003-10-09 18:23:40 +02:00
|
|
|
@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" \
|
|
|
|
-e "s=%%LOCALBASE%%=${LOCALBASE}=g" \
|
|
|
|
-e "s=%%PORTSDIR%%=${PORTSDIR}=g" \
|
|
|
|
${PKGDIR}/pkg-message > ${WRKSRC}/pkg-message
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER) && defined(SENDMAIL_WITH_SHARED_MILTER)
|
|
|
|
@${CP} -pR ${WRKSRC}/libmilter ${WRKSRC}/libsharedmilter
|
|
|
|
${CP} ${FILESDIR}/sharedlibrary.m4 \
|
2006-03-25 10:33:30 +01:00
|
|
|
${WRKSRC}/devtools/M4/UNIX/sharedlibrary.m4
|
2004-12-16 17:33:54 +01:00
|
|
|
@${MV} ${WRKSRC}/libsharedmilter/Makefile.m4 \
|
|
|
|
${WRKSRC}/libsharedmilter/Makefile.m4.sed
|
|
|
|
@${SED} -e 's=`library=`sharedlibrary=' \
|
|
|
|
${WRKSRC}/libsharedmilter/Makefile.m4.sed \
|
|
|
|
> ${WRKSRC}/libsharedmilter/Makefile.m4
|
|
|
|
.endif
|
2001-10-07 08:40:42 +02:00
|
|
|
|
2004-04-11 08:23:18 +02:00
|
|
|
pre-configure:
|
|
|
|
.if defined(AUTO_ENABLED_TLS)
|
|
|
|
@${ECHO_CMD} "DEPENDENCY NOTE: SENDMAIL_WITH_TLS will be enabled to support SENDMAIL_WITH_SMTPS"
|
|
|
|
.endif
|
|
|
|
.if defined(AUTO_ENABLED_SOCKETMAP)
|
|
|
|
@${ECHO_CMD} "DEPENDENCY NOTE: SENDMAIL_WITH_SOCKETMAP will be enabled to support SENDMAIL_WITH_CYRUSLOOKUP"
|
|
|
|
.endif
|
|
|
|
|
2001-06-15 19:28:11 +02:00
|
|
|
do-configure:
|
2002-06-16 17:03:10 +02:00
|
|
|
@${MV} ${WRKSRC}/devtools/OS/FreeBSD ${WRKSRC}/devtools/OS/FreeBSD.sed
|
2005-01-08 15:35:41 +01:00
|
|
|
${SED} ${SED_SCRIPT} ${WRKSRC}/devtools/OS/FreeBSD.sed \
|
2002-06-16 17:03:10 +02:00
|
|
|
> ${WRKSRC}/devtools/OS/FreeBSD
|
2003-04-15 21:40:30 +02:00
|
|
|
${SED} -e "s=%%PREFIX%%=${PREFIX}=g" \
|
|
|
|
-e "s=%%LOCALBASE%%=${LOCALBASE}=g" \
|
2001-06-15 19:28:11 +02:00
|
|
|
${SITE} > ${WCONF}/site.config.m4
|
2006-04-23 21:03:52 +02:00
|
|
|
.if defined(SENDMAIL_WITH_BERKELEYDB)
|
2004-10-21 22:08:12 +02:00
|
|
|
${ECHO_CMD} \
|
2006-04-23 21:03:52 +02:00
|
|
|
'APPENDDEF(`confENVDEF'\'', `-I${BDB_INCLUDE_DIR}'\'')' \
|
2004-10-21 22:08:12 +02:00
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
${ECHO_CMD} \
|
2004-12-17 14:56:25 +01:00
|
|
|
'APPENDDEF(`confLIBDIRS'\'', `-L${LOCALBASE}/lib'\'')' \
|
2004-10-21 22:08:12 +02:00
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
.for i in sendmail editmap makemap praliases vacation
|
|
|
|
${ECHO_CMD} \
|
2006-04-23 21:03:52 +02:00
|
|
|
'APPENDDEF(`conf_${i}_LIBS'\'', `-l${BDB_LIB_NAME}'\'')' \
|
2004-10-21 22:08:12 +02:00
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
.endfor
|
|
|
|
.endif
|
2004-03-26 15:05:33 +01:00
|
|
|
.if defined(SENDMAIL_WITH_SOCKETMAP)
|
|
|
|
${ECHO_CMD} \
|
|
|
|
'APPENDDEF(`conf_sendmail_ENVDEF'\'', `-DSOCKETMAP'\'')' \
|
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
.endif
|
2002-08-28 06:21:05 +02:00
|
|
|
.if defined(SENDMAIL_WITH_PICKY_HELO_CHECK)
|
|
|
|
${ECHO_CMD} \
|
2004-03-26 15:05:33 +01:00
|
|
|
'APPENDDEF(`conf_sendmail_ENVDEF'\'', `-DPICKY_HELO_CHECK'\'')' \
|
2002-08-28 06:21:05 +02:00
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
.endif
|
2003-10-09 18:23:40 +02:00
|
|
|
.if defined(SENDMAIL_WITHOUT_SHMEM)
|
|
|
|
${ECHO_CMD} \
|
|
|
|
'APPENDDEF(`confENVDEF'\'', `-DSM_CONF_SHM=0'\'')' \
|
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
.endif
|
2006-03-25 10:33:30 +01:00
|
|
|
.if defined(SENDMAIL_WITHOUT_SEM)
|
|
|
|
${ECHO_CMD} \
|
|
|
|
'APPENDDEF(`confENVDEF'\'', `-DSM_CONF_SEM=0'\'')' \
|
|
|
|
>> ${WCONF}/site.config.m4
|
|
|
|
.endif
|
2001-06-15 19:28:11 +02:00
|
|
|
|
|
|
|
post-build:
|
2002-06-10 20:51:33 +02:00
|
|
|
( cd ${WRKSRC}/doc/op && ${MAKE} op.txt )
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER)
|
2004-12-17 06:23:27 +01:00
|
|
|
@(cd ${BUILD_WRKSRC}/libmilter; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
|
2004-12-16 17:33:54 +01:00
|
|
|
.if defined(SENDMAIL_WITH_SHARED_MILTER)
|
2004-12-17 06:23:27 +01:00
|
|
|
@(cd ${BUILD_WRKSRC}/libsharedmilter; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
|
2004-12-16 17:33:54 +01:00
|
|
|
.endif
|
2001-10-08 17:37:43 +02:00
|
|
|
.endif
|
2000-10-14 06:51:41 +02:00
|
|
|
|
|
|
|
pre-install:
|
2001-03-10 07:09:04 +01:00
|
|
|
@${CAT} ${PKGDIR}/pkg-plist >${PLIST}
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER)
|
2001-03-13 14:17:58 +01:00
|
|
|
@${CAT} ${FILESDIR}/pkg-milter >>${PLIST}
|
2001-10-08 17:37:43 +02:00
|
|
|
.endif
|
2002-06-26 05:37:22 +02:00
|
|
|
if ! pw groupshow smmsp; then pw groupadd smmsp -g 25; fi
|
|
|
|
if ! pw usershow smmsp; then pw useradd smmsp -g smmsp -u 25 \
|
2001-10-07 08:40:42 +02:00
|
|
|
-h - -d /nonexistent -s /nonexistent -c "Sendmail Queue"; fi
|
2003-08-28 17:38:48 +02:00
|
|
|
@cd ${WRKSRC} && ${FIND} cf -type f | \
|
2000-10-14 06:51:41 +02:00
|
|
|
${AWK} '{print "share/sendmail/" $$1}' >>${PLIST}
|
2003-08-28 17:38:48 +02:00
|
|
|
@cd ${WRKSRC} && ${FIND} -d cf -type d | \
|
2000-10-14 06:51:41 +02:00
|
|
|
${AWK} '{print "@dirrm share/sendmail/" $$1}' >>${PLIST}
|
2002-01-29 12:48:57 +01:00
|
|
|
@${ECHO_CMD} "@dirrm share/sendmail" >>${PLIST}
|
2003-10-09 18:23:40 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2001-05-31 09:03:58 +02:00
|
|
|
.for i in ${DOCS}
|
2002-01-29 12:48:57 +01:00
|
|
|
@${ECHO_CMD} `${BASENAME} ${i}` | \
|
2003-10-09 18:23:40 +02:00
|
|
|
${AWK} '{print "%%DOCSDIR%%/" $$1}' >>${PLIST}
|
2001-05-31 09:03:58 +02:00
|
|
|
.endfor
|
2004-04-11 08:23:18 +02:00
|
|
|
.if defined(SENDMAIL_WITH_CYRUSLOOKUP)
|
|
|
|
@${ECHO_CMD} "share/doc/sendmail/CYRUS_LOOKUP" >>${PLIST}
|
2004-03-26 20:03:18 +01:00
|
|
|
.endif
|
2003-10-09 18:23:40 +02:00
|
|
|
@${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
|
2000-10-14 06:51:41 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# We want mail.local and rmail for our system.
|
|
|
|
# the build install catmans only, we have to fix this.
|
|
|
|
post-install:
|
|
|
|
( cd ${WRKSRC}/mail.local && ${MAKE} force-install )
|
|
|
|
( cd ${WRKSRC}/rmail && ${MAKE} force-install )
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER)
|
2001-03-10 21:49:42 +01:00
|
|
|
${MKDIR} ${PREFIX}/include/libmilter
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/include/libmilter/mfapi.h \
|
2001-10-12 12:01:18 +02:00
|
|
|
${WRKSRC}/include/libmilter/mfdef.h \
|
2001-03-10 21:49:42 +01:00
|
|
|
${PREFIX}/include/libmilter/
|
|
|
|
${INSTALL_DATA} \
|
|
|
|
${WRKSRC}/obj.`${WRKSRC}/devtools/bin/Build -A`/libmilter/libmilter.a \
|
|
|
|
${PREFIX}/lib/
|
2004-12-16 17:33:54 +01:00
|
|
|
.if defined(SENDMAIL_WITH_SHARED_MILTER)
|
|
|
|
${INSTALL_SCRIPT} \
|
|
|
|
${WRKSRC}/obj.`${WRKSRC}/devtools/bin/Build -A`/libsharedmilter/libmilter.so \
|
|
|
|
${PREFIX}/lib/libmilter.so.${MILTER_SOVER}
|
2004-12-20 14:37:27 +01:00
|
|
|
${LN} -sf libmilter.so.${MILTER_SOVER} ${PREFIX}/lib/libmilter.so
|
2004-12-16 17:33:54 +01:00
|
|
|
.endif
|
2001-10-08 17:37:43 +02:00
|
|
|
.endif
|
2002-09-16 05:17:13 +02:00
|
|
|
.if exists(${DESTDIR}/etc/mail/mailer.conf)
|
2001-11-13 21:37:35 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/sm-client.sh \
|
2002-09-16 05:17:13 +02:00
|
|
|
${LOCALBASE}/etc/rc.d/sm-client.sh.sample
|
2002-04-06 10:17:34 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/sendmail.sh \
|
2002-09-16 05:17:13 +02:00
|
|
|
${LOCALBASE}/etc/rc.d/sendmail.sh.sample
|
|
|
|
.endif
|
2001-10-07 08:40:42 +02:00
|
|
|
${CHOWN} smmsp:smmsp /var/spool/clientmqueue
|
|
|
|
${CHMOD} 770 /var/spool/clientmqueue
|
2000-10-14 06:51:41 +02:00
|
|
|
.for i in ${MAN8}
|
|
|
|
@${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8
|
|
|
|
.endfor
|
|
|
|
.for i in ${MAN5}
|
|
|
|
@${RM} -f ${MANPREFIX}/man/cat5/${i} ${MANPREFIX}/man/cat5/${i}.gz
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man5
|
|
|
|
.endfor
|
|
|
|
.for i in ${MAN1}
|
|
|
|
@${RM} -f ${MANPREFIX}/man/cat1/${i} ${MANPREFIX}/man/cat1/${i}.gz
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man1
|
|
|
|
.endfor
|
2003-10-09 18:23:40 +02:00
|
|
|
${MKDIR} ${PREFIX}/share/sendmail
|
2002-01-06 00:43:13 +01:00
|
|
|
@${TAR} -C ${WRKSRC} -cf - cf | \
|
|
|
|
${TAR} -C ${PREFIX}/share/sendmail -xf -
|
2003-10-09 18:23:40 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
2002-01-06 00:43:13 +01:00
|
|
|
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/op/op.ps ${DOCSDIR}/op.ps
|
2002-06-10 20:51:33 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/op/op.txt ${DOCSDIR}/op.txt
|
2002-01-06 00:43:13 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/devtools/README ${DOCSDIR}/DEVTOOLS
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sendmail/README ${DOCSDIR}/SENDMAIL
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/mail.local/README ${DOCSDIR}/MAIL.LOCAL
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/smrsh/README ${DOCSDIR}/SMRSH
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(SENDMAIL_WITHOUT_MILTER)
|
2002-01-06 00:43:13 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/libmilter/README ${DOCSDIR}/MILTER
|
2002-01-29 20:36:13 +01:00
|
|
|
${MKDIR} ${DOCSDIR}/libmilter
|
|
|
|
@${TAR} -C ${WRKSRC}/libmilter/docs -cf - . | \
|
|
|
|
${TAR} -C ${DOCSDIR}/libmilter -xf -
|
2001-05-31 09:03:58 +02:00
|
|
|
.endif
|
2004-04-11 08:23:18 +02:00
|
|
|
.if defined(SENDMAIL_WITH_CYRUSLOOKUP)
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/CYRUS_LOOKUP ${DOCSDIR}/CYRUS_LOOKUP
|
|
|
|
.endif
|
2001-10-08 17:37:43 +02:00
|
|
|
.endif
|
2000-10-14 06:51:41 +02:00
|
|
|
.if exists(${DESTDIR}/etc/mail/mailer.conf)
|
2003-10-09 18:23:40 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2000-10-14 06:51:41 +02:00
|
|
|
|
2003-08-28 17:38:48 +02:00
|
|
|
mailer.base:
|
|
|
|
@${SED} \
|
|
|
|
-e "s=^sendmail[ ]*/.*$$=sendmail ${BASEMAIL}=" \
|
|
|
|
-e "s=^send-mail[ ]*/.*$$=send-mail ${BASEMAIL}=" \
|
|
|
|
-e "s=^mailq[ ]*/.*$$=mailq ${BASEMAIL}=" \
|
|
|
|
-e "s=^newaliases[ ]*/.*$$=newaliases ${BASEMAIL}=" \
|
|
|
|
-e "s=^hoststat[ ]*/.*$$=hoststat ${BASEMAIL}=" \
|
|
|
|
-e "s=^purgestat[ ]*/.*$$=purgestat ${BASEMAIL}=" \
|
|
|
|
${DESTDIR}/etc/mail/mailer.conf > ${DESTDIR}/etc/mail/mailer.conf.new
|
|
|
|
${MV} ${DESTDIR}/etc/mail/mailer.conf.new \
|
|
|
|
${DESTDIR}/etc/mail/mailer.conf
|
|
|
|
|
2000-10-14 06:51:41 +02:00
|
|
|
mailer.conf:
|
2001-03-10 07:09:04 +01:00
|
|
|
@${SED} \
|
2000-10-14 06:51:41 +02:00
|
|
|
-e "s=^sendmail[ ]*/.*$$=sendmail ${SENDMAIL}=" \
|
|
|
|
-e "s=^send-mail[ ]*/.*$$=send-mail ${SENDMAIL}=" \
|
|
|
|
-e "s=^mailq[ ]*/.*$$=mailq ${SENDMAIL}=" \
|
|
|
|
-e "s=^newaliases[ ]*/.*$$=newaliases ${SENDMAIL}=" \
|
2002-04-18 06:16:10 +02:00
|
|
|
-e "s=^hoststat[ ]*/.*$$=hoststat ${SENDMAIL}=" \
|
|
|
|
-e "s=^purgestat[ ]*/.*$$=purgestat ${SENDMAIL}=" \
|
2000-10-14 06:51:41 +02:00
|
|
|
${DESTDIR}/etc/mail/mailer.conf > ${DESTDIR}/etc/mail/mailer.conf.new
|
2001-05-31 09:03:58 +02:00
|
|
|
${MV} ${DESTDIR}/etc/mail/mailer.conf.new \
|
|
|
|
${DESTDIR}/etc/mail/mailer.conf
|
2000-10-14 06:51:41 +02:00
|
|
|
.endif
|
|
|
|
|
2002-08-31 18:31:11 +02:00
|
|
|
# create sumbit.cf on older systems
|
|
|
|
#
|
|
|
|
submit.cf: ${DESTDIR}/etc/mail/submit.cf
|
|
|
|
|
|
|
|
${DESTDIR}/etc/mail/submit.mc:
|
2001-10-07 08:40:42 +02:00
|
|
|
${INSTALL_DATA} ${PREFIX}/share/sendmail/cf/cf/submit.mc \
|
|
|
|
${DESTDIR}/etc/mail/submit.mc
|
2002-08-31 18:31:11 +02:00
|
|
|
|
|
|
|
${DESTDIR}/etc/mail/submit.cf: ${DESTDIR}/etc/mail/submit.mc
|
2001-10-07 08:40:42 +02:00
|
|
|
@( cd ${DESTDIR}/etc/mail && ${MAKE} \
|
|
|
|
SENDMAIL_CF_DIR=${PREFIX}/share/sendmail/cf \
|
|
|
|
SENDMAIL_MC=submit )
|
|
|
|
|
2002-10-08 17:29:02 +02:00
|
|
|
# create basics for smtp-auth
|
|
|
|
#
|
2003-08-28 17:38:48 +02:00
|
|
|
howto-sasldb:
|
2002-10-08 17:29:02 +02:00
|
|
|
@${ECHO_CMD} "# Links:"
|
|
|
|
@${ECHO_CMD} "#"
|
2003-04-03 21:39:55 +02:00
|
|
|
@${ECHO_CMD} "# http://www.sendmail.org/~gshapiro/"
|
2002-10-08 17:29:02 +02:00
|
|
|
@${ECHO_CMD} "# http://www.sendmail.org/~ca/email/auth.html"
|
2006-06-15 21:11:12 +02:00
|
|
|
@${ECHO_CMD} "# http://www.bme.ogi.edu/~pchytil/linux/sendmail/"
|
|
|
|
@${ECHO_CMD} "# http://blue-labs.org/software/sm-pgsql/"
|
|
|
|
@${ECHO_CMD} "# http://www.falkotimme.com/howtos/sendmail_smtp_auth_tls/"
|
2002-10-08 17:29:02 +02:00
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
|
|
|
|
# create certificates for TLS/SSL
|
|
|
|
#
|
|
|
|
tls-install:
|
2003-01-22 20:14:08 +01:00
|
|
|
${SETENV} DESTDIR=${DESTDIR} FILESDIR=${FILESDIR} \
|
|
|
|
${SH} ${FILESDIR}/tls-install.sh
|
2002-10-08 17:29:02 +02:00
|
|
|
|
2006-06-14 23:15:54 +02:00
|
|
|
help:
|
|
|
|
@${ECHO_CMD} "# additional targets:"
|
|
|
|
@${ECHO_CMD} "#"
|
2006-06-15 21:11:12 +02:00
|
|
|
@${ECHO_CMD} "# configure ${DESTDIR}/etc/mail/mailer.conf"
|
2006-06-14 23:15:54 +02:00
|
|
|
@${ECHO_CMD} "# for sendmail from ports"
|
|
|
|
@${ECHO_CMD} "make mailer.conf"
|
|
|
|
@${ECHO_CMD} "# for sendmail in the base"
|
|
|
|
@${ECHO_CMD} "make mailer.base"
|
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${ECHO_CMD} "# show howto for configuring sasldb"
|
|
|
|
@${ECHO_CMD} "make howto-sasldb"
|
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${ECHO_CMD} "# create a self-signed certificate"
|
|
|
|
@${ECHO_CMD} "make tls-install"
|
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
|
2002-04-29 12:33:21 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2002-05-31 22:51:48 +02:00
|
|
|
.if defined(SENDMAIL_WITH_TLS) || defined(WITH_TLS)
|
2004-12-16 17:33:54 +01:00
|
|
|
.if !defined(WITH_OPENSSL_BASE)
|
2003-04-15 21:40:30 +02:00
|
|
|
SITE+= ${FILESDIR}/site.config.m4.ssl
|
|
|
|
.endif
|
|
|
|
SITE+= ${FILESDIR}/site.config.m4.tls
|
2002-05-31 22:51:48 +02:00
|
|
|
.endif
|
|
|
|
|
2002-04-29 12:33:21 +02:00
|
|
|
.if exists(${FILESDIR}/site.config.m4.local)
|
|
|
|
SITE+= ${FILESDIR}/site.config.m4.local
|
|
|
|
.endif
|
|
|
|
|
2003-09-24 19:25:30 +02:00
|
|
|
.if exists(${DESTDIR}/etc/mail/mailer.conf) && ${PREFIX} == "/usr"
|
2003-10-09 18:23:40 +02:00
|
|
|
pre-everything::
|
2003-09-24 19:25:30 +02:00
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${ECHO_CMD} "# You can't override the base sendmail this way."
|
|
|
|
@${ECHO_CMD} "# your version FreeBSD use mailwrapper."
|
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${ECHO_CMD} "# Please install with normal PREFIX"
|
|
|
|
@${ECHO_CMD} "# and activate the port version with"
|
2003-10-09 18:23:40 +02:00
|
|
|
@${ECHO_CMD} "# cd ${PORTSDIR}/mail/sendmail && make mailer.conf"
|
2003-09-24 19:25:30 +02:00
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${FALSE}
|
|
|
|
.endif
|
|
|
|
|
2002-04-29 12:33:21 +02:00
|
|
|
.include <bsd.port.post.mk>
|