Compare commits

...

3 commits

Author SHA1 Message Date
Kaz Wesley
177daedc4d Merge branch 'cross-compatible' into 'master'
fix for cross-compile

See merge request simple-nixos-mailserver/nixos-mailserver!245
2024-03-13 14:08:49 +00:00
Christian Theune
572c1b4d69 rspamd: fix duplicate and syntactically wrong header settings
Fixes #280
2024-03-08 14:52:52 +01:00
Kaz Wesley
c3737f28f2 fix for cross-compile 2021-10-07 21:41:32 -07:00
2 changed files with 20 additions and 25 deletions

View file

@ -43,22 +43,25 @@ let
stateDir = "/var/lib/dovecot"; stateDir = "/var/lib/dovecot";
pipeBin = pkgs.stdenv.mkDerivation { pipeBin_ = { makeWrapper, coreutils, bash, rspamd }:
name = "pipe_bin"; pkgs.stdenv.mkDerivation {
src = ./dovecot/pipe_bin; name = "pipe_bin";
buildInputs = with pkgs; [ makeWrapper coreutils bash rspamd ]; src = ./dovecot/pipe_bin;
buildCommand = '' nativeBuildInputs = [ makeWrapper ];
mkdir -p $out/pipe/bin buildInputs = [ coreutils bash rspamd ];
cp $src/* $out/pipe/bin/ buildCommand = ''
chmod a+x $out/pipe/bin/* mkdir -p $out/pipe/bin
patchShebangs $out/pipe/bin cp $src/* $out/pipe/bin/
chmod a+x $out/pipe/bin/*
patchShebangs $out/pipe/bin
for file in $out/pipe/bin/*; do for file in $out/pipe/bin/*; do
wrapProgram $file \ wrapProgram $file \
--set PATH "${pkgs.coreutils}/bin:${pkgs.rspamd}/bin" --set PATH "${coreutils}/bin:${rspamd}/bin"
done done
''; '';
}; };
pipeBin = pkgs.callPackage pipeBin_ { };
ldapConfig = pkgs.writeTextFile { ldapConfig = pkgs.writeTextFile {
@ -96,7 +99,7 @@ let
}; };
genPasswdScript = pkgs.writeScript "generate-password-file" '' genPasswdScript = pkgs.writeScript "generate-password-file" ''
#!${pkgs.stdenv.shell} #!${pkgs.runtimeShell}
set -euo pipefail set -euo pipefail

View file

@ -30,7 +30,7 @@ in
inherit debug; inherit debug;
locals = { locals = {
"milter_headers.conf" = { text = '' "milter_headers.conf" = { text = ''
extended_spam_headers = yes; extended_spam_headers = true;
''; }; ''; };
"redis.conf" = { text = '' "redis.conf" = { text = ''
servers = "${cfg.redis.address}:${toString cfg.redis.port}"; servers = "${cfg.redis.address}:${toString cfg.redis.port}";
@ -69,14 +69,6 @@ in
''; }; ''; };
}; };
overrides = {
"milter_headers.conf" = {
text = ''
extended_spam_headers = true;
'';
};
};
workers.rspamd_proxy = { workers.rspamd_proxy = {
type = "rspamd_proxy"; type = "rspamd_proxy";
bindSockets = [{ bindSockets = [{