exim: add SPF support

This commit is contained in:
pacien 2019-08-22 17:55:50 +02:00
parent 43a5bab9a5
commit f1ef419be3

View file

@ -3,6 +3,7 @@
, enableMySQL ? false, mysql, zlib , enableMySQL ? false, mysql, zlib
, enableAuthDovecot ? false, dovecot , enableAuthDovecot ? false, dovecot
, enablePAM ? false, pam , enablePAM ? false, pam
, enableSPF ? true, libspf2
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -18,7 +19,8 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional enableLDAP openldap ++ stdenv.lib.optional enableLDAP openldap
++ stdenv.lib.optionals enableMySQL [ mysql.connector-c zlib ] ++ stdenv.lib.optionals enableMySQL [ mysql.connector-c zlib ]
++ stdenv.lib.optional enableAuthDovecot dovecot ++ stdenv.lib.optional enableAuthDovecot dovecot
++ stdenv.lib.optional enablePAM pam; ++ stdenv.lib.optional enablePAM pam
++ stdenv.lib.optional enableSPF libspf2;
preBuild = '' preBuild = ''
sed ' sed '
@ -64,6 +66,10 @@ stdenv.mkDerivation rec {
s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam: s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam:
s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam: s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam:
''} ''}
${stdenv.lib.optionalString enableSPF ''
s:^# \(SUPPORT_SPF\)=.*:\1=yes:
s:^# \(LDFLAGS += -lspf2\):\1:
''}
#/^\s*#.*/d #/^\s*#.*/d
#/^\s*$/d #/^\s*$/d
' < src/EDITME > Local/Makefile ' < src/EDITME > Local/Makefile