feat: refactor domain whitelist in rspamd.nix
This update introduces a more efficient way for managing whitelisted domains in rspamd.nix. Instead of repeating the list of domains across multiple configurations, the domains are now defined only once in a dedicated variable. This improves the maintainability and readability of the code.
This commit is contained in:
parent
7b06c9446c
commit
ff726a73c9
|
@ -1,4 +1,14 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
domains = ''
|
||||
epicgames.com
|
||||
dmail.ai
|
||||
twitter.com
|
||||
x.com
|
||||
gmx.de
|
||||
chess.com
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.rspamd.workers.controller.bindSockets = [{
|
||||
socket = "/run/rspamd/worker-controller.sock";
|
||||
|
@ -17,34 +27,10 @@
|
|||
}
|
||||
}
|
||||
'';
|
||||
"maps.d/spf_whitelist.inc.local".text = ''
|
||||
epicgames.com
|
||||
dmail.ai
|
||||
twitter.com
|
||||
x.com
|
||||
gmx.de
|
||||
'';
|
||||
"maps.d/spf_dkim_whitelist.inc.local".text = ''
|
||||
epicgames.com
|
||||
dmail.ai
|
||||
twitter.com
|
||||
x.com
|
||||
gmx.de
|
||||
'';
|
||||
"maps.d/dmarc_whitelist.inc.local".text = ''
|
||||
epicgames.com
|
||||
dmail.ai
|
||||
twitter.com
|
||||
x.com
|
||||
gmx.de
|
||||
'';
|
||||
"greylist-whitelist-domains.inc".text = ''
|
||||
dmail.ai
|
||||
epicgames.com
|
||||
twitter.com
|
||||
x.com
|
||||
gmx.de
|
||||
'';
|
||||
"maps.d/spf_whitelist.inc.local".text = domains;
|
||||
"maps.d/spf_dkim_whitelist.inc.local".text = domains;
|
||||
"maps.d/dmarc_whitelist.inc.local".text = domains;
|
||||
"greylist-whitelist-domains.inc".text = domains;
|
||||
};
|
||||
services.rspamd.extraConfig = ''
|
||||
actions {
|
||||
|
|
Loading…
Reference in a new issue