diff --git a/mail-server/rspamd.nix b/mail-server/rspamd.nix index f5a2d20..61700c3 100644 --- a/mail-server/rspamd.nix +++ b/mail-server/rspamd.nix @@ -87,6 +87,9 @@ in mode = "0666"; }]; includes = []; + extraConfig = '' + static_dir = "''${WWWDIR}"; # Serve the web UI static assets + ''; }; }; diff --git a/tests/intern.nix b/tests/intern.nix index 039f2e1..f96643c 100644 --- a/tests/intern.nix +++ b/tests/intern.nix @@ -81,5 +81,9 @@ import (pkgs.path + "/nixos/tests/make-test.nix") { $machine->waitUntilSucceeds("timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ \$? -eq 124 ]"); $machine->succeed("cat ${sendMail} | ${pkgs.netcat-gnu}/bin/nc localhost 25 | grep -q 'This account cannot receive emails'" ); }; + + subtest "rspamd controller serves web ui", sub { + $machine->succeed("${pkgs.curl}/bin/curl --unix-socket /run/rspamd/worker-controller.sock http://localhost/ | grep -q ''" ); + }; ''; }