From 8e3cc9350360775f999b22455223a5a08736bb12 Mon Sep 17 00:00:00 2001 From: hexchen Date: Thu, 10 Dec 2020 12:40:44 +0000 Subject: [PATCH] hainich/mail: remove mailman --- configuration/hosts/hainich/services/mail.nix | 64 ++----------------- 1 file changed, 5 insertions(+), 59 deletions(-) diff --git a/configuration/hosts/hainich/services/mail.nix b/configuration/hosts/hainich/services/mail.nix index 3e69b5b..9482559 100644 --- a/configuration/hosts/hainich/services/mail.nix +++ b/configuration/hosts/hainich/services/mail.nix @@ -116,67 +116,13 @@ virusScanning = false; }; services.postfix.submissionOptions.smtpd_sender_restrictions = "reject_non_fqdn_sender,reject_unknown_sender_domain,permit"; - services.postfix.virtual = ''@4future.dev @hacc.space -@4futu.re @hacc.space -@hacc.earth @hacc.space -contact@hacc.space info@hacc.space''; - - #mailman - services.postfix = { - relayDomains = ["hash:/var/lib/mailman/data/postfix_domains"]; - config = { - transport_maps = ["hash:/var/lib/mailman/data/postfix_lmtp"]; - local_recipient_maps = ["hash:/var/lib/mailman/data/postfix_lmtp"]; - inet_protocols = "ipv4, ipv6"; - }; - }; - - services.mailman = { - enable = true; - siteOwner = "admin@hacc.space"; - webUser = config.services.uwsgi.user; - hyperkitty.enable = true; - # Have mailman talk directly to hyperkitty, bypassing nginx: - hyperkitty.baseUrl = "http://localhost:33141/hyperkitty/"; - webHosts = [ "lists.hacc.space" ]; - }; - - systemd.services.uwsgi.restartTriggers = [ - config.environment.etc."mailman3/settings.py".source - ]; - - systemd.services.mailman-settings.script = '' - chmod o+x /var/lib/mailman-web + services.postfix.virtual = '' + @4future.dev @hacc.space + @4futu.re @hacc.space + @hacc.earth @hacc.space + contact@hacc.space info@hacc.space ''; - services.uwsgi = { - enable = true; - plugins = ["python3"]; - instance = { - type = "normal"; - # uwsgi protocol socket for nginx - socket = "127.0.0.1:33140"; - pythonPackages = self: with self; [ mailman-web ]; - # http socket for mailman core to reach the hyperkitty API directly - http-socket = "127.0.0.1:33141"; - wsgi-file = "${pkgs.python3.pkgs.mailman-web}/lib/python3.8/site-packages/mailman_web/wsgi.py"; - chdir = "/var/lib/mailman-web"; - master = true; - processes = 4; - vacuum = true; - }; - }; - - services.nginx.virtualHosts."lists.hacc.space" = { - enableACME = true; - forceSSL = true; - locations."/static/".alias = "/var/lib/mailman-web-static/"; - locations."/".extraConfig = '' - uwsgi_pass 127.0.0.1:33140; - include ${config.services.nginx.package}/conf/uwsgi_params; - ''; - }; - systemd.services.alps = { enable = true; script = "${pkgs.alps}/bin/alps -theme alps imaps://mail.hacc.space:993 smtps://mail.hacc.space:465";