Skip to content

Commit

Permalink
mail: fra1 -> mxroute
Browse files Browse the repository at this point in the history
  • Loading branch information
jz8132543 committed Dec 1, 2024
1 parent cee9173 commit 0ce5263
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 51 deletions.
4 changes: 0 additions & 4 deletions lib/data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@
"on": "fra1",
"proxy": false
},
"mail": {
"on": "fra1",
"proxy": false
},
"minio": {
"on": "fra1",
"proxy": false
Expand Down
5 changes: 3 additions & 2 deletions nixos/modules/services/doraim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
<displayName>Doraemon Mail</displayName>
<displayShortName>Doraemon</displayShortName>
<incomingServer type="imap">
<hostname>mail.dora.im</hostname>
<hostname>glacier.mxrouting.net</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname>mail.dora.im</hostname>
<hostname>glacier.mxrouting.net</hostname>
<port>465</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
Expand All @@ -71,6 +71,7 @@
version: STSv1
mode: enforce
mx: *.dora.im
mx: *.mxrouting.net
max_age: 86400
'';
};
Expand Down
73 changes: 37 additions & 36 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 24 additions & 9 deletions terraform/cloudflare.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ locals {
mta-sts = { on = "fra1", proxy = false }
atuin = { on = "fra1", proxy = false }
ntfy = { on = "fra1", proxy = false }
mail = { on = "fra1", proxy = false }
pb = { on = "fra1", proxy = false }
ollama = { on = "fra1", proxy = false }
ollama-ui = { on = "fra1", proxy = false }
Expand Down Expand Up @@ -149,12 +148,20 @@ resource "cloudflare_record" "_matrix_tcp" {

# mail

resource "cloudflare_record" "mail" {
name = "mail"
proxied = false
ttl = 1
type = "CNAME"
content = "glacier.mxrouting.net"
zone_id = cloudflare_zone.im_dora.id
}
resource "cloudflare_record" "dora_dkim" {
name = "default._domainkey"
name = "x._domainkey"
proxied = false
ttl = 1
type = "TXT"
content = "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzuafKXbacHeSP/2YgMN9YntpX3e5OhU+48qRliq3HDiQu6yDoEF7jVrXsK6MPgFggv7qRG+DdGGAn6Ucwjb89RESnFSujLsrhyZO6GhGcuF8brp/VSJxSBTrdoz1IQQtBjSWjREeT1wITP7Pktol4jMvXc//FBBcSKJ85aNWxLfT3L+lJII+hAPShlaB8AsUGnu2I/l1ec6/Eet5RSqI2jnmsx2qKxGOhyc0FfrYZFdnSRDDxUNvbNZuTM8nGTmDm1YWLFBHr8Ugjju4cyXFm61ifDpXcFRed2Bb6tEW8m8a1tLkpQySF1REPvtgk0YCZ+2CbHZSQA5V0X1VfjEA2QIDAQAB"
content = "v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnsLpb6J3ymivQlMqzN4oKAxPNYWNpRvD8uM1e4lWlgl+jYl2lDEzB5nIewbH9HnQ6aWi0HVgku6jqllOR2Fqspc/DkSERA1gPeqfelP3V5+ligKNU8PG26G8X+9ibR11oG9Iz1bEXBJ6ws4aSADl+e5uCS3jzJydPxJEdYERXVQA0CiSi3FK3BWlUD3dxmE80qZwYW+pxqobO4gyozow8/C8sz19zy5igJLdM5TfhTaOC1mXxL33tSJwAPlpp8homAmMX0uecIVv/JUxs4ucgu6swMjYRSeuruq1e6APTi+f+0wvnZNEegB5xTvm7IcQ0z75wA+Uw6VE/4iFuov3lQIDAQAB"
zone_id = cloudflare_zone.im_dora.id
}

Expand All @@ -172,7 +179,7 @@ resource "cloudflare_record" "dora_spf" {
proxied = false
ttl = 1
type = "TXT"
content = "v=spf1 mx mx:dora.im -all"
content = "v=spf1 include:mxlogin.com -all"
zone_id = cloudflare_zone.im_dora.id
}

Expand All @@ -181,17 +188,25 @@ resource "cloudflare_record" "dora_mta_sts" {
proxied = false
ttl = 1
type = "TXT"
content = "v=STSv1; id=2022621T010102"
content = "v=STSv1; id=20241201T010102"
zone_id = cloudflare_zone.im_dora.id
}

resource "cloudflare_record" "dora_mx_fra1" {
resource "cloudflare_record" "dora_mx_mxroute1" {
name = "dora.im"
proxied = false
ttl = 1
type = "MX"
content = "glacier.mxrouting.net"
priority = 10
zone_id = cloudflare_zone.im_dora.id
}
resource "cloudflare_record" "dora_mx_mxroute2" {
name = "dora.im"
proxied = false
ttl = 1
type = "MX"
content = "fra1.dora.im"
priority = 1
content = "glacier-relay.mxrouting.net"
priority = 20
zone_id = cloudflare_zone.im_dora.id
}

Expand Down

0 comments on commit 0ce5263

Please sign in to comment.