mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
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:
@@ -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'),
|
||||
),
|
||||
]
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user