rspamd: migrate redis to unix sockets
This commit is contained in:
parent
4e1cf47b7b
commit
a3e15cc105
|
@ -44,6 +44,7 @@ in
|
||||||
4190 # sieve
|
4190 # sieve
|
||||||
];
|
];
|
||||||
users.users.postfix.extraGroups = [ "opendkim" ];
|
users.users.postfix.extraGroups = [ "opendkim" ];
|
||||||
|
users.users.rspamd.extraGroups = [ "redis-rspamd" ];
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"dovecot/sieve-pipe/sa-learn-spam.sh" = {
|
"dovecot/sieve-pipe/sa-learn-spam.sh" = {
|
||||||
text = ''
|
text = ''
|
||||||
|
@ -287,8 +288,8 @@ in
|
||||||
locals = {
|
locals = {
|
||||||
"worker-controller.inc".source = config.sops.secrets."rspamd-password".path;
|
"worker-controller.inc".source = config.sops.secrets."rspamd-password".path;
|
||||||
"redis.conf".text = ''
|
"redis.conf".text = ''
|
||||||
read_servers = "127.0.0.1";
|
read_servers = "/run/redis-rspamd/redis.sock";
|
||||||
write_servers = "127.0.0.1";
|
write_servers = "/run/redis-rspamd/redis.sock";
|
||||||
'';
|
'';
|
||||||
# headers in spamassasin style to not break old sieve scripts
|
# headers in spamassasin style to not break old sieve scripts
|
||||||
"worker-proxy.inc".text = ''
|
"worker-proxy.inc".text = ''
|
||||||
|
@ -298,7 +299,7 @@ in
|
||||||
use = ["x-spam-level", "x-spam-status", "x-spamd-result", "authentication-results" ];
|
use = ["x-spam-level", "x-spam-status", "x-spamd-result", "authentication-results" ];
|
||||||
'';
|
'';
|
||||||
"neural.conf".text = ''
|
"neural.conf".text = ''
|
||||||
servers = "127.0.0.1:6379";
|
servers = "/run/redis-rspamd/redis.sock";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
'';
|
'';
|
||||||
"neural_group.conf".text = ''
|
"neural_group.conf".text = ''
|
||||||
|
@ -379,7 +380,6 @@ in
|
||||||
vmOverCommit = true;
|
vmOverCommit = true;
|
||||||
servers.rspamd = {
|
servers.rspamd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 6379;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
|
|
Loading…
Reference in a new issue