Comments (19)
Hi, have you defined administrators in postfixadmin?
from modoboa-pfxadmin-migrate.
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.
What is your postfixadmin version?
from modoboa-pfxadmin-migrate.
Both admins are limited? Or do you have a global admin?
from modoboa-pfxadmin-migrate.
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.
But looks like the 'ALL' domain is missing from the domain table... Can you confirm that?
from modoboa-pfxadmin-migrate.
Yes, no "ALL" domain
from modoboa-pfxadmin-migrate.
That's why the migration script fails... Do you know why this domain is missing? I thought it was mandatory...
from modoboa-pfxadmin-migrate.
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.
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.
Maybe you can set date now() if date is 0000-00-00 in PA database?
from modoboa-pfxadmin-migrate.
@tkald could you try the 2 fixes I just pushed please?
from modoboa-pfxadmin-migrate.
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.
from modoboa-pfxadmin-migrate.
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.
Never tried to import transport entries from postfixadmin. Can you paste an example please?
from modoboa-pfxadmin-migrate.
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.
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.
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)
- postfixadmin migration script donΒ΄t create amavis records HOT 1
- ImportError: No module named callbacks HOT 8
- Script failed if quota is set HOT 2
- Script fails while importing a user HOT 1
- postfix doesn't accept incoming connections on ipv6; connection reset by peer HOT 1
- Migration fails with "Cannot resolve keyword u'domain' into field. Choices are: active, created, modified, password, username" HOT 10
- Script Failure on Ubuntu 20.04 LTS New Modoboa Install HOT 31
- Migration fails with "TypeError: save() got an unexpected keyword argument 'ext_rcpts'" HOT 7
- pip install failed HOT 1
- Not compatible with latest modoboa version HOT 1
- Migration Crash HOT 2
- AttributeError: 'User' object has no attribute 'group' HOT 1
- django.db.utils.IntegrityError: (1048, "Column 'creation' cannot be null") HOT 11
- Crash with "Duplicate entry" error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modoboa-pfxadmin-migrate.