Skip to content

Commit 3a8b235

Browse files
tlcd96jaapmarcus
andauthored
compliance with RFC6186 - Email Auto-discovery (hestiacp#3879)
* compliance with RFC6186 - Email Auto-discovery Compliance with the RFC6186: https://datatracker.ietf.org/doc/html/rfc6186 * RFC8553 - Update Priority and weight see RFC8553 https://datatracker.ietf.org/doc/html/rfc8553 The SRV Records uses priority + Weight in rfc8553 (final spec) and bind9 (named) * Update default.tpl Updated to reflect Jaap changes (18:16 - Atlantic/azores) * Prevent user to enter ' in prioirty Causing Hestia / DNS to break --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 8342115 commit 3a8b235

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

func/main.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,10 @@ is_dns_record_format_valid() {
977977
is_domain_format_valid "${1::-1}" 'mx_record'
978978
is_int_format_valid "$priority" 'priority_record'
979979
fi
980+
if [ "$rtype" = 'SRV' ]; then
981+
format_no_quotes "$priority" 'priority_record'
982+
fi
983+
980984
is_no_new_line_format "$1"
981985
}
982986

install/common/templates/dns/default.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ ID='13' RECORD='webmail' TYPE='CNAME' PRIORITY='' VALUE='mail.%domain%.' SUSPEND
1414
ID='14' RECORD='@' TYPE='MX' PRIORITY='0' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
1515
ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% -all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
1616
ID='16' RECORD='_dmarc' TYPE='TXT' PRIORITY='' VALUE='"v=DMARC1; p=quarantine; pct=100"' SUSPENDED='no' TIME='%time%' DATE='%date%'
17+
ID='17' RECORD='_submission._tcp' TYPE='SRV' PRIORITY='1' VALUE='0 587 mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
18+
ID='18' RECORD='_imap._tcp' TYPE='SRV' PRIORITY='1' VALUE='0 143 mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
19+
ID='19' RECORD='_imaps._tcp' TYPE='SRV' PRIORITY='1' VALUE='0 993 mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
20+
ID='20' RECORD='_pop3._tcp' TYPE='SRV' PRIORITY='1' VALUE='0 110 mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
21+
ID='21' RECORD='_pop3s._tcp' TYPE='SRV' PRIORITY='1' VALUE='0 995 mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'

0 commit comments

Comments
 (0)