1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-21 08:42:23 +00:00
freebsd-ports/mail/nmh/Makefile
Cy Schubert 726505d2f9 mail/nmh*: Change default mail transport method
nmh supports three mail transport methods: smtp, which submits email to
the submission port (587), sendmail/smtp, submitting SMTP to the MTA
through a pipe, and sendmail/pipe, submitting raw email to the MTA where
the MTA extracts the from and to headers from the email itself, using
sendmail -t.

The reason for this change is to support the upcoming 14-CURRENT
switchover from sendmail to dma (DragonflyBSD Mail Agent). The dma agent
only supports SMTP over port 25 and works well using sendmail -t while
all other transport methods do not work.

This change only affects new installs of nmh and nmh-devel.  Users of
existing nmh installations who wish to use the new dma agent will need
to alter ${LOCALBASE}/etc/nmh/mts.conf by hand by changing the mts
statement to mts: sendmail/pipe. The existing file is not altered when
pkg upgrade is invoked. However users of sendmail in base, sendmail
port, postfix, exim, and qmail are not affected by this and may use
their existing mts.conf.

The dma agent is not currently installed by default but users may install
it by enabling MK_DMAGENT in src.conf and building/installing 14-CURRENT
world. This patch allows nmh to work with dma agent when it is installed
and made to be the default MTA in /etc/mail/mailer.conf.
2022-02-06 20:55:24 -08:00

103 lines
2.9 KiB
Makefile

# Created by: Scott Blachowicz <scott+ports@sabami.seaslug.org>
PORTNAME= nmh
PORTVERSION= 1.7.1
PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= SAVANNAH
MAINTAINER= cy@FreeBSD.org
COMMENT= Cleaned up MH mailer suite
LICENSE= BSD3CLAUSE
USES= cpe gmake iconv ncurses readline shebangfix
SHEBANG_FILES= docs/contrib/ml docs/contrib/replyfilter docs/contrib/vpick
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --libdir=${PREFIX}/libexec/nmh \
--sysconfdir=${PREFIX}/etc \
--docdir=${DOCSDIR}
LIB_DEPENDS= libcurl.so:ftp/curl \
liblockfile.so:devel/liblockfile
OPTIONS_DEFINE= DOCS HASH_BKP SASL2 TLS REPLYFILTER
OPTIONS_RADIO= MIME_HTML
OPTIONS_SINGLE= MTS LOCKING
OPTIONS_SINGLE_MTS= SMTP SENDMAIL_SMTP SENDMAIL_PIPE
OPTIONS_SINGLE_LOCKING= DOT FCNTL FLOCK LOCKF
OPTIONS_RADIO_MIME_HTML= ELINKS LINKS LYNX W3M
SASL2_DESC= SASL2 support
SASL2_CONFIGURE_WITH= cyrus-sasl
SASL2_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
SASL2_LDFLAGS=-L${LOCALBASE}/lib
SASL2_CPPFLAGS=-I${LOCALBASE}/include
HASH_BKP_DESC= Use hash as backup prefix (default is a comma)
HASH_BKP_CONFIGURE_WITH= hash-backup
REPLYFILTER_DESC= Install dependencies for contrib/replyfilter
REPLYFILTER_RUN_DEPENDS= p5-MIME-Tools>=0:mail/p5-MIME-Tools \
p5-Mail-Tools>=0:mail/p5-Mail-Tools \
w3m>=0:www/w3m \
par>=0:textproc/par
SMTP_DESC= Use remote SMTP
SMTP_CONFIGURE_ON= --with-mts=smtp
SENDMAIL_SMTP_DESC= Use local sendmail (connect through socket)
SENDMAIL_SMTP_CONFIGURE_ON= --with-mts=sendmail/smtp
SENDMAIL_PIPE_DESC= Use local sendmail (connect through pipe)
SENDMAIL_PIPE_CONFIGURE_ON= --with-mts=sendmail/pipe
DOT_DESC= Dot file locking
DOT_CONFIGURE_ON= --with-locking=dot
FCNTL_DESC= fcntl() file locking
FCNTL_CONFIGURE_ON= --with-locking=fcntl
FLOCK_DESC= flock() file locking
FLOCK_CONFIGURE_ON= --with-locking=flock
LOCKF_DESC= lockf file locking
LOCKF_CONFIGURE_ON= --with-locking=lockf
# The reason for BUILD_DEPENDS is nmh detects and configures itself for
# whichever text-based browser is installed.
ELINKS_DESC= Install dependencies for www/elinks
ELINKS_BUILD_DEPENDS= elinks>=0:www/elinks
ELINKS_RUN_DEPENDS= elinks>=0:www/elinks
LINKS_DESC= Install dependencies for www/links
LINKS_BUILD_DEPENDS= links>=0:www/links
LINKS_RUN_DEPENDS= links>=0:www/links
LYNX_DESC= Install dependencies for www/lynx
LYNX_BUILD_DEPENDS= lynx>=0:www/lynx
LYNX_RUN_DEPENDS= lynx>=0:www/lynx
W3M_DESC= Install dependencies for www/w3m
W3M_BUILD_DEPENDS= w3m>=0:www/w3m
W3M_RUN_DEPENDS= w3m>=0:www/w3m
OPTIONS_DEFAULT= SENDMAIL_PIPE FLOCK W3M
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MTLS}
CONFIGURE_ARGS+= --with-tls
USES+= ssl
.else
CONFIGURE_ARGS+= --without-tls
.endif
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-debug
LDFLAGS+= -g
DEBUG_FLAGS+= -O0 -Wall -Wextra -g
.endif
CONFLICTS_INSTALL= ali ja-mh pixie p5-Dist-Joseki nmh-devel
post-install:
@${FIND} ${STAGEDIR}${ETCDIR} -type f -exec ${MV} {} {}-dist \;
.include <bsd.port.mk>