Raise domain name length to RFC1035 maximum (#2147)

RFC1035 Section 2.3.4. specifies a maximum domain name length of 255
octets in protocol. As each label is prefixed by its length and the
domain-root (.) has a length of 0 we have a maximum of 253 octets. For
modoboa to support all these domains in its DB scheme we need to raise
the maximum domain name length to 253 as well.
This commit is contained in:
Sebastian Lohff
2021-02-04 16:10:44 +00:00
committed by GitHub
parent 57f5d57ea6
commit 9cecc79a02
2 changed files with 19 additions and 1 deletions
@@ -0,0 +1,18 @@
# Generated by Django 2.2.17 on 2021-01-30 22:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('admin', '0018_update_disabled_accounts_aliases'),
]
operations = [
migrations.AlterField(
model_name='domain',
name='name',
field=models.CharField(help_text='The domain name', max_length=253, unique=True, verbose_name='name'),
),
]
+1 -1
View File
@@ -23,7 +23,7 @@ from . import mixins
class Domain(mixins.MessageLimitMixin, AdminObject):
"""Mail domain."""
name = models.CharField(ugettext_lazy("name"), max_length=100, unique=True,
name = models.CharField(ugettext_lazy("name"), max_length=253, unique=True,
help_text=ugettext_lazy("The domain name"))
quota = models.PositiveIntegerField(
default=0,