Stalwart: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
== Setup == | == Setup == | ||
The following example enables the Stalwart mail server for the domain ''example.org'', listening on mail delivery SMTP/Submission (<code>25, 465</code>), IMAPS (<code>993</code>) and JMAP ports (8080/443) for mail clients to connect to. Mailboxes for the accounts <code>postmaster@example.org</code> and <code>user1@example.org</code> get created if they don't exist yet.{{Note|Parts of this module are not yet stable will be available with the upcoming NixOS release 24.11.}}{{file|/etc/nixos/configuration.nix|nix|3=services.stalwart-mail = { | The following example enables the Stalwart mail server for the domain ''example.org'', listening on mail delivery SMTP/Submission (<code>25, 465</code>), IMAPS (<code>993</code>) and JMAP ports (8080/443) for mail clients to connect to. Mailboxes for the accounts <code>postmaster@example.org</code> and <code>user1@example.org</code> get created if they don't exist yet.{{Note|Parts of this module are not yet stable will be available with the upcoming NixOS release 24.11.}}{{file|/etc/nixos/configuration.nix|nix|3=environment.etc = { | ||
"stalwart/mail-pw1".text = "foobar"; | |||
"stalwart/mail-pw2".text = "foobar"; | |||
"stalwart/acme-secret".text = "secret123"; | |||
}; | |||
services.stalwart-mail = { | |||
enable = true; | enable = true; | ||
package = pkgs.stalwart-mail; | package = pkgs.stalwart-mail; | ||
Line 47: | Line 53: | ||
domains = [ "example.org" ]; | domains = [ "example.org" ]; | ||
provider = "cloudflare"; | provider = "cloudflare"; | ||
secret = " | secret = "%{file:/etc/stalwart/acme-secret}%"; | ||
}; | }; | ||
session.auth = { | session.auth = { | ||
Line 63: | Line 69: | ||
class = "admin"; | class = "admin"; | ||
name = "User 1"; | name = "User 1"; | ||
secret = " | secret = "%{file:/etc/stalwart/mail-pw1}%"; | ||
email = [ "user1@example.org" ]; | email = [ "user1@example.org" ]; | ||
} | } | ||
Line 69: | Line 75: | ||
class = "individual"; | class = "individual"; | ||
name = "postmaster"; | name = "postmaster"; | ||
secret = " | secret = "%{file:/etc/stalwart/mail-pw1}%"; | ||
email = [ "postmaster@example.org" ]; | email = [ "postmaster@example.org" ]; | ||
} | } |