13ae92913SPeter Wemm
2c6063d0dSWarner Losh.include <src.opts.mk>
3e1fe3dbaSRuslan Ermilov
4e1fe3dbaSRuslan Ermilov.if ${MK_MAILWRAPPER} != "no"
53ae92913SPeter WemmPROG=	mailwrapper
6345e52e7SRuslan ErmilovMAN=	mailwrapper.8
78b081eaaSBaptiste Daroussin
88b081eaaSBaptiste DaroussinLIBADD=	util
92632dac8SPeter Wemm.endif
103ae92913SPeter Wemm
113467e28fSBaptiste Daroussin.if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no" || ${MK_DMAGENT} != "no"
12ce9f2d31SRodney W. GrimesSYMLINKS=	../sbin/mailwrapper /usr/bin/mailq \
13ce9f2d31SRodney W. Grimes		../sbin/mailwrapper /usr/bin/newaliases \
14ce9f2d31SRodney W. Grimes		mailwrapper /usr/sbin/hoststat \
15ce9f2d31SRodney W. Grimes		mailwrapper /usr/sbin/purgestat \
16ce9f2d31SRodney W. Grimes		mailwrapper /usr/sbin/sendmail
173ae92913SPeter Wemm
18a67b925fSBaptiste Daroussin.if ${MK_MAILWRAPPER} == "no" && ${MK_DMAGENT} != "no"
193467e28fSBaptiste DaroussinSYMLINKS+=	../libexec/dma ${BINDIR}/mailwrapper
20a67b925fSBaptiste Daroussin.elif ${MK_MAILWRAPPER} == "no" && ${MK_DMAGENT} == "no" && ${MK_SENDMAIL} != "no"
21a67b925fSBaptiste DaroussinSYMLINKS+=	../libexec/sendmail/sendmail ${BINDIR}/mailwrapper
222632dac8SPeter Wemm.endif
23ef271e58SJohan Karlsson.endif
242632dac8SPeter Wemm
254f6fbcd5SMark Murray.if ${MK_MAILWRAPPER} != "no" && ${MK_SENDMAIL} == "no"
26ce9f2d31SRodney W. GrimesSYMLINKS+=	..${BINDIR}/mailwrapper /bin/rmail
274f6fbcd5SMark Murray.endif
284f6fbcd5SMark Murray
29a67b925fSBaptiste Daroussin.if ${MK_SENDMAIL} != "no"
30a67b925fSBaptiste DaroussinFILES=		${SRCTOP}/etc/mail/mailer.conf
31a67b925fSBaptiste DaroussinFILESDIR=	${SHAREDIR}/examples/sendmail
32*431b9b66SEmmanuel VadotFILESPACKAGE=	sendmail
33a67b925fSBaptiste Daroussin.endif
34a67b925fSBaptiste Daroussin
35e1fe3dbaSRuslan Ermilov.if ${MK_MAILWRAPPER} != "no"
36a67b925fSBaptiste Daroussin# We install here if either dma(8) is enabled, or sendmail(8) isn't.  In the
37cb99e935SKyle Evans# latter scenario, we take care of the possibility that neither sendmail(8) nor
38cb99e935SKyle Evans# dma(8) are installed and simply provide a default that can be changed for an
39cb99e935SKyle Evans# alternative in ports.
40a67b925fSBaptiste Daroussin.if ${MK_DMAGENT} != "no" || ${MK_SENDMAIL} == "no"
41a67b925fSBaptiste DaroussinCONFS=		${SRCTOP}/libexec/dma/dmagent/mailer.conf
42a67b925fSBaptiste Daroussin.else
4370448a54SKyle EvansCONFS=		${SRCTOP}/etc/mail/mailer.conf
44a67b925fSBaptiste Daroussin.endif
4570448a54SKyle EvansCONFSDIR=	/etc/mail
4670448a54SKyle EvansCONFSMODE=	644
470e61e4ddSTim Vanderhoek.endif
4844ba071eSPeter Wemm
493ae92913SPeter Wemm.include <bsd.prog.mk>
50