GithubHelp home page GithubHelp logo

Comments (19)

tonioo avatar tonioo commented on June 8, 2024

Hi, have you defined administrators in postfixadmin?

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

Yes, I have 2 admin users. For one admin (limited access) there was notice that password was set to superadmin password.
No info about superadmin was displayed though.

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

What is your postfixadmin version?

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

Both admins are limited? Or do you have a global admin?

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

One admin is superadmin, otherone is limited.
Postfixadmin 2.3.6.
And superadmin does have domain "ALL" in domain_admins.domain table

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

But looks like the 'ALL' domain is missing from the domain table... Can you confirm that?

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

Yes, no "ALL" domain

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

That's why the migration script fails... Do you know why this domain is missing? I thought it was mandatory...

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

I did some minor PA code modifications back in a day, can't recall anything related to ALL domain though :)
Ok, I can modify tables fo fit any requirements.

Maybe you can add to the docs expected PA database schema and other requirements. I did also have trouble with some accounts having "0000-00-00" modification date... as it is default value in my db schema.

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

I can also try a fix to migrate super admins even if the ALL domain is not present. About dates, I don't think I can to something... The migration script is compatible with version 2.3 only.

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

Maybe you can set date now() if date is 0000-00-00 in PA database?

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

@tkald could you try the 2 fixes I just pushed please?

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

Originally I also have null dates in PA domain table - it does fail with latest commits:

Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 353, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 345, 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 348, 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 399, 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 292, 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 284, 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 202, 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 182, in _migrate_mailboxes
new_user.save(creator=creator, using=options["_to"])
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/models.py", line 366, in save
super(User, self).save(*args, **kwargs)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 708, in save
force_update=force_update, update_fields=update_fields)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 736, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 820, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 859, in _do_insert
using=using, raw=raw)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/manager.py", line 122, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py", line 1039, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1060, in execute_sql
cursor.execute(sql, params)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 117, in execute
six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 112, in execute
return self.cursor.execute(query, args)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.IntegrityError: (1048, "Column 'date_joined' cannot be null")

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

Yes, works now! Thank you.

However I did get one more error stating that user name was too long:

django.db.utils.DataError: (1406, "Data too long for column 'last_name' at row 1")

I made name shorter in PA mailbox table and migration was success.

I do have next problem with my custom domain transports which are all gone in modoboa database.
I agree that you can't count with every custom installation but will it possibly work if I insert my transports directly into database? I did have some sympa transports there..

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

Never tried to import transport entries from postfixadmin. Can you paste an example please?

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

image

With import, all those alternative transports became type: domain
Bigger problem is, there doesn't seems to be relevant data fields in modoboa database where to store this info.

from modoboa-pfxadmin-migrate.

tonioo avatar tonioo commented on June 8, 2024

Actually, Modoboa does not provide a generic way to create transport entries... About your configuration, you only need to manually create a transport table for sympa mailing lists. Modoboa provides a vacation plugin, so vacation service in your example will be replaced. The virtual service is not used by modoboa and it is replaced by dovecot but the migration script already creates the needed data so you don't have to care about it.

from modoboa-pfxadmin-migrate.

tkald avatar tkald commented on June 8, 2024

Yeah, it's the sympa transport I'm concerned about.

Would be nice to have a way to define your own generic/custom transports if needed :)

from modoboa-pfxadmin-migrate.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.