feat(vesuvio): add rspamd
This commit is contained in:
parent
dd9dd6d516
commit
92f3f0e0ca
5 changed files with 51 additions and 1 deletions
32
systems/vesuvio/mail/rspamd.nix
Normal file
32
systems/vesuvio/mail/rspamd.nix
Normal 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
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue