Просмотр исходного кода

compliance with RFC6186 - Email Auto-discovery (#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>
TLCD96 2 лет назад
Родитель
Сommit
3a8b2351bc
2 измененных файлов с 9 добавлено и 0 удалено
  1. 4 0
      func/main.sh
  2. 5 0
      install/common/templates/dns/default.tpl

+ 4 - 0
func/main.sh

@@ -977,6 +977,10 @@ is_dns_record_format_valid() {
 		is_domain_format_valid "${1::-1}" 'mx_record'
 		is_int_format_valid "$priority" 'priority_record'
 	fi
+	if [ "$rtype" = 'SRV' ]; then
+		format_no_quotes "$priority" 'priority_record'
+	fi
+
 	is_no_new_line_format "$1"
 }
 

+ 5 - 0
install/common/templates/dns/default.tpl

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