Merge pull request #93357 from helsinki-systems/feat/exim-dmarc

exim: add DMARC support
This commit is contained in:
Daniël de Kok 2020-07-26 08:32:46 +02:00 committed by GitHub
commit bf48c39e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,40 @@
{ stdenv, fetchFromGitHub, autoreconfHook, libmilter, perl, perlPackages, makeWrapper }:
stdenv.mkDerivation rec {
pname = "opendmarc";
version = "1.3.3";
src = fetchFromGitHub {
owner = "trusteddomainproject";
repo = "opendmarc";
rev = "rel-opendmarc-${builtins.replaceStrings [ "." ] [ "-" ] version}";
sha256 = "sha256-SQH85FLfVEEtYhR1+A1XxCDMiTjDgLQX6zifbLxCa5c=";
};
outputs = [ "bin" "dev" "out" "doc" ];
buildInputs = [ perl ];
nativeBuildInputs = [ autoreconfHook makeWrapper ];
postPatch = ''
substituteInPlace configure.ac --replace ' docs/Makefile' ""
patchShebangs contrib reports
'';
configureFlags = [
"--with-milter=${libmilter}"
];
postFixup = ''
for b in $bin/bin/opendmarc-{expire,import,params,reports}; do
wrapProgram $b --set PERL5LIB ${perlPackages.makeFullPerlPath (with perlPackages; [ Switch DBI DBDmysql HTTPMessage ])}
done
'';
meta = with stdenv.lib; {
description = "A free open source software implementation of the DMARC specification";
homepage = "http://www.trusteddomain.org/opendmarc/";
license = with licenses; [ bsd3 sendmail ];
maintainers = with maintainers; [ ajs124 das_j ];
};
}

View File

@ -4,6 +4,7 @@
, enableAuthDovecot ? false, dovecot
, enablePAM ? false, pam
, enableSPF ? true, libspf2
, enableDMARC ? true, opendmarc
}:
stdenv.mkDerivation rec {
@ -21,7 +22,8 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optionals enableMySQL [ libmysqlclient zlib ]
++ stdenv.lib.optional enableAuthDovecot dovecot
++ stdenv.lib.optional enablePAM pam
++ stdenv.lib.optional enableSPF libspf2;
++ stdenv.lib.optional enableSPF libspf2
++ stdenv.lib.optional enableDMARC opendmarc;
preBuild = ''
sed '
@ -71,6 +73,10 @@ stdenv.mkDerivation rec {
s:^# \(SUPPORT_SPF\)=.*:\1=yes:
s:^# \(LDFLAGS += -lspf2\):\1:
''}
${stdenv.lib.optionalString enableDMARC ''
s:^# \(SUPPORT_DMARC\)=.*:\1=yes:
s:^# \(LDFLAGS += -lopendmarc\):\1:
''}
#/^\s*#.*/d
#/^\s*$/d
' < src/EDITME > Local/Makefile

View File

@ -14258,6 +14258,8 @@ in
opencolorio = callPackage ../development/libraries/opencolorio { };
opendmarc = callPackage ../development/libraries/opendmarc { };
ois = callPackage ../development/libraries/ois {};
openh264 = callPackage ../development/libraries/openh264 { };