Compare commits

..

2 commits

Author SHA1 Message Date
Janik Haag 991578a87b
wip: feat(mail): init host and module 2024-09-25 01:01:34 +02:00
Maxine Aubrey 8d95d1f850
fix(dns): dnsimple expects FQDNs in CNAMEs
DNSimple doesn't appear to follow the typical behaviour of appending the
domain unless the CNAME is terminated with `.`

To avoid further problems, let's just explicilty use the FQDN for all
CNAMEs.

https://support.dnsimple.com/articles/cname-record/

For comparison:
```
;; ANSWER SECTION:
alerts.forkos.org.	300	IN	CNAME	meta01.infra.p.
```

```
;; ANSWER SECTION:
alerts.forkos.org.	181	IN	CNAME	meta01.infra.p.forkos.org.
meta01.infra.p.forkos.org. 181	IN	A	163.172.69.160
```
2024-09-24 23:11:28 +02:00
2 changed files with 22 additions and 22 deletions

View file

@ -11,7 +11,7 @@ in {
config = mkIf cfg.enable {
mailserver = {
enable = true;
fqdn = "mail.forkos.org";
fqdn = "mail.infra.forkos.org";
domains = [
"vzfdfp.de"
];

View file

@ -96,24 +96,24 @@ in
(dualProxyRecords "buildbot.infra" 300 "AAAA" "2001:bc8:38ee:100:1000::50")
(dualProxyRecords "public01.infra" 300 "AAAA" "2001:bc8:38ee:100:1000::60")
(record "cl" 300 "CNAME" "gerrit01.infra.p")
(record "fodwatch" 300 "CNAME" "fodwatch.infra.p")
(record "cl" 300 "CNAME" "gerrit01.infra.p.forkos.org")
(record "fodwatch" 300 "CNAME" "fodwatch.infra.p.forkos.org")
# git.p.forkos.org is the proxy variant of the Forgejo server.
(record "git" 300 "CNAME" "git.p")
(record "netbox" 300 "CNAME" "meta01.infra.p")
(record "amqp" 300 "CNAME" "bagel-box.infra.p")
(record "grafana" 300 "CNAME" "meta01.infra.p")
(record "hydra" 300 "CNAME" "build-coord.wob01.infra.p")
(record "loki" 300 "CNAME" "meta01.infra.p")
(record "mimir" 300 "CNAME" "meta01.infra.p")
(record "pyroscope" 300 "CNAME" "meta01.infra.p")
(record "tempo" 300 "CNAME" "meta01.infra.p")
(record "matrix" 300 "CNAME" "meta01.infra.p")
(record "alerts" 300 "CNAME" "meta01.infra.p")
(record "buildbot" 300 "CNAME" "buildbot.infra.p")
(record "b" 300 "CNAME" "public01.infra.p")
(record "postgres" 300 "CNAME" "bagel-box.infra.p")
(record "news" 3600 "CNAME" "public01.infra.p")
(record "git" 300 "CNAME" "git.p.forkos.org")
(record "netbox" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "amqp" 300 "CNAME" "bagel-box.infra.p.forkos.org")
(record "grafana" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "hydra" 300 "CNAME" "build-coord.wob01.infra.p.forkos.org")
(record "loki" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "mimir" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "pyroscope" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "tempo" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "matrix" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "alerts" 300 "CNAME" "meta01.infra.p.forkos.org")
(record "buildbot" 300 "CNAME" "buildbot.infra.p.forkos.org")
(record "b" 300 "CNAME" "public01.infra.p.forkos.org")
(record "postgres" 300 "CNAME" "bagel-box.infra.p.forkos.org")
(record "news" 3600 "CNAME" "public01.infra.p.forkos.org")
# S3 in delroth's basement
(record "cache" 300 "AAAA" "2a02:168:6426::12") # smol.delroth.net
@ -124,8 +124,8 @@ in
(dualProxyRecords "build-coord.wob01.infra" 300 "AAAA" "2a01:584:11::1:11")
(record "mail.infra.forkos.org" 300 "A" [ "49.13.86.172" ])
(record "mail.infra.forkos.org" 300 "AAAA" [ "2a01:4f8:1c17:6866::1" ])
(record "mail.infra" 300 "A" "49.13.86.172")
(record "mail.infra" 300 "AAAA" "2a01:4f8:1c17:6866::1")
# TODO: do not hardcode, just reuse the Colmena hive module outputs to generate all the required details.
]
@ -140,13 +140,13 @@ in
"channel-scripts-test"
];
in
map (bucket: record "${bucket}" 300 "CNAME" "public01.infra.p") buckets
map (bucket: record "${bucket}" 300 "CNAME" "public01.infra.p.forkos.org") buckets
));
"flowery.systems" = [
(record "" 300 "ALIAS" "news.forkos.org")
];
"vzfdfp.de" = [
(record "" 300 "MX" "10 mail.infra.forkos.org")
((record "" 300 "MX" "mail.infra.forkos.org") // { priority = 10; })
(record "_dmarc" 300 "TXT" "v=DMARC1; p=none") # TODO: Setup dmarc and dmarc exporer/monitoring
(record "mail._domainkey" 3600 "TXT" "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8Xy2Rytpa3X/9Or3gKqH0LTn/TD3BoLf77HtUu+GsAsZit+yIVz+zTt3NoNoYsygl2Qc27zAeJhcK3w7dbKVbuWlVBqBzrLP/QK1NqR499RUAwQfyQHZkI+BCTYEY5UkWrFAwZ7LeHgtqDNtbyeCdS7MTST0DhogtIqSJKpP0/QIDAQAB")
];