Maddy: Difference between revisions

From NixOS Wiki
imported>Onny
Add infos about SSL certificates
imported>Onny
Add infos about inboxes and users
Line 28: Line 28:


== Configuration ==
== Configuration ==
=== Managing users and inboxes ===
Creating credentials and inboxes for a specific account. The first command creates the user <code>postmaster@example.org</code> and will prompt for a password.
<syntaxhighlight lang="console">
# maddyctl creds create postmaster@example.org
# maddyctl imap-acct create postmaster@example.org
</syntaxhighlight>


[[Category:Mail Server]]
[[Category:Mail Server]]

Revision as of 18:23, 2 August 2022

Maddy is a composable, modern mail server written in Go. It includes everything required to manage users, inboxes, send and receive mails while supporting all important secure protocols and standards.

Installation

Note: Following example describes the usage of an experimental module which is still being reviewed as an open PR and might not be ready for production.

The following example enables the Maddy mail server listening on mail delivery SMTP/Submission ports (25, 587) and IMAP/IMAPS ports (143/993) for mail clients to connect to. The server is configured to send and receive mails for the primary domain example.org.

/etc/nixos/configuration.nix
services.maddy = {
  enable = true;
  openFirewall = true;
  primaryDomain = "example.org";
  tls = {
    certPath = /var/lib/acme/example.org/example.org.crt;
    keyPath = /var/lib/acme/example.org/example.org.key;
  };
  imap = {
    port = 143;
    tlsEnable = true;
    tlsPort = 993;
  };
};
services.rspamd.enable = true;

TLS certificates can be obtained by using services like certbot or the acme service. Please reference their documentation on how to configure it to acquire the certificates.

Configuration

Managing users and inboxes

Creating credentials and inboxes for a specific account. The first command creates the user postmaster@example.org and will prompt for a password.

# maddyctl creds create postmaster@example.org
# maddyctl imap-acct create postmaster@example.org