lobon (Mailman-VM) #30
No reviewers
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Fachschaft/nixConfig!30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Gonne/nixConfig:lobon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mailman in einer eigenen VM. Die Mailinglisten enden jetzt auf @lists.mathebau.de.
Ausstehend zum Live-Betrieb sind noch:
Basiert auf https://gitea.mathebau.de/Fachschaft/nixConfig/pulls/26.
@ -0,0 +53,4 @@environment.persistence.${config.impermanence.name} = {directories = ["/var/lib/acme" # Persist TLS keys and accountTODO: Backups?
Done for mailman data. The certificates can be regenerated on hardware failure.
1bd62a3d9fto1b8909b6b41b8909b6b4to41c99daad09bd6258cfeto2ba64b55c12ba64b55c1to7b835efd467b835efd46to8f7ab3e36b8f7ab3e36btoa89dab0dbda89dab0dbdto2673d101fb2673d101fbto5250a0fc93WIP: lobon (Mailman-VM)to lobon (Mailman-VM)Seems to work now.
5250a0fc93to6009971ff56009971ff5to3a1e670c283a1e670c28toeaf90b9a4aeaf90b9a4ato4d965ba3944d965ba394todcc055891fI decided to include all of mailman's persistent state in the backups to include archives.
dcc055891fto354488c38d354488c38dto45a20b7f52@ -0,0 +1,39 @@allowlistPass: ENC[AES256_GCM,data:bb9jXSvWeDnZqqiY/IarwA==,iv:qeFAYvXYdh2uEleg8kpCd77u4PTbwM8ydEkbMhyPz1I=,tag:1/eysyZb2mJ0mYHXIrpihw==,type:str]See comment on the other sops file.
@ -0,0 +1,39 @@backupKey: ENC[AES256_GCM,data:/PErHUVZDTyqK+GKI2inDoEBQpSmezeBTgXWnrthc8IPtUFn4Ur2CkDo+MqfiAlSn9vT2ksHmyS5qmoGANG01e1Cm50qpt/BdoC2hh15jOVuc0uUBNOq7f5YBVeYtbemwjPcmbF7dgUeRlEAvxhqtX3/ntzxSB1inew/SsEgPrU4Yl0FF+CHhqgbeB/NJOhQY29/3hBGwMksfTUDymUmX6pUgIN1M26crIKFCn5IyqAXl10F+zL4PThZPnhmks7Y8BsGUbKkiE6ghdaUjEjBjGOGgbaGAjolG+nJ17xyM1Pc2speT4E/3VgAC34dpaByveGcf2SfsXir0KavcI86mUkjzaNF9u7GjGO0Szn742/aqbdUoOkJl41unb0Enf2/D4Up3fy6LrUqVqrHIM4Dea9WLQd0poD0FWSN12IKh+ylkouMkmhwLXUXFzIHOePS92/MsPM+9fLhH4cU64qxr9UzmfYRnNBpAHrjlxdkK9WZ1Oj4mdtu6R20vYkYcMIQgU38FvSN6uWGvPxJj+Ij,iv:ghvgkC6qFO/0tvsc7igCoZy7am8eNsd21WYCSAKiZDs=,tag:MFnk/Nnw+cloN+x7sd4LLg==,type:str]Hmm, I didn't have thought about the following:
Which secrets get different sops files and which go into the same file?
can we put both of this secrets into the same yaml, is this desirable?
I think splitting per desired system user is useful (might even be necessary). Apart from that it feels more about conventions which I don't know.
Currently the secrets are used by
rootandmailmanbut giving the backup serviceroot-access in itself feels like a mistake.refactoring the backup process sounds like something, that we should do uniform across all VM. So I think we should do that
in a dedicated pull request. I will open an issue for that. Finding a solution for this is probably out of scope here.
@ -0,0 +93,4 @@serviceConfig = {Type = "oneshot";User = "mailman";PrivateTmp = true;can we set
NoNewPrivileges = true;? or does it break the service?And one could read the Sandboxing part of
systemd.exec(5)Yes, I added a bunch of them in
f334e00d01that seemed reasonable and don't break the updater. Notably, I left outExecPaths=andNoExecPaths=because the correct values are unclear to me.@ -0,0 +113,4 @@};repo = "borg@192.168.1.11:lobon"; # TODO for https://gitea.mathebau.de/Fachschaft/nixConfig/issues/33startAt = "daily";user = "root";This is probably a bigger refactoring pull request and outside the scope of this one.
We could think making it easier configurable that backups are made by a user that can
basically read everything but not write.
6b0a230d7etof2b83cf5d8f2b83cf5d8to4b684bc1e64b684bc1e6tof334e00d01f334e00d01to146a904259146a904259tod03291bb5dd03291bb5dtod2ed09dfd1d2ed09dfd1to12013c90b712013c90b7to27a70518bc27a70518bcto55ba2c9122It is more like, please answer my questions (and depending what the answers is, change some minor stuff), and
not really, request changes, but I only have limited options
@ -0,0 +17,4 @@options.services.mathebau-mailman = {enable = mkEnableOption "mathebau mailman service";hostName = mkOption {type = str;are these allowed to be empty?
Probably not. No idea how to achieve that.
there is
lib.types.nonEmptyStr@ -0,0 +20,4 @@type = str;};siteOwner = mkOption {type = str;same as above?
@ -0,0 +35,4 @@transport_maps = ["hash:/var/lib/mailman/data/postfix_lmtp"];local_recipient_maps = ["hash:/var/lib/mailman/data/postfix_lmtp"];proxy_interfaces = "130.83.2.184";smtputf8_enable = "no"; # HRZ does not know SMTPUTF8m(
@ -0,0 +49,4 @@settings.mta.verp_confirmations = "no";};nginx.virtualHosts.${cfg.hostName} = {enableACME = true; # Get certificates (primarily for postfix)I'm not sure how to stand on this, and it is a purely idiomatic question (not a technical one).
If we want the certs mainly for non nginx use, should we config them separately and not in the nginx block?
Also how does the webinterface work, are we proxied by cthulhu? If yes who handles tls certs?
“Automatic cert validation and configuration for Apache and Nginx virtual hosts is included in NixOS, however if you would like to generate a wildcard cert or you are not using a web server you will have to configure DNS based validation.” – https://nixos.org/manual/nixos/stable/index.html#module-security-acme
I don't want to do DNS validation so this is the way. The
services.mailman.serve.enable = trueenables nginx anyway.Web requests get proxied through cthulhu and reach this VM via http. Mail gets proxied via eihort and also probably reaches this VM in plaintext (possibly with STARTTLS).
On the other hand this VM is not supposed to be communicating with anything besides cthulhu and eihort so we might as well try to disable all TLS stuff.
@ -0,0 +60,4 @@"/var/lib/mailman""/var/lib/mailman-web"];files = ["/root/.ssh/known_hosts"]; # for the backup server bragiwe could move this to the general vm role, right? Every vm makes backups this way, (or am i missing something?)
Maybe. This is in scope for the backup refactoring.
@ -0,0 +66,4 @@security.acme.defaults.email = cfg.siteOwner;security.acme.acceptTerms = true;networking.firewall.allowedTCPPorts = [25 80 443];See above comment about who handles tls, we might not need 443 and 80
@ -0,0 +89,4 @@${pkgs.curl}/bin/curl https://www-cgi.hrz.tu-darmstadt.de/mail/whitelist-update.php -F emaildomain=${cfg.hostName} -F password=$(cat /run/secrets/allowlistPass) -F emailliste=@/tmp/addresses -F meldungen=voll# Cleanuprm /tmp/addresses'';I love and hate this so much,maybe we should/could make this script its own package? maybe idiomatically correct but overkill.
I think it's overkill and I don't want to do it.
55ba2c9122todf5e743d3fdf5e743d3fto081b9a9d34I disabled all TLS on this machine.
There was also a change to postfix, to change encryption to may