feat(vesuvio): add rspamd

This commit is contained in:
uku 2025-01-08 00:44:41 +01:00
parent dd9dd6d516
commit 92f3f0e0ca
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
5 changed files with 51 additions and 1 deletions

View file

@ -2,5 +2,6 @@
imports = [
./maddy.nix
./mta-sts.nix
./rspamd.nix
];
}

View file

@ -62,7 +62,9 @@ in
## message reception
msgpipeline local_routing {
# TODO: checks (rspamd)
check {
rspamd
}
modify {
replace_rcpt &local_rewrites

View file

@ -0,0 +1,32 @@
{ config, _utils, ... }:
let
password = _utils.setupSingleSecret config "rspamdPassword" {
owner = config.services.rspamd.user;
inherit (config.services.rspamd) group;
};
in
{
imports = [ password.generate ];
services = {
redis.servers.rspamd = {
enable = true;
user = config.services.rspamd.user;
port = 0; # disable tcp
};
rspamd = {
enable = true;
locals = {
"redis.conf".text = ''
servers = ${config.services.redis.servers.rspamd.unixSocket};
'';
};
workers = {
controller.includes = [ password.path ];
normal.bindSockets = [ "127.0.0.1:11333" ]; # maddy queries port 11333
};
};
};
}