diff options
Diffstat (limited to 'ymir.nix')
-rw-r--r-- | ymir.nix | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -195,6 +195,10 @@ in rec { | |||
195 | ]; | 195 | ]; |
196 | allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh | 196 | allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh |
197 | ]; | 197 | ]; |
198 | |||
199 | interfaces.yggdrasil.allowedTCPPorts = | ||
200 | [ 11332 # rspamd | ||
201 | ]; | ||
198 | }; | 202 | }; |
199 | enableIPv6 = true; | 203 | enableIPv6 = true; |
200 | interfaces."ens3" = { | 204 | interfaces."ens3" = { |
@@ -1084,7 +1088,8 @@ in rec { | |||
1084 | enable = true; | 1088 | enable = true; |
1085 | workers = { | 1089 | workers = { |
1086 | controller = {}; | 1090 | controller = {}; |
1087 | rspamd_proxy = { | 1091 | external = { |
1092 | type = "rspamd_proxy"; | ||
1088 | bindSockets = [ | 1093 | bindSockets = [ |
1089 | { mode = "0660"; | 1094 | { mode = "0660"; |
1090 | socket = "/var/lib/postfix/queue/private/rspamd"; | 1095 | socket = "/var/lib/postfix/queue/private/rspamd"; |
@@ -1099,6 +1104,19 @@ in rec { | |||
1099 | } | 1104 | } |
1100 | ''; | 1105 | ''; |
1101 | }; | 1106 | }; |
1107 | internal = { | ||
1108 | type = "rspamd_proxy"; | ||
1109 | bindSockets = [ | ||
1110 | "ymir.niflheim.yggdrasil:11332" | ||
1111 | ]; | ||
1112 | extraConfig = '' | ||
1113 | upstream "local" { | ||
1114 | default = yes; | ||
1115 | self_scan = yes; | ||
1116 | id = "internal"; | ||
1117 | } | ||
1118 | ''; | ||
1119 | }; | ||
1102 | }; | 1120 | }; |
1103 | locals = { | 1121 | locals = { |
1104 | "milter_headers.conf".text = '' | 1122 | "milter_headers.conf".text = '' |
@@ -1149,6 +1167,15 @@ in rec { | |||
1149 | spam = true; | 1167 | spam = true; |
1150 | } | 1168 | } |
1151 | ''; | 1169 | ''; |
1170 | "settings.conf".text = '' | ||
1171 | internal { | ||
1172 | apply { | ||
1173 | actions { | ||
1174 | add_header = 10; | ||
1175 | } | ||
1176 | } | ||
1177 | } | ||
1178 | ''; | ||
1152 | }; | 1179 | }; |
1153 | }; | 1180 | }; |
1154 | 1181 | ||