aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deploy/flake.lock4
-rw-r--r--flake.lock4
-rw-r--r--flakes/flake.lock2
-rw-r--r--systems/eldiron/mail/postfix.nix21
4 files changed, 25 insertions, 6 deletions
diff --git a/deploy/flake.lock b/deploy/flake.lock
index 1a775e0..79c30f7 100644
--- a/deploy/flake.lock
+++ b/deploy/flake.lock
@@ -2848,7 +2848,7 @@
2848 }, 2848 },
2849 "locked": { 2849 "locked": {
2850 "lastModified": 1, 2850 "lastModified": 1,
2851 "narHash": "sha256-cXBDS1gE5/zfanK80OBQiBkdiwjzqml3aCVLR4sVEog=", 2851 "narHash": "sha256-wgGXRUcqgv1CcOcAzNYt5NCPTd5mjpmMYSnqvbiAbKM=",
2852 "path": "../flakes", 2852 "path": "../flakes",
2853 "type": "path" 2853 "type": "path"
2854 }, 2854 },
@@ -3970,7 +3970,7 @@
3970 }, 3970 },
3971 "locked": { 3971 "locked": {
3972 "lastModified": 1, 3972 "lastModified": 1,
3973 "narHash": "sha256-5eJbs2yToP3TKAN7uqXd5SQ9Z0SNdy+QJpghsfDKk9o=", 3973 "narHash": "sha256-vgWXj75w5zgkOhHnd8QBD2poex/IzWfW75sH85aSPuA=",
3974 "path": "../systems/eldiron", 3974 "path": "../systems/eldiron",
3975 "type": "path" 3975 "type": "path"
3976 }, 3976 },
diff --git a/flake.lock b/flake.lock
index f123295..0262676 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2729,7 +2729,7 @@
2729 }, 2729 },
2730 "locked": { 2730 "locked": {
2731 "lastModified": 1, 2731 "lastModified": 1,
2732 "narHash": "sha256-cXBDS1gE5/zfanK80OBQiBkdiwjzqml3aCVLR4sVEog=", 2732 "narHash": "sha256-wgGXRUcqgv1CcOcAzNYt5NCPTd5mjpmMYSnqvbiAbKM=",
2733 "path": "./flakes", 2733 "path": "./flakes",
2734 "type": "path" 2734 "type": "path"
2735 }, 2735 },
@@ -3986,7 +3986,7 @@
3986 }, 3986 },
3987 "locked": { 3987 "locked": {
3988 "lastModified": 1, 3988 "lastModified": 1,
3989 "narHash": "sha256-5eJbs2yToP3TKAN7uqXd5SQ9Z0SNdy+QJpghsfDKk9o=", 3989 "narHash": "sha256-vgWXj75w5zgkOhHnd8QBD2poex/IzWfW75sH85aSPuA=",
3990 "path": "../systems/eldiron", 3990 "path": "../systems/eldiron",
3991 "type": "path" 3991 "type": "path"
3992 }, 3992 },
diff --git a/flakes/flake.lock b/flakes/flake.lock
index 9249d3a..07501c3 100644
--- a/flakes/flake.lock
+++ b/flakes/flake.lock
@@ -3890,7 +3890,7 @@
3890 }, 3890 },
3891 "locked": { 3891 "locked": {
3892 "lastModified": 1, 3892 "lastModified": 1,
3893 "narHash": "sha256-5eJbs2yToP3TKAN7uqXd5SQ9Z0SNdy+QJpghsfDKk9o=", 3893 "narHash": "sha256-vgWXj75w5zgkOhHnd8QBD2poex/IzWfW75sH85aSPuA=",
3894 "path": "../systems/eldiron", 3894 "path": "../systems/eldiron",
3895 "type": "path" 3895 "type": "path"
3896 }, 3896 },
diff --git a/systems/eldiron/mail/postfix.nix b/systems/eldiron/mail/postfix.nix
index 93d1e1e..ce7615d 100644
--- a/systems/eldiron/mail/postfix.nix
+++ b/systems/eldiron/mail/postfix.nix
@@ -235,6 +235,13 @@ in
235 in 235 in
236 ''testmail: "|${testmail}"''; 236 ''testmail: "|${testmail}"'';
237 mapFiles = let 237 mapFiles = let
238 transports = {
239 special_transport = pkgs.writeText "special-transport" ''
240 yahoo.com slowrate:
241 yahoo.fr slowrate:
242 laposte.net slowrate:
243 '';
244 };
238 virtual_map = { 245 virtual_map = {
239 virtual = let 246 virtual = let
240 cfg = config.myEnv.monitoring.email_check.eldiron; 247 cfg = config.myEnv.monitoring.email_check.eldiron;
@@ -272,7 +279,7 @@ in
272 )); 279 ));
273 }; 280 };
274 in 281 in
275 virtual_map // sasl_access; 282 virtual_map // sasl_access // transports;
276 config = { 283 config = {
277 ### postfix module overrides 284 ### postfix module overrides
278 readme_directory = "${pkgs.postfix}/share/postfix/doc"; 285 readme_directory = "${pkgs.postfix}/share/postfix/doc";
@@ -351,6 +358,17 @@ in
351 358
352 maximal_queue_lifetime = "6w"; 359 maximal_queue_lifetime = "6w";
353 bounce_queue_lifetime = "6w"; 360 bounce_queue_lifetime = "6w";
361
362 # Be nice to sensible domains
363 smtp_destination_rate_delay = "1s";
364 smtp_extra_recipient_limit = "10";
365
366 slowrate_destination_concurrency_limit = "1";
367 slowrate_destination_rate_delay = "10s";
368 slowrate_destination_recipient_limit = "1";
369 transport_maps = [
370 "hash:/etc/postfix/special_transport"
371 ];
354 }; 372 };
355 enable = true; 373 enable = true;
356 enableSmtp = true; 374 enableSmtp = true;
@@ -404,6 +422,7 @@ in
404 setSendmail = true; 422 setSendmail = true;
405 recipientDelimiter = "+"; 423 recipientDelimiter = "+";
406 masterConfig = { 424 masterConfig = {
425 slowrate = { command = "smtp"; };
407 submissions = { 426 submissions = {
408 type = "inet"; 427 type = "inet";
409 private = false; 428 private = false;