Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/maddy: Add listeners option #153372

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

nixos/maddy: Add listeners option #153372

wants to merge 1 commit into from

Conversation

onny
Copy link
Contributor

@onny onny commented Jan 3, 2022

Motivation for this change

Support configuring listening addresses and port configuration for Imap, Submission and Smtp.
Configuration interface will look like this:

services.maddy = {
  enable = true;
  openFirewall = true;
  tls = {
    loader = "file";
    certificates = [{
      keyPath = "/tmp/key.pem";
      certPath = "/tmp/cert.pem";
    }];
  };
  ensureAccounts = [ "postmaster@localhost" ];
  ensureCredentials = {
    # Do not use this in production. This will make passwords world-readable
    # in the Nix store
    "postmaster@localhost".passwordFile = "${pkgs.writeText "postmaster" "test"}";
  };
  listeners = [
    {
      type = "imap";
      bind_addresses = [
        {
          tls = true;
          port = 993;
          address = "0.0.0.0";
        };
        {
          port = 143;
          address = "0.0.0.0";
        };
      ];
      extraConfig = ''
        auth &local_authdb
        storage &local_mailboxes
      '';
    };
  ];
};
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@onny onny marked this pull request as draft January 3, 2022 18:50
@onny onny force-pushed the maddytls branch 2 times, most recently from 1a86386 to 0397773 Compare January 15, 2022 09:54
@stale stale bot added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md and removed 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md labels Jul 31, 2022
@McSinyx
Copy link
Member

McSinyx commented Jan 9, 2023

This is mentioned on nixos.wiki; should I wait for it or write TLS configuration by hand?

@onny
Copy link
Contributor Author

onny commented Feb 18, 2023

This is mentioned on nixos.wiki; should I wait for it or write TLS configuration by hand?

I'm looking forward to further enhance this but it's difficult. I'm using this on my server but no guarantee yet it's working as expected.

@onny onny force-pushed the maddytls branch 2 times, most recently from 5fe0b58 to 0b8f3b5 Compare April 16, 2023 08:41
@onny onny changed the title [DRAFT] nixos/maddy: Support TLS, listening address and port configuration [DRAFT] nixos/maddy: Add listener and port configuration Apr 25, 2023
@onny onny force-pushed the maddytls branch 3 times, most recently from 2f2d338 to 173f7e8 Compare April 25, 2023 11:51
@onny onny changed the title [DRAFT] nixos/maddy: Add listener and port configuration [DRAFT] nixos/maddy: Add listeners option May 3, 2023
@onny onny changed the title [DRAFT] nixos/maddy: Add listeners option nixos/maddy: Add listeners option May 3, 2023
@samip5
Copy link

samip5 commented Dec 18, 2023

How come this is still a draft?

@onny
Copy link
Contributor Author

onny commented Dec 18, 2023

this is a difficult change, haven't managed to finish it yet :(

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

4 participants