From d3e7e2697fc87bea158f37027c56e1f1a81ed68c Mon Sep 17 00:00:00 2001 From: Evan Cassidy Date: Mon, 24 Jul 2023 14:19:00 +0000 Subject: [PATCH] [email][dns] srv record for email --- applications/email.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/applications/email.nix b/applications/email.nix index 0789f4d..72727fc 100644 --- a/applications/email.nix +++ b/applications/email.nix @@ -111,7 +111,14 @@ # DMARC {record="_dmarc.${cfg.domain}."; r_type="TXT"; value=''"v=DMARC1; p=none"'';} - {record=cfg.host.ip; r_type="PTR"; value="${cfg.sub}.${cfg.domain}.";} + # SRV records to help gmail on android etc find the correct mail.skynet.ie domain for config rather than just defaulting to skynet.ie + # https://serverfault.com/questions/935192/how-to-setup-auto-configure-email-for-android-mail-app-on-your-server/1018406#1018406 + # response should be: + # _imap._tcp SRV 0 1 143 imap.example.com. + {record="_imap._tcp"; r_type="SRV"; value="0 1 993 ${cfg.sub}.${cfg.domain}";} + {record="_pop3._tcp"; r_type="SRV"; value="10 1 995 ${cfg.sub}.${cfg.domain}";} + {record="_submission._tcp" ; r_type="SRV"; value="0 1 465 ${cfg.sub}.${cfg.domain}";} + ]; # to provide the certs