diff options
Diffstat (limited to 'hosts/cloud/bkk/jmap.nix')
-rw-r--r-- | hosts/cloud/bkk/jmap.nix | 77 |
1 files changed, 74 insertions, 3 deletions
diff --git a/hosts/cloud/bkk/jmap.nix b/hosts/cloud/bkk/jmap.nix index ec28999..bb1fd90 100644 --- a/hosts/cloud/bkk/jmap.nix +++ b/hosts/cloud/bkk/jmap.nix @@ -8,11 +8,82 @@ in { services.stalwart-mail = { enable = true; settings = { + authentication.fallback-admin = { + user = "admin"; + secret = "xdxdxdxd"; + }; server = { hostname = domain; - run-as = { - user = "y"; - group = "users"; + # run-as = { + # user = "y"; + # group = "users"; + # }; + http.use-x-forwarded = true; + tls = { + enable = true; + certificate = "default"; + implicit = false; + }; + + listener = { + "imap" = { + bind = ["[::]:143"]; + protocol = "imap"; + tls.implicit = false; + }; + "imaps" = { + bind = ["[::]:993"]; + protocol = "imap"; + tls.implicit = true; + }; + "smtp" = { + bind = ["[::]:25"]; + protocol = "smtp"; + tls.implicit = false; + }; + "smtp-sub" = { + bind = ["[::]:587"]; + protocol = "smtp"; + tls.implicit = false; + }; + "smtps-sub" = { + bind = ["[::]:465"]; + protocol = "smtp"; + tls.implicit = true; + }; + "http" = { + bind = ["127.0.0.1:8080"]; + protocol = "http"; + # tls.implicit = true; + }; + "sieve" = { + bind = ["[::]:4190"]; + protocol = "managesieve"; + tls.implicit = true; + }; + }; + session = { + rcpt.directory = "in-memory"; + auth = { + mechanisms = ["PLAIN"]; + directory = "in-memory"; + }; + }; + jmap.directory = "in-memory"; + directory."in-memory" = { + type = "memory"; + users = [ + { + name = "alice"; + secret = "foobar"; + email = ["alice@urbit.men"]; + } + { + name = "bob"; + secret = "foobar"; + email = ["bob@urbit.men"]; + } + ]; }; }; }; |