From 279c3b1ee794ee17eb0d1d8f00e1f3139b639907 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 4 Jul 2014 12:51:23 +0000 Subject: [PATCH] Add new options for exim: - DMARC: experimental opendmarc support - REDIS: redis database lookup - OCSP: ocsp certificates stapling using openssl --- mail/exim/Makefile | 36 +++++++++++++++++++++++++++++++ mail/exim/files/patch-src::EDITME | 2 +- mail/exim/options | 6 ++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/mail/exim/Makefile b/mail/exim/Makefile index 9619c452f135..720be7843599 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -55,6 +55,22 @@ IGNORE= You cannot select both SA_KAS and SO_1024 options .endif .endif +# OCSP is supported for openssl only +.if ${PORT_OPTIONS:MOCSP} +.if ! ${PORT_OPTIONS:MTLS} +IGNORE= You cannot enable OCSP stapling without TLS support +.elif ${PORT_OPTIONS:MGNUTLS} +IGNORE= You cannot enable OCSP stapling with gnutls +.endif +.endif + +# DMARC implies SPF +.if ${PORT_OPTIONS:MOCSP} +.if ! ${PORT_OPTIONS:MSPF} || ! ${PORT_OPTIONS:MDKIM} +IGNORE= You cannot enable DMARC without SPF and DKIM support +.endif +.endif + .if ${PORT_OPTIONS:MSA_EXIM} || defined(FETCH_ALL) MASTER_SITES+= http://marc.merlins.org/linux/exim/files/:sa_exim \ SF/sa-exim/sa-exim/${SA_EXIM_VERSION}:sa_exim @@ -180,6 +196,18 @@ SEDLIST+= -e 's,^\# (EXPAND_LISTMATCH_RHS=),\1,' SEDLIST+= -e 's,^\# (EXPERIMENTAL_DCC=),\1,' .endif +.if ${PORT_OPTIONS:MOCSP} +SEDLIST+= -e 's,^\# (EXPERIMENTAL_OCSP=),\1,' +.endif + +.if ${PORT_OPTIONS:MDMARC} +LIB_DEPENDS+= libopendmarc.so:${PORTSDIR}/mail/opendmarc +SEDLIST+= -e 's,XX_DMARC_LIBS_XX,-lopendmarc,' \ + -e 's,^\# (EXPERIMENTAL_DMARC=),\1,' +.else +SEDLIST+= -e 's,XX_DMARC_LIBS_XX,,' +.endif + .if ${PORT_OPTIONS:MXCLIENT} EXTRA_PATCHES+= ${FILESDIR}/extra-patch-xclient .endif @@ -420,6 +448,14 @@ SEDLIST+= -e 's,XX_SQLITE_LIBS_XX,,' \ -e 's,XX_SQLITE_FLAGS_XX,,' .endif +.if ${PORT_OPTIONS:MREDIS} +LIB_DEPENDS+= libhiredis.so:${PORTSDIR}/databases/hiredis +SEDLIST+= -e 's,XX_REDIS_LIBS_XX,-lhiredis,' \ + -e 's,^\# (LOOKUP_REDIS=),\1,' +.else +SEDLIST+= -e 's,XX_REDIS_LIBS_XX,,' +.endif + .if ${PORT_OPTIONS:MLMTP} SEDLIST+= -e 's,^\# (TRANSPORT_LMTP=),\1,' .endif diff --git a/mail/exim/files/patch-src::EDITME b/mail/exim/files/patch-src::EDITME index 172c4bbbe056..1a0fcb3a3c30 100644 --- a/mail/exim/files/patch-src::EDITME +++ b/mail/exim/files/patch-src::EDITME @@ -123,7 +123,7 @@ # but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM # as well. +CFLAGS=XX_CFLAGS_XX XX_SPF_FLAGS_XX XX_SRS_FLAGS_XX XX_SQLITE_FLAGS_XX -+EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_ICONV_LIBS_XX XX_SPF_LIBS_XX XX_SRS_LIBS_XX XX_RADIUS_LIBS_XX XX_SQLITE_LIBS_XX ++EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_ICONV_LIBS_XX XX_SPF_LIBS_XX XX_SRS_LIBS_XX XX_RADIUS_LIBS_XX XX_SQLITE_LIBS_XX XX_DMARC_LIBS_XX XX_REDIS_LIBS_XX # # To use a name other than exim in the tcpwrappers config file, # e.g. if you're running multiple daemons with different access lists, diff --git a/mail/exim/options b/mail/exim/options index ca5e816272b5..c2e349236771 100644 --- a/mail/exim/options +++ b/mail/exim/options @@ -12,6 +12,7 @@ OPTIONS_DEFINE+= ALT_CONFIG_PREFIX \ DEBUG \ DISABLE_D_OPT \ DKIM \ + DMARC \ DNSDB \ DSEARCH \ EMBEDDED_PERL \ @@ -27,12 +28,14 @@ OPTIONS_DEFINE+= ALT_CONFIG_PREFIX \ MBX \ MYSQL \ NIS \ + OCSP \ OLD_DEMIME \ OPENLDAP \ PAM \ PASSWD \ PGSQL \ READLINE \ + REDIS \ SASLAUTHD \ SA_EXIM \ SO_1024 \ @@ -85,6 +88,7 @@ DAEMON_DESC= Install scripts to run as a daemon DCC_DESC= Enable DCC at ACL support via dccifd DISABLE_D_OPT_DESC= Disable macros overrides using option -D DKIM_DESC= Enable support for DKIM +DMARC_DESC= Enable DMARC support DNSDB_DESC= Enable DNS-style lookups DSEARCH_DESC= Enable directory-list lookups EMBEDDED_PERL_DESC= Enable embedded Perl interpreter @@ -101,10 +105,12 @@ MYSQL_DESC= Link against libmysqlclient library NIS_DESC= Enable NIS-style lookups OLD_DEMIME_DESC= Enable old, deprecated "demime" ACL OPENLDAP_DESC= Link against libldap +OCSP_DESC= Enable OCSP stapling PAM_DESC= Enable PAM authentication mechanisms PASSWD_DESC= Enable /etc/passwd lookups PGSQL_DESC= Link against libpq READLINE_DESC= Enable readline(3) library +REDIS_DESC= Enable redis lookup SASLAUTHD_DESC= Enable use of Cyrus SASL auth daemon SA_EXIM_DESC= SA-Exim support SO_1024_DESC= Build with Spamooborona-1024 local scan