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…
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 #26.
@ -0,0 +53,4 @@
environment.persistence.${config.impermanence.name} = {
directories = [
"/var/lib/acme" # Persist TLS keys and account
TODO: Backups?
Done for mailman data. The certificates can be regenerated on hardware failure.
1bd62a3d9f
to1b8909b6b4
1b8909b6b4
to41c99daad0
9bd6258cfe
to2ba64b55c1
2ba64b55c1
to7b835efd46
7b835efd46
to8f7ab3e36b
8f7ab3e36b
toa89dab0dbd
a89dab0dbd
to2673d101fb
2673d101fb
to5250a0fc93
WIP: lobon (Mailman-VM)to lobon (Mailman-VM)Seems to work now.
5250a0fc93
to6009971ff5
6009971ff5
to3a1e670c28
3a1e670c28
toeaf90b9a4a
eaf90b9a4a
to4d965ba394
4d965ba394
todcc055891f
I decided to include all of mailman's persistent state in the backups to include archives.
dcc055891f
to354488c38d
354488c38d
to45a20b7f52
@ -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
root
andmailman
but 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
f334e00d01
that 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/33
startAt = "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.
6b0a230d7e
tof2b83cf5d8
f2b83cf5d8
to4b684bc1e6
4b684bc1e6
tof334e00d01
f334e00d01
to146a904259
146a904259
tod03291bb5d
d03291bb5d
tod2ed09dfd1
d2ed09dfd1
to12013c90b7
12013c90b7
to27a70518bc
27a70518bc
to55ba2c9122
It 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 SMTPUTF8
m(
@ -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 = true
enables 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 bragi
we 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
# Cleanup
rm /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.
55ba2c9122
todf5e743d3f
df5e743d3f
to081b9a9d34
I disabled all TLS on this machine.
There was also a change to postfix, to change encryption to may