hainich/mail: remove mailman

keep-around/8e3cc9350360775f999b22455223a5a08736bb12
hexchen 2020-12-10 12:40:44 +00:00
parent 6875f2957d
commit 8e3cc93503
1 changed files with 5 additions and 59 deletions

View File

@ -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";