Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script failed if quota is set #15

Open
fluboi opened this issue May 10, 2018 · 2 comments
Open

Script failed if quota is set #15

fluboi opened this issue May 10, 2018 · 2 comments

Comments

@fluboi
Copy link

fluboi commented May 10, 2018

If at least one mailbox has a quota defined in the old postfixadmin install, the script failed with the following error:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_pfxadmin_migrate/management/commands/migrate_from_postfixadmin.py", line 290, in handle
    self._do_migration(options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_pfxadmin_migrate/management/commands/migrate_from_postfixadmin.py", line 282, in _do_migration
    self._migrate_domain(pf_domain, options, creator)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_pfxadmin_migrate/management/commands/migrate_from_postfixadmin.py", line 198, in _migrate_domain
    self._migrate_mailboxes(newdom, options, creator)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_pfxadmin_migrate/management/commands/migrate_from_postfixadmin.py", line 185, in _migrate_mailboxes
    new_mb.set_quota(old_mb.quota / 1024000, override_rules=True)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/admin/models/mailbox.py", line 265, in set_quota
    raise lib_exceptions.BadRequest(_("Domain quota exceeded"))
modoboa.lib.exceptions.BadRequest: Domain quota exceeded

(Fresh modoboa 1.10.5.dev8+gf604aacb install, without any domain/mailbox defined)

By setting quota to 0 on all Mailboxes in postfixadmin, migration is OK.

@tonioo
Copy link
Member

tonioo commented May 17, 2018

@fluboi Is there also a quota on the domain you import?

@fluboi
Copy link
Author

fluboi commented May 18, 2018

@tonioo You mean, globally, at the domain level ?
In postfixadmin I do have the following quota:

Aliases = 100
Mailboxes = 100

But it's not a size quota. I do not see any way to setup a size quota at the domain level in postfixadmin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants