From f1ef419be34a773677b7408bb7b5db02c2d93699 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 22 Aug 2019 17:55:50 +0200 Subject: [PATCH] exim: add SPF support --- pkgs/servers/mail/exim/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/mail/exim/default.nix b/pkgs/servers/mail/exim/default.nix index a537a4c6d00c..25a94cd27bfa 100644 --- a/pkgs/servers/mail/exim/default.nix +++ b/pkgs/servers/mail/exim/default.nix @@ -3,6 +3,7 @@ , enableMySQL ? false, mysql, zlib , enableAuthDovecot ? false, dovecot , enablePAM ? false, pam +, enableSPF ? true, libspf2 }: stdenv.mkDerivation rec { @@ -18,7 +19,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableLDAP openldap ++ stdenv.lib.optionals enableMySQL [ mysql.connector-c zlib ] ++ stdenv.lib.optional enableAuthDovecot dovecot - ++ stdenv.lib.optional enablePAM pam; + ++ stdenv.lib.optional enablePAM pam + ++ stdenv.lib.optional enableSPF libspf2; preBuild = '' sed ' @@ -64,6 +66,10 @@ stdenv.mkDerivation rec { s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam: s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam: ''} + ${stdenv.lib.optionalString enableSPF '' + s:^# \(SUPPORT_SPF\)=.*:\1=yes: + s:^# \(LDFLAGS += -lspf2\):\1: + ''} #/^\s*#.*/d #/^\s*$/d ' < src/EDITME > Local/Makefile