2e85bc7502
* rfc2045mkboundary.c was broken in 0.68 Changes 0.68: * rfc2045/rfc2045mkboundary.c (rfc2045_mk_boundary): truncate the hostname portion of the boundary to 30 chars. * courier/doc/courier.sgml: Remove descriptions of some configuration files that were moved to the courier-authlib package a while ago. They don't belong here any more. * courier/submit.C: Use the authenticated address, instead of the return address, for domain-based virtual configuration. * courier/libs/cfilename.c (config_has_vhost): Checks whether vhost.[ip] exists. * courier/module.esmtp/courieresmtpd.c (main): Only set a message's virtual host if vhost.[ip] exists. * courier/module.esmtp/esmtpclient.c (get_sourceaddr): Make sure the input buffer is null-terminated. * courier/submit.C (getrcpts): If there's no vhost setting from the sender's IP address (this includes local mail!) if vhost.domain exists, use [domain] as the virtual host. * Remove config_search(), which simply called config_localfilename(). Change all current callers to call config_localfilename(). * courier/libs/cfilename.c (config_set_local_vhost): saves a string that gets appended as a suffix, by config_localfilename(), and if that filename exists, that's returned as the filename, otherwise it's the original string without the suffix. config_get_local_vhost() returns the suffix string. to config_set_local_vhost(). * courier/libs/comsubmitclient.c (submit_fork): If config_get_local_vhost(), add a -vhost parameter to submit(). * courier/submit.C (cppmain): -vhost sets config_set_local_vhost(). * courier/submit2.C (closectl): New COMCTLFILE_VHOST parameter in the config file, taken from the vhost setting. * courier/libs/comctlfile.c (ctlfile_setvhost): If COMCTLFILE_VHOST is set, call ctlfile_setvhost(), return an indication if the vhost has changed. Absence of a COMCTLFILE_VHOST treated as a discrete "(null)" setting. * courier/module.esmtp/esmtpclient.c (esmtpchild): If ctlfile_setvhost() then disconnect the current socket, if one is open. * courier/module.esmtp/esmtpclient.c (get_sourceaddr): The IP address specified in ipout or ip6out overrides SOURCE_ADDRESS and SOURCE_ADDRESS_IPV6 environment variable. * courier/module.local/localmail.c (main): Call ctlfile_setvhost(). * courier/module.uucp/uucp.c (uux): Call ctlfile_setvhost(). * courier/module.dsn/dsn.c (main): Call ctlfile_setvhost(). * liblock/mail.c (dotlock_exists): Quell a compiler warning. * courier/courierd.dist.in SOURCE_ADDRESS: Add a note that this setting is deprecated.
153 lines
4 KiB
Makefile
153 lines
4 KiB
Makefile
# $NetBSD: options.mk,v 1.11 2012/06/09 11:45:38 adam Exp $
|
|
|
|
# Global and legacy options
|
|
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.courier-mta
|
|
PKG_SUPPORTED_OPTIONS= courier-dsn courier-esmtp courier-gnutls \
|
|
courier-local courier-uucp inet6 ldap
|
|
PKG_SUGGESTED_OPTIONS= courier-dsn courier-esmtp courier-local inet6
|
|
|
|
.include "../../mk/bsd.options.mk"
|
|
|
|
###
|
|
### delivery sender notification mail transport
|
|
###
|
|
.if !empty(PKG_OPTIONS:Mcourier-dsn)
|
|
COURIER_TRANSPORTS+= dsn
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.dsn
|
|
|
|
. for _file_ in dsndelayed.txt dsndelivered.txt dsnfailed.txt \
|
|
dsnfooter.txt dsnheader.txt dsnrelayed.txt \
|
|
dsnsubjectnotice.txt dsnsubjectwarn.txt module.dsn
|
|
CONF_FILES_PERMS+= ${EGDIR}/${_file_} \
|
|
${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \
|
|
${COURIER_FILE_PERMS}
|
|
. endfor
|
|
.endif
|
|
|
|
###
|
|
### ESMTP mail transport
|
|
###
|
|
.if !empty(PKG_OPTIONS:Mcourier-esmtp)
|
|
COURIER_TRANSPORTS+= esmtp
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.esmtp
|
|
|
|
RCD_SCRIPTS+= courieresmtp courieresmtpmsa courieresmtps
|
|
|
|
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/esmtpacceptmailfor.dir \
|
|
${COURIER_DIR_PERMS}
|
|
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/esmtppercentrelay.dir \
|
|
${COURIER_DIR_PERMS}
|
|
|
|
. for _file_ in esmtp.authpam esmtpd-msa.dist esmtpd-ssl.dist \
|
|
esmtpd.cnf esmtpd.dist module.esmtp
|
|
CONF_FILES_PERMS+= ${EGDIR}/${_file_} \
|
|
${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \
|
|
${COURIER_FILE_PERMS}
|
|
. endfor
|
|
CONF_FILES_PERMS+= ${EGDIR}/esmtpauthclient \
|
|
${PKG_SYSCONFDIR}/esmtpauthclient \
|
|
${COURIER_USER} ${COURIER_GROUP} 0600
|
|
.endif
|
|
|
|
###
|
|
### fax mail transport
|
|
###
|
|
### XXX This option should not be enabled until the dependencies for
|
|
### XXX generating and receiving faxes have all been sorted out, e.g.
|
|
### XXX mgetty+sendfax, netpbm, etc.
|
|
###
|
|
.if !empty(PKG_OPTIONS:Mcourier-fax)
|
|
USE_TOOLS+= gs:run
|
|
COURIER_TRANSPORTS+= fax
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.fax
|
|
|
|
OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/faxtmp \
|
|
${COURIER_USER} ${COURIER_GROUP} 0700
|
|
|
|
. for _file_ in faxcoverpage.tr.dist faxnotifyrc.dist module.fax
|
|
CONF_FILES_PERMS+= ${EGDIR}/${_file_} \
|
|
${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \
|
|
${COURIER_FILE_PERMS}
|
|
. endfor
|
|
CONF_FILES_PERMS+= ${EGDIR}/faxrc.dist ${PKG_SYSCONFDIR}/faxrc \
|
|
${COURIER_USER} ${COURIER_GROUP} 0640
|
|
.endif
|
|
|
|
###
|
|
### local mail tranport
|
|
###
|
|
.if !empty(PKG_OPTIONS:Mcourier-local)
|
|
COURIER_TRANSPORTS+= local
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.local
|
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/module.local \
|
|
${PKG_SYSCONFDIR}/module.local \
|
|
${COURIER_FILE_PERMS}
|
|
.endif
|
|
|
|
###
|
|
### UUCP mail transport
|
|
###
|
|
.if !empty(PKG_OPTIONS:Mcourier-uucp)
|
|
COURIER_TRANSPORTS+= uucp
|
|
PKG_GROUPS+= ${UUCP_GROUP}
|
|
PKG_USERS+= ${UUCP_USER}:${UUCP_GROUP}
|
|
PKG_GROUPS_VARS+= UUCP_GROUP
|
|
PKG_USERS_VARS+= UUCP_USER
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.uucp
|
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/module.uucp \
|
|
${PKG_SYSCONFDIR}/module.uucp \
|
|
${COURIER_FILE_PERMS}
|
|
.endif
|
|
|
|
.if empty(COURIER_TRANSPORTS)
|
|
PKG_FAIL_REASON+= "[courier/options.mk] No mail transports specified."
|
|
.endif
|
|
|
|
|
|
###
|
|
### IPv6 support (used by Courier ESMTP client)
|
|
###
|
|
.if !empty(PKG_OPTIONS:Minet6)
|
|
CONFIGURE_ARGS+= --with-ipv6
|
|
.else
|
|
CONFIGURE_ARGS+= --without-ipv6
|
|
.endif
|
|
|
|
###
|
|
### LDAP alias lookup support
|
|
###
|
|
.if !empty(PKG_OPTIONS:Mldap)
|
|
. include "../../databases/openldap-client/buildlink3.mk"
|
|
CONFIGURE_ARGS+= --with-ldapaliasd
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.ldap
|
|
FILES_SUBST+= COURIERLDAPALIASD=courierldapaliasd
|
|
|
|
RCD_SCRIPTS+= courierldapaliasd
|
|
CONF_FILES_PERMS+= ${EGDIR}/ldapaliasrc.dist \
|
|
${PKG_SYSCONFDIR}/ldapaliasrc \
|
|
${COURIER_USER} ${COURIER_GROUP} 0640
|
|
.else
|
|
FILES_SUBST+= COURIERLDAPALIASD=
|
|
CONFIGURE_ARGS+= --without-ldapaliasd
|
|
.endif
|
|
|
|
###
|
|
### Support using the GNU TLS tools for creating certificates; otherwise,
|
|
### default to using OpenSSL.
|
|
###
|
|
SUBST_CLASSES+= tls
|
|
SUBST_FILES.tls= courier/module.esmtp/mkesmtpdcert.in
|
|
SUBST_STAGE.tls= pre-configure
|
|
COURIER_CERTTOOL= ${PREFIX}/bin/certtool
|
|
COURIER_OPENSSL= ${PREFIX}/bin/openssl
|
|
|
|
.if !empty(PKG_OPTIONS:Mcourier-gnutls)
|
|
SUBST_SED.tls= -e "s|@ssllib@|gnutls|g"
|
|
.else
|
|
USE_TOOLS+= openssl:run
|
|
COURIER_OPENSSL= ${TOOLS_OPENSSL}
|
|
SUBST_SED.tls= -e "s|@ssllib@|openssl|g"
|
|
.endif
|