modoboa / modoboa

Mail hosting made simple
https://modoboa.org
ISC License
3.01k stars 394 forks source link

Edit Domain unresponsive #1289

Closed oconshaw closed 6 years ago

oconshaw commented 6 years ago

Impacted versions

When logging in to modoboa, for one particular domain I am unable to edit anything. For example, if I try to disable the domain and click update nothing happens. For that matter, any field I edit -- once I click update nothing happens. Changes are not saved and there are no error messages. However, I can go into the individual accounts within that domain and edit them without a problem. I can login to webmail without a problem. The accounts are able to send and receive email.

oconshaw commented 6 years ago

Running the browser in developer mode, I get an error, "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data". So I think there is something in the data being returned that blows up any update for this domain. Everything looks OK; I can't see anything obvious that looks bad in the database. I am at a loss as to how to proceed from here.

herrbischoff commented 6 years ago

I have just encountered the same issue. I cannot add or edit domains due to that. Further testing reveals that I cannot add or edit users as well. I'm using version 1.9.2.

herrbischoff commented 6 years ago

Having set debug = True in settings.py, I was able to generate a more detailed error message. This appears to be related to some missing SQL relation.

ProgrammingError at /admin/domains/2/edit/
column "manager_slug" of relation "reversion_revision" does not exist
LINE 1: INSERT INTO "reversion_revision" ("manager_slug", "date_crea...
                                          ^

Request Method: POST
Request URL: https://[REDACTED]/admin/domains/2/edit/
Django Version: 1.10.8
Python Executable: /usr/bin/uwsgi-core
Python Version: 2.7.13
Python Path: ['.', '', '/srv/modoboa/env/lib/python2.7', '/srv/modoboa/env/lib/python2.7/plat-x86_64-linux-gnu', '/srv/modoboa/env/lib/python2.7/lib-tk', '/srv/modoboa/env/lib/python2.7/lib-old', '/srv/modoboa/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/modoboa/env/local/lib/python2.7/site-packages', '/srv/modoboa/env/lib/python2.7/site-packages']
Server time: Sun, 5 Nov 2017 17:29:19 +0100
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'reversion',
 'ckeditor',
 'ckeditor_uploader',
 'rest_framework',
 'rest_framework.authtoken',
 'modoboa',
 'modoboa.core',
 'modoboa.lib',
 'modoboa.admin',
 'modoboa.relaydomains',
 'modoboa.limits',
 'modoboa.parameters',
 'modoboa_amavis',
 'modoboa_pdfcredentials',
 'modoboa_postfix_autoreply',
 'modoboa_sievefilters',
 'modoboa_stats',
 'modoboa_webmail',
 'modoboa_contacts',
 'webpack_loader')
Installed Middleware:
('x_forwarded_for.middleware.XForwardedForMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'modoboa.core.middleware.LocalConfigMiddleware',
 'modoboa.lib.middleware.AjaxLoginRedirect',
 'modoboa.lib.middleware.CommonExceptionCatcher',
 'modoboa.lib.middleware.RequestCatcherMiddleware')

Traceback:  

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  42.             response = get_response(request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/reversion/revisions.py" in do_revision_context
  315.                 return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/reversion/revisions.py" in __exit__
  308.             self._context_manager.end()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/reversion/revisions.py" in end
  202.                             db = self._db,

File "/srv/modoboa/env/local/lib/python2.7/site-packages/reversion/revisions.py" in save_revision
  504.                     revision.save(using=db)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/base.py" in save
  796.                        force_update=force_update, update_fields=update_fields)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  824.             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" in _save_table
  908.             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" in _do_insert
  947.                                using=using, raw=raw)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
  85.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in _insert
  1045.         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" in execute_sql
  1054.                 cursor.execute(sql, params)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  79.             return super(CursorDebugWrapper, self).execute(sql, params)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  64.                 return self.cursor.execute(sql, params)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__
  94.                 six.reraise(dj_exc_type, dj_exc_value, traceback)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  64.                 return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /admin/domains/2/edit/
Exception Value: column "manager_slug" of relation "reversion_revision" does not exist
LINE 1: INSERT INTO "reversion_revision" ("manager_slug", "date_crea...
                                          ^

Request information:
USER: marcel@herrbischoff.com

GET: No GET data

POST:
spam_tag2_level = u''
name = u'bb-ic.de'
spam_kill_level = u''
spam_subject_tag2_act = u'on'
default_mailbox_quota = u'2048'
enabled = u'on'
quota = u'4096'
csrfmiddlewaretoken = u'VNa7xUEgscRnUQLcVDUMbOKxaDmbCJdM2zxEMfgMd8ZNGV7fKCImX02RFNobb6wI'
type = u'domain'
enable_dns_checks = u'on'
aliases = u''

FILES: No FILES data

COOKIES:
csrftoken = 'B1jEjDHLTpcxnWblMfk8yD5BwPXqO8vIINGbyYjhElkX91xoBe8IkPnV1ZZqnvOE'
sessionid = '8eox52gi58iknt0euh9r372uph63v3rr'

META:
CONTENT_LENGTH = '248'
CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'
CSRF_COOKIE = 'B1jEjDHLTpcxnWblMfk8yD5BwPXqO8vIINGbyYjhElkX91xoBe8IkPnV1ZZqnvOE'
DOCUMENT_ROOT = '/srv/modoboa/instance'
HTTPS = 'on'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'br, gzip, deflate'
HTTP_ACCEPT_LANGUAGE = 'en-us'
HTTP_CONNECTION = 'close'
HTTP_CONTENT_LENGTH = '248'
HTTP_CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'
HTTP_COOKIE = 'csrftoken=B1jEjDHLTpcxnWblMfk8yD5BwPXqO8vIINGbyYjhElkX91xoBe8IkPnV1ZZqnvOE; sessionid=8eox52gi58iknt0euh9r372uph63v3rr'
HTTP_DNT = '1'
HTTP_HOST = '[REDACTED]'
HTTP_ORIGIN = 'https://[REDACTED]'
HTTP_REFERER = 'https://[REDACTED]/admin/domains/'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5'
HTTP_X_CSRFTOKEN = 'B1jEjDHLTpcxnWblMfk8yD5BwPXqO8vIINGbyYjhElkX91xoBe8IkPnV1ZZqnvOE'
HTTP_X_FORWARDED_FOR = '46.59.151.51'
HTTP_X_FORWARDED_PROTO = 'https'
HTTP_X_REAL_IP = '46.59.151.51'
HTTP_X_REMOTE_PORT = '54660'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PATH_INFO = u'/admin/domains/2/edit/'
QUERY_STRING = ''
REMOTE_ADDR = '46.59.151.51'
REMOTE_PORT = '12505'
REQUEST_METHOD = 'POST'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/admin/domains/2/edit/'
SCRIPT_NAME = u''
SERVER_NAME = '[REDACTED]'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.0'
UWSGI_APPID = '[REDACTED]|'
UWSGI_SCRIPT = 'instance.wsgi:application'
uwsgi.node = '[REDACTED]'
uwsgi.version = '2.0.14-debian'
wsgi.errors = <open file 'wsgi_errors', mode 'w' at 0x7fb1393d2a50>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7fb134b3d948>
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = 

Settings:
Using settings module instance.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = []
ALLOWED_HOSTS = ['[REDACTED]']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = 'django.contrib.auth.backends.ModelBackend'
AUTH_PASSWORD_VALIDATORS = u'********************'
AUTH_USER_MODEL = 'core.User'
BASE_DIR = '/srv/modoboa/instance'
CACHES = {u'default': {u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = u'default'
CACHE_MIDDLEWARE_KEY_PREFIX = u'********************'
CACHE_MIDDLEWARE_SECONDS = 600
CKEDITOR_ALLOW_NONIMAGE_FILES = False
CKEDITOR_BROWSE_SHOW_DIRS = True
CKEDITOR_CONFIGS = {'default': {'toolbar_Modoboa': [['Bold', 'Italic', 'Underline'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], ['BidiLtr', 'BidiRtl', 'Language'], ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'], ['Undo', 'Redo'], ['Link', 'Unlink', 'Anchor', '-', 'Smiley'], ['TextColor', 'BGColor', '-', 'Source'], ['Font', 'FontSize'], ['Image'], ['SpellChecker']], 'allowedContent': True, 'toolbar': 'Modoboa', 'width': None}}
CKEDITOR_IMAGE_BACKEND = 'pillow'
CKEDITOR_RESTRICT_BY_USER = True
CKEDITOR_UPLOAD_PATH = 'uploads/'
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = u'csrftoken'
CSRF_COOKIE_PATH = u'/'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = u'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = u'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': True, 'NAME': 'modoboa', 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'PORT': '', 'HOST': '127.0.0.1', 'USER': 'modoboa', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': u'********************', 'OPTIONS': {}}, 'amavis': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': True, 'NAME': 'amavis', 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'PORT': '', 'HOST': '127.0.0.1', 'USER': 'amavis', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': u'********************', 'OPTIONS': {}}}
DATABASE_ROUTERS = ['modoboa_amavis.dbrouter.AmavisRouter']
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = u'N j, Y, P'
DATETIME_INPUT_FORMATS = [u'%Y-%m-%d %H:%M:%S', u'%Y-%m-%d %H:%M:%S.%f', u'%Y-%m-%d %H:%M', u'%Y-%m-%d', u'%m/%d/%Y %H:%M:%S', u'%m/%d/%Y %H:%M:%S.%f', u'%m/%d/%Y %H:%M', u'%m/%d/%Y', u'%m/%d/%y %H:%M:%S', u'%m/%d/%y %H:%M:%S.%f', u'%m/%d/%y %H:%M', u'%m/%d/%y']
DATE_FORMAT = u'N j, Y'
DATE_INPUT_FORMATS = [u'%Y-%m-%d', u'%m/%d/%Y', u'%m/%d/%y', u'%b %d %Y', u'%b %d, %Y', u'%d %b %Y', u'%d %b, %Y', u'%B %d %Y', u'%B %d, %Y', u'%d %B %Y', u'%d %B, %Y']
DEBUG = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = u'.'
DEFAULT_CHARSET = u'utf-8'
DEFAULT_CONTENT_TYPE = u'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = u'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = u'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = u'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE = u''
DEFAULT_TABLESPACE = u''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = u'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = u'localhost'
EMAIL_HOST_PASSWORD = u'********************'
EMAIL_HOST_USER = u''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = u'********************'
EMAIL_SUBJECT_PREFIX = u'[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = u'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = [u'django.core.files.uploadhandler.MemoryFileUploadHandler', u'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
IGNORABLE_404_URLS = []
INSTALLED_APPS = 
INTERNAL_IPS = []
LANGUAGES = [(u'af', u'Afrikaans'), (u'ar', u'Arabic'), (u'ast', u'Asturian'), (u'az', u'Azerbaijani'), (u'bg', u'Bulgarian'), (u'be', u'Belarusian'), (u'bn', u'Bengali'), (u'br', u'Breton'), (u'bs', u'Bosnian'), (u'ca', u'Catalan'), (u'cs', u'Czech'), (u'cy', u'Welsh'), (u'da', u'Danish'), (u'de', u'German'), (u'dsb', u'Lower Sorbian'), (u'el', u'Greek'), (u'en', u'English'), (u'en-au', u'Australian English'), (u'en-gb', u'British English'), (u'eo', u'Esperanto'), (u'es', u'Spanish'), (u'es-ar', u'Argentinian Spanish'), (u'es-co', u'Colombian Spanish'), (u'es-mx', u'Mexican Spanish'), (u'es-ni', u'Nicaraguan Spanish'), (u'es-ve', u'Venezuelan Spanish'), (u'et', u'Estonian'), (u'eu', u'Basque'), (u'fa', u'Persian'), (u'fi', u'Finnish'), (u'fr', u'French'), (u'fy', u'Frisian'), (u'ga', u'Irish'), (u'gd', u'Scottish Gaelic'), (u'gl', u'Galician'), (u'he', u'Hebrew'), (u'hi', u'Hindi'), (u'hr', u'Croatian'), (u'hsb', u'Upper Sorbian'), (u'hu', u'Hungarian'), (u'ia', u'Interlingua'), (u'id', u'Indonesian'), (u'io', u'Ido'), (u'is', u'Icelandic'), (u'it', u'Italian'), (u'ja', u'Japanese'), (u'ka', u'Georgian'), (u'kk', u'Kazakh'), (u'km', u'Khmer'), (u'kn', u'Kannada'), (u'ko', u'Korean'), (u'lb', u'Luxembourgish'), (u'lt', u'Lithuanian'), (u'lv', u'Latvian'), (u'mk', u'Macedonian'), (u'ml', u'Malayalam'), (u'mn', u'Mongolian'), (u'mr', u'Marathi'), (u'my', u'Burmese'), (u'nb', u'Norwegian Bokm\xe5l'), (u'ne', u'Nepali'), (u'nl', u'Dutch'), (u'nn', u'Norwegian Nynorsk'), (u'os', u'Ossetic'), (u'pa', u'Punjabi'), (u'pl', u'Polish'), (u'pt', u'Portuguese'), (u'pt-br', u'Brazilian Portuguese'), (u'ro', u'Romanian'), (u'ru', u'Russian'), (u'sk', u'Slovak'), (u'sl', u'Slovenian'), (u'sq', u'Albanian'), (u'sr', u'Serbian'), (u'sr-latn', u'Serbian Latin'), (u'sv', u'Swedish'), (u'sw', u'Swahili'), (u'ta', u'Tamil'), (u'te', u'Telugu'), (u'th', u'Thai'), (u'tr', u'Turkish'), (u'tt', u'Tatar'), (u'udm', u'Udmurt'), (u'uk', u'Ukrainian'), (u'ur', u'Urdu'), (u'vi', u'Vietnamese'), (u'zh-hans', u'Simplified Chinese'), (u'zh-hant', u'Traditional Chinese')]
LANGUAGES_BIDI = [u'he', u'ar', u'fa', u'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = u'django_language'
LANGUAGE_COOKIE_PATH = u'/'
LOCALE_PATHS = []
LOGGING = {'loggers': {'modoboa.auth': {'handlers': ['syslog-auth', 'modoboa'], 'propagate': False, 'level': 'INFO'}, 'modoboa.admin': {'handlers': ['modoboa'], 'propagate': False, 'level': 'INFO'}}, 'version': 1, 'formatters': {'syslog': {'format': '%(name)s: %(levelname)s %(message)s'}}, 'handlers': {'syslog-auth': {'formatter': 'syslog', 'class': 'logging.handlers.SysLogHandler', 'facility': 4}, 'modoboa': {'class': 'modoboa.core.loggers.SQLHandler'}}}
LOGGING_CONFIG = u'logging.config.dictConfig'
LOGIN_REDIRECT_URL = u'/accounts/profile/'
LOGIN_URL = u'/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = []
MEDIA_ROOT = '/srv/modoboa/instance/media'
MEDIA_URL = '/media/'
MESSAGE_STORAGE = u'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = None
MIDDLEWARE_CLASSES = 
MIGRATION_MODULES = {}
MODOBOA_API_URL = u'********************'
MODOBOA_APPS = 
MONTH_DAY_FORMAT = u'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = u'********************'
PASSWORD_RESET_TIMEOUT_DAYS = u'********************'
PREPEND_WWW = False
REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication')}
ROOT_URLCONF = 'instance.urls'
SECRET_KEY = u'********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = u'root@localhost'
SESSION_CACHE_ALIAS = u'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = u'sessionid'
SESSION_COOKIE_PATH = u'/'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = u'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = u'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'instance.settings'
SHORT_DATETIME_FORMAT = u'm/d/Y P'
SHORT_DATE_FORMAT = u'm/d/Y'
SIGNING_BACKEND = u'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = ['fields.W342']
SITE_ID = 1
STATICFILES_DIRS = '/srv/modoboa/env/lib/python2.7/site-packages/modoboa/bower_components'
STATICFILES_FINDERS = [u'django.contrib.staticfiles.finders.FileSystemFinder', u'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = u'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/srv/modoboa/instance/sitestatic'
STATIC_URL = '/sitestatic/'
TEMPLATES = [{'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'debug': False, 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'modoboa.core.context_processors.top_notifications']}, 'BACKEND': 'django.template.backends.django.DjangoTemplates'}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = u'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = u','
TIME_FORMAT = u'P'
TIME_INPUT_FORMATS = [u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M']
TIME_ZONE = 'Europe/Paris'
USE_ETAGS = False
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WEBPACK_LOADER = {'CONTACTS': {'IGNORE': ['.+\\.hot-update.js', '.+\\.map'], 'BUNDLE_DIR_NAME': 'modoboa_contacts/', 'CACHE': False, 'STATS_FILE': '/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_contacts/../frontend/webpack-stats.json'}}
WSGI_APPLICATION = 'instance.wsgi.application'
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = u'F Y'

You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.
herrbischoff commented 6 years ago

Additionally, here's the output of python manage.py showmigrations, as it may be useful in pinning down this issue:

admin
 [X] 0001_initial
 [X] 0002_migrate_from_modoboa_admin
 [X] 0003_auto_20151118_1215
 [X] 0004_auto_20160914_0907
 [X] 0005_auto_20161026_1003
 [X] 0006_auto_20161104_1900
 [X] 0007_auto_20161104_1915
 [X] 0008_domain_enable_dns_checks
 [X] 0009_auto_20170215_0948
 [X] 0010_auto_20170215_1328
auth
 [X] 0001_initial
 [X] 0002_alter_permission_name_max_length
 [X] 0003_alter_user_email_max_length
 [X] 0004_alter_user_username_opts
 [X] 0005_alter_user_last_login_null
 [X] 0006_require_contenttypes_0002
 [X] 0007_alter_validators_add_error_messages
 [X] 0008_alter_user_username_max_length
authtoken
 [X] 0001_initial
 [X] 0002_auto_20160226_1747
contenttypes
 [X] 0001_initial
 [X] 0002_remove_content_type_name
core
 [X] 0001_initial
 [X] 0002_delete_extension
 [X] 0003_user_master_user
 [X] 0004_auto_20150728_1228
 [X] 0005_user_language
 [X] 0006_auto_20151114_1518
 [X] 0007_auto_20151116_1349
 [X] 0008_localconfig
 [X] 0009_auto_20161026_1003
 [X] 0010_auto_20161026_1011
 [X] 0011_auto_20161104_2217
 [X] 0012_auto_20170215_1034
 [X] 0013_auto_20170707_1058
 [X] 0014_auto_20171010_1746
lib
 [X] 0001_initial
 [X] 0002_rename_parameters
 [X] 0003_rename_parameters
 [X] 0004_auto_20151114_1409
 [X] 0005_auto_20160416_1449
 [X] 0006_auto_20161104_2206
limits
 [X] 0001_initial
 [X] 0002_auto_20151114_1518
 [X] 0003_auto_20160413_1046
 [X] 0004_auto_20160413_1312
 [X] 0005_auto_20160415_1654
 [X] 0006_auto_20170216_1112
modoboa_amavis
 [X] 0001_initial
modoboa_contacts
 [X] 0001_initial
modoboa_postfix_autoreply
 [X] 0001_initial
 [X] 0002_auto_20150728_1236
 [X] 0003_move_aliases
 [X] 0004_delete_alias
 [X] 0005_auto_20151202_1623
 [X] 0006_auto_20160329_1501
relaydomains
 [X] 0001_initial
 [X] 0002_migrate_from_modoboa_admin_relaydomains
 [X] 0003_auto_20170116_1508
 [X] 0004_auto_20161105_1424
 [X] 0005_auto_20161105_1426
 [X] 0006_auto_20170215_0948
reversion
 [X] 0001_initial
 [X] 0002_auto_20141216_1509
sessions
 [X] 0001_initial
sites
 [X] 0001_initial
 [X] 0002_alter_domain_unique
oconshaw commented 6 years ago

Its been about a week since I reported this. I could sure use some help. I placed debug = True also hoping that might yield something, but I don't know how to find where any debug info is logged.

oconshaw commented 6 years ago

OK, so I think I have gotten the debug output -- DoesNotExist at /admin/domains/11/edit/ Users matching query does not exist.

Something seems to be not quite right in the database I think. Where to look?

herrbischoff commented 6 years ago

@tonioo: Could you take a look when you find the time? This issue is rather critical for me as I am currently not able to set up or edit users.

tonioo commented 6 years ago

Guys, I'm doing my best to fix bugs and help the community but I also have a job which is not modoboa...

@herrbischoff Can you check which version of reversion is installed in your virtualenv please? @oconshaw Looks like your database is in an inconsistent state. What did you do with the user you're trying to update.

herrbischoff commented 6 years ago

@tonioo: Thanks for taking the time. I personally know how time consuming support work can be, hence the addition of "when you find the time". ;)

Here's the info you asked for: django-reversion (1.10.2), it appears to be identical to the one specified in requirements.txt.

Just for completeness sake, here's a complete output of pip list:

asn1crypto (0.23.0)
bcrypt (3.1.3)
certifi (2017.11.5)
cffi (1.11.2)
chardet (3.0.4)
click (6.7)
coreapi (2.3.1)
coreapi-cli (1.0.6)
coreschema (0.0.4)
cryptography (2.1.3)
dj-database-url (0.4.2)
Django (1.10.8)
django-ckeditor (5.2.1)
django-filter (1.1.0)
django-js-asset (0.1.1)
django-passwords (0.3.12)
django-rest-swagger (0.3.5)
django-reversion (1.10.2)
django-subcommand2 (0.1.1)
django-versionfield2 (0.5.0)
django-webpack-loader (0.5.0)
django-xforwardedfor-middleware (2.0)
djangorestframework (3.6.3)
dnspython (1.15.0)
enum34 (1.1.6)
feedparser (5.2.1)
future (0.16.0)
gevent (1.2.1)
greenlet (0.4.12)
idna (2.6)
ipaddress (1.0.18)
itypes (1.1.0)
Jinja2 (2.9.6)
jsonfield (1.0.3)
LEPL (5.1.3)
lxml (4.1.0)
MarkupSafe (1.0)
modoboa (1.9.1)
modoboa-amavis (1.1.3)
modoboa-contacts (0.4.0)
modoboa-pdfcredentials (1.2.1)
modoboa-postfix-autoreply (1.2.1)
modoboa-sievefilters (1.2.0)
modoboa-stats (1.2.2)
modoboa-webmail (1.2.2)
olefile (0.44)
packaging (16.8)
passlib (1.7.1)
Pillow (4.3.0)
pip (9.0.1)
pkg-resources (0.0.0)
progressbar (2.3)
progressbar33 (2.4)
psycopg2 (2.7.3.2)
py-dateutil (2.2)
pycparser (2.18)
pycrypto (2.6.1)
pyparsing (2.2.0)
pytz (2017.3)
PyYAML (3.12)
reportlab (3.4.0)
requests (2.18.4)
rfc6266 (0.0.4)
rrdtool (0.1.11)
setuptools (36.6.0)
sievelib (1.0.0)
six (1.11.0)
uritemplate (3.0.0)
urllib3 (1.22)
wheel (0.30.0)

Thanks again!

oconshaw commented 6 years ago

I edited the domain name and user account names in SQL to make everything lowercase. Initially, when setting this up I had imported the domain and user accounts via csv. I must have had a mix of case when I initially did the import (example: DOMAIN = domainexample.com and DomainExample.com; IDENTITY = user@ExampleDomain.com, user2@exampledomain.com) . I would have thought the case would not matter, but it does in some cases.

In making that change I resolved a problem I had reported to you earlier, but now it looks like I have created a new problem. I must have missed something somewhere.

So, not sure what I am missing. When I query the various tables in SQL, it looks to me like everything is consistent, but obviously I am missing something.

Thanks for reaching out and taking the time to help.

tonioo commented 6 years ago

@herrbischoff You're using the right version, that's strange... Did you upgrade recently? Are you using a DB cluster or similar?

tonioo commented 6 years ago

@oconshaw So what's the error now? Is it still the same traceback?

oconshaw commented 6 years ago

Did i miss some instruction from you? You haven't given me anything to try. Error message the same. Traceback same. No changes have been made yet. Still waiting on some input from you.

herrbischoff commented 6 years ago

@tonioo: Nope, no cluster. I did however upgrade Modoboa some short time ago. I believe the error coincides with the upgrade. My best guess is that some database migrations were not correctly applied, as the error message reads:

ProgrammingError at /admin/domains/2/edit/
column "manager_slug" of relation "reversion_revision" does not exist
LINE 1: INSERT INTO "reversion_revision" ("manager_slug", "date_crea...

Then again, I unfortunately do not know enough about Django internals to make an informed guess.

oconshaw commented 6 years ago

Mercel, It seems pretty clear on your issue – there is something wrong with the reversion _revision table.

I am using postgres. It looks to me like you are either missing that table or just the manager_slug column.

On my system, the table looks like the following:

id, manager_slug, date_created, comment, user_id

The best fix I think would be to identify whatever table create or update table script was supposed to fire when you did the upgrade and rerun that. Figure out why it didn’t run.

-- Table: public.reversion_revision

-- DROP TABLE public.reversion_revision;

CREATE TABLE public.reversion_revision

(

id integer NOT NULL DEFAULT nextval('reversion_revision_id_seq'::regclass),

manager_slug character varying(191) COLLATE pg_catalog."default" NOT NULL,

date_created timestamp with time zone NOT NULL,

comment text COLLATE pg_catalog."default" NOT NULL,

user_id integer,

CONSTRAINT reversion_revision_pkey PRIMARY KEY (id),

CONSTRAINT reversion_revision_user_id_17095f45_fk_core_user_id FOREIGN KEY (user_id)

    REFERENCES public.core_user (id) MATCH SIMPLE

    ON UPDATE NO ACTION

    ON DELETE NO ACTION

    DEFERRABLE INITIALLY DEFERRED

)

WITH (

OIDS = FALSE

)

TABLESPACE pg_default;

ALTER TABLE public.reversion_revision

OWNER to modoboa;

-- Index: reversion_revision_b16b0f06

-- DROP INDEX public.reversion_revision_b16b0f06;

CREATE INDEX reversion_revision_b16b0f06

ON public.reversion_revision USING btree

(manager_slug COLLATE pg_catalog."default")

TABLESPACE pg_default;

-- Index: reversion_revision_c69e55a4

-- DROP INDEX public.reversion_revision_c69e55a4;

CREATE INDEX reversion_revision_c69e55a4

ON public.reversion_revision USING btree

(date_created)

TABLESPACE pg_default;

-- Index: reversion_revision_e8701ad4

-- DROP INDEX public.reversion_revision_e8701ad4;

CREATE INDEX reversion_revision_e8701ad4

ON public.reversion_revision USING btree

(user_id)

TABLESPACE pg_default;

-- Index: reversion_revision_manager_slug_388da6fe_like

-- DROP INDEX public.reversion_revision_manager_slug_388da6fe_like;

CREATE INDEX reversion_revision_manager_slug_388da6fe_like

ON public.reversion_revision USING btree

(manager_slug COLLATE pg_catalog."default" varchar_pattern_ops)

TABLESPACE pg_default;
herrbischoff commented 6 years ago

I found some possibly related issue from django-reversion: https://github.com/etianen/django-reversion/issues/559

herrbischoff commented 6 years ago

@oconshaw: This is pretty obvious. The question is how to get the reversion table into shape without breaking things. Following the ideas in the issue I linked unfortunately gets me nowhere fast.

tonioo commented 6 years ago

@herrbischoff Can you check what the structure of rerversion_* tables using a SQL shell?

tonioo commented 6 years ago

@oconshaw So you're saying the error appeared after you manually altered your database? Could you paste the full backtrace of the error you encounter?

herrbischoff commented 6 years ago

@tonioo: Here you go.

modoboa=> \d reversion_revision
                                     Table "public.reversion_revision"
    Column    |           Type           |                            Modifiers
--------------+--------------------------+-----------------------------------------------------------------
 id           | integer                  | not null default nextval('reversion_revision_id_seq'::regclass)
 date_created | timestamp with time zone | not null
 comment      | text                     | not null
 user_id      | integer                  |
Indexes:
    "reversion_revision_pkey" PRIMARY KEY, btree (id)
    "reversion_revision_c69e55a4" btree (date_created)
    "reversion_revision_e8701ad4" btree (user_id)
Foreign-key constraints:
    "reversion_revision_user_id_17095f45_fk_core_user_id" FOREIGN KEY (user_id) REFERENCES core_user(id) DEFERRABLE INITIALLY DEFERRED
Referenced by:
    TABLE "reversion_version" CONSTRAINT "reversion_version_revision_id_af9f6a9d_fk_reversion_revision_id" FOREIGN KEY (revision_id) REFERENCES reversion_revision(id) DEFERRABLE INITIALLY DEFERRED

The column manager_slug is obviously missing.

tonioo commented 6 years ago

Is there any data inside?

herrbischoff commented 6 years ago

Apparently it's empty:

modoboa=> TABLE reversion_revision;
 id |         date_created          | comment | user_id
----+-------------------------------+---------+---------
  1 | 2017-10-07 21:14:15.355873+02 |         |
  2 | 2017-10-07 21:17:24.162873+02 |         |
  3 | 2017-10-07 23:52:15.101685+02 |         |
  4 | 2017-10-07 23:53:06.707364+02 |         |
  5 | 2017-10-07 23:53:33.622828+02 |         |
  6 | 2017-10-07 23:58:51.47654+02  |         |
  7 | 2017-10-08 00:00:04.61683+02  |         |
  8 | 2017-10-08 00:00:56.552801+02 |         |
  9 | 2017-10-08 00:01:25.314455+02 |         |
 10 | 2017-10-08 00:02:10.017009+02 |         |
 11 | 2017-10-08 00:02:58.426387+02 |         |
 12 | 2017-10-08 00:03:44.64137+02  |         |
 13 | 2017-10-08 00:04:06.236399+02 |         |
 14 | 2017-10-08 00:04:36.869091+02 |         |
 15 | 2017-10-08 00:05:21.658806+02 |         |
 16 | 2017-10-08 00:06:11.151962+02 |         |
 17 | 2017-10-08 00:06:52.564466+02 |         |
 18 | 2017-10-08 00:07:27.562677+02 |         |
 19 | 2017-10-08 00:07:53.600622+02 |         |
 20 | 2017-10-08 00:08:27.339732+02 |         |
 21 | 2017-10-08 00:08:56.980561+02 |         |
 22 | 2017-10-08 00:09:41.509086+02 |         |
 23 | 2017-10-08 00:10:14.769937+02 |         |
 24 | 2017-10-08 00:10:40.911543+02 |         |
 25 | 2017-10-08 01:32:44.37162+02  |         |
 26 | 2017-10-08 01:35:06.099744+02 |         |
 27 | 2017-10-08 01:36:28.774113+02 |         |
 28 | 2017-10-08 01:41:57.231032+02 |         |
 29 | 2017-10-08 01:42:17.976021+02 |         |
 30 | 2017-10-08 01:42:36.098487+02 |         |
 31 | 2017-10-08 01:43:00.882942+02 |         |
 32 | 2017-10-08 01:43:54.68805+02  |         |
 33 | 2017-10-08 01:45:08.410187+02 |         |
 34 | 2017-10-08 02:09:19.542394+02 |         |
 35 | 2017-10-08 02:09:46.323516+02 |         |
 36 | 2017-10-08 05:51:19.592558+02 |         |
 37 | 2017-10-08 05:52:15.288385+02 |         |
 38 | 2017-10-08 05:52:54.263675+02 |         |
 39 | 2017-10-08 05:53:10.950286+02 |         |
 40 | 2017-10-08 05:53:53.474422+02 |         |
 41 | 2017-10-08 05:54:35.665801+02 |         |
 42 | 2017-10-08 05:54:58.754523+02 |         |
 43 | 2017-10-08 05:55:07.543398+02 |         |
 44 | 2017-10-08 05:55:15.804436+02 |         |
 45 | 2017-10-08 05:55:39.695513+02 |         |
 46 | 2017-10-08 05:55:57.866279+02 |         |
 47 | 2017-10-08 05:56:09.863589+02 |         |
 48 | 2017-10-08 05:56:15.124909+02 |         |
 49 | 2017-10-08 05:56:34.882321+02 |         |
 50 | 2017-10-08 05:56:47.115914+02 |         |
 51 | 2017-10-08 05:56:55.168162+02 |         |
 52 | 2017-10-08 05:57:37.557123+02 |         |
 53 | 2017-10-08 06:01:40.579667+02 |         |
 54 | 2017-10-08 06:02:20.041422+02 |         |
 55 | 2017-10-08 06:03:25.208261+02 |         |
 56 | 2017-10-08 06:03:52.919929+02 |         |
 57 | 2017-10-08 15:35:18.328908+02 |         |
 58 | 2017-10-08 15:35:45.078727+02 |         |
 59 | 2017-10-10 14:11:47.237097+02 |         |
 60 | 2017-10-12 14:24:15.002849+02 |         |
 61 | 2017-10-14 13:58:02.987697+02 |         |
 62 | 2017-10-14 14:36:27.884933+02 |         |
 63 | 2017-10-16 19:53:55.661673+02 |         |
 64 | 2017-10-16 19:57:28.038527+02 |         |
 65 | 2017-10-16 20:01:33.87223+02  |         |
 66 | 2017-10-16 20:01:43.177429+02 |         |
tonioo commented 6 years ago

Ok so, what I suggest is to drop all the reversion tables from the database, clear the django migrations history related to reversion and then run the migrate command again. The SQL part would look like this:

DROP TABLE reversion_version;
DROP TABLE reversion_revision;
DELETE FROM django_migrations WHERE app='reversion';

The migrate command:

> python manage.py migrate reversion

Do not forget to load your virtualenv before.

herrbischoff commented 6 years ago

Very nice! :) This appears to have worked. I can now edit domains and users again. Thank you very much for your time!

Do you have any idea what may have caused the problem in the first place?

oconshaw commented 6 years ago

Yes, the error occurred after I altered the database.

DoesNotExist at /admin/domains/11/edit/

Users matching query does not exist.

Request Method: POST

Request URL: https://mail.domain1.com/admin/domains/11/edit/

Django Version: 1.10

Python Executable: /usr/sbin/uwsgi

Python Version: 2.7.5

Python Path: ['.', '', '/srv/modoboa/env/lib64/python27.zip', '/srv/modoboa/env/lib64/python2.7', '/srv/modoboa/env/lib64/python2.7/plat-linux2', '/srv/modoboa/env/lib64/python2.7/lib-tk', '/srv/modoboa/env/lib64/python2.7/lib-old', '/srv/modoboa/env/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7', '/usr/lib/python2.7', '/usr/lib64/python2.7/lib-tk', '/srv/modoboa/env/lib/python2.7/site-packages']

Server time: Thu, 9 Nov 2017 12:20:19 -0600

Installed Applications:

('django.contrib.auth',

'django.contrib.contenttypes',

'django.contrib.sessions',

'django.contrib.messages',

'django.contrib.sites',

'django.contrib.staticfiles',

'reversion',

'ckeditor',

'rest_framework',

'rest_framework.authtoken',

'webpack_loader',

'modoboa',

'modoboa.core',

'modoboa.lib',

'modoboa.admin',

'modoboa.relaydomains',

'modoboa.limits',

'modoboa.parameters',

'modoboa_amavis',

'modoboa_pdfcredentials',

'modoboa_postfix_autoreply',

'modoboa_sievefilters',

'modoboa_stats',

'modoboa_webmail',

'modoboa_radicale',

'modoboa_dmarc',

'modoboa_imap_migration',

'modoboa_contacts')

Installed Middleware:

('x_forwarded_for.middleware.XForwardedForMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',

'django.middleware.common.CommonMiddleware',

'django.middleware.csrf.CsrfViewMiddleware',

'django.contrib.auth.middleware.AuthenticationMiddleware',

'django.contrib.messages.middleware.MessageMiddleware',

'django.middleware.locale.LocaleMiddleware',

'django.middleware.clickjacking.XFrameOptionsMiddleware',

'modoboa.core.middleware.LocalConfigMiddleware',

'modoboa.lib.middleware.AjaxLoginRedirect',

'modoboa.lib.middleware.CommonExceptionCatcher',

'modoboa.lib.middleware.RequestCatcherMiddleware')

Traceback:

File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response

  1. response = self._get_response(request)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/utils/decorators.py" in inner

  1. return func(*args, **kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/utils/decorators.py" in inner

  1. return func(*args, **kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view

  1. return view_func(request, *args, **kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view

  1. return view_func(request, *args, **kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/reversion/revisions.py" in do_revision_context

  1. return func(*args, **kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa/admin/views/domain.py" in editdomain

  1. return DomainForm(request, instances=instances).process()

File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa/lib/form_utils.py" in process

  1. self.save()

File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa/admin/forms/domain.py" in save

  1. f["instance"].save(self.request.user)

File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa_amavis/forms.py" in save

  1. u = Users.objects.get(email="@%s" % self.domain.name)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method

  1. return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/srv/modoboa/env/lib/python2.7/site-packages/django/db/models/query.py" in get

  1. self.model._meta.object_name

Exception Type: DoesNotExist at /admin/domains/11/edit/

Exception Value: Users matching query does not exist.

Request information:

USER: admin

GET: No GET data

POST:

spam_tag2_level = u''

name = u'acme.com'

spam_kill_level = u''

spam_subject_tag2_act = u'on'

default_mailbox_quota = u'0'

quota = u'0'

bypass_banned_checks = u''

bypass_virus_checks = u''

csrfmiddlewaretoken = u'iLM6lSsfjzdeXu55g6TFTwTj3hu5wNjIxQLqUlDoXqLnkunLfsOj2yg0svMVIyAS'

type = u'domain'

enable_dns_checks = u'on'

bypass_spam_checks = u''

aliases = u''

FILES: No FILES data

COOKIES:

csrftoken = 'XTPzu18sumANlh0Vdn1bYrcAhD0IzgqZcYOT3ujB8d8WIhiBcJWP7tzhGRiyL1H9'

sessionid = 'v4fgw1o0cobvoykucmewjzn8lvuya8fr'

META:

CONTENT_LENGTH = '306'

CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'

CSRF_COOKIE = 'XTPzu18sumANlh0Vdn1bYrcAhD0IzgqZcYOT3ujB8d8WIhiBcJWP7tzhGRiyL1H9'

DOCUMENT_ROOT = '/srv/modoboa/instance'

HTTPS = 'on'

HTTP_ACCEPT = '/'

HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'

HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.9'

HTTP_CONNECTION = 'keep-alive'

HTTP_CONTENT_LENGTH = '306'

HTTP_CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'

HTTP_COOKIE = 'sessionid=v4fgw1o0cobvoykucmewjzn8lvuya8fr; csrftoken=XTPzu18sumANlh0Vdn1bYrcAhD0IzgqZcYOT3ujB8d8WIhiBcJWP7tzhGRiyL1H9'

HTTP_HOST = 'mail.domain1.com'

HTTP_ORIGIN = 'https://mail.domain1.com'

HTTP_REFERER = 'https://mail.domain1.com/admin/domains/'

HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36'

HTTP_VIA = '1.1 ironportmgmt.ccpd.net:80 (Cisco-WSA/9.0.1-162)'

HTTP_X_CSRFTOKEN = 'XTPzu18sumANlh0Vdn1bYrcAhD0IzgqZcYOT3ujB8d8WIhiBcJWP7tzhGRiyL1H9'

HTTP_X_IMFORWARDS = '20'

HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'

PATH_INFO = u'/admin/domains/11/edit/'

QUERY_STRING = ''

REMOTE_ADDR = '64.201.138.24'

REMOTE_PORT = '12501'

REQUEST_METHOD = 'POST'

REQUEST_SCHEME = 'https'

REQUEST_URI = '/admin/domains/11/edit/'

SCRIPT_NAME = u''

SERVER_NAME = 'mail.domain1.com'

SERVER_PORT = '443'

SERVER_PROTOCOL = 'HTTP/1.1'

UWSGI_APPID = 'mail.domain1.com|'

UWSGI_SCRIPT = 'instance.wsgi:application'

uwsgi.node = 'mail.domain1.com'

uwsgi.version = '2.0.15'

wsgi.errors = <open file 'wsgi_errors', mode 'w' at 0x5d699c0>

wsgi.file_wrapper = ''

wsgi.input = <uwsgi._Input object at 0xfccd1b0>

wsgi.multiprocess = True

wsgi.multithread = False

wsgi.run_once = False

wsgi.url_scheme = 'https'

wsgi.version =

Settings:

Using settings module instance.settings

ABSOLUTE_URL_OVERRIDES = {}

ADMINS = []

ALLOWED_HOSTS = ['mail.domain1.com']

APPEND_SLASH = True

AUTHENTICATION_BACKENDS = 'django.contrib.auth.backends.ModelBackend'

AUTH_PASSWORD_VALIDATORS = u'****'

AUTH_USER_MODEL = 'core.User'

BASE_DIR = '.'

CACHES = {u'default': {u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}}

CACHE_MIDDLEWARE_ALIAS = u'default'

CACHE_MIDDLEWARE_KEY_PREFIX = u'****'

CACHE_MIDDLEWARE_SECONDS = 600

CKEDITOR_ALLOW_NONIMAGE_FILES = False

CKEDITOR_BROWSE_SHOW_DIRS = True

CKEDITOR_CONFIGS = {'default': {'toolbar_Modoboa': [['Bold', 'Italic', 'Underline'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], ['BidiLtr', 'BidiRtl', 'Language'], ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'], ['Undo', 'Redo'], ['Link', 'Unlink', 'Anchor', '-', 'Smiley'], ['TextColor', 'BGColor', '-', 'Source'], ['Font', 'FontSize'], ['Image'], ['SpellChecker']], 'allowedContent': True, 'toolbar': 'Modoboa', 'width': None}}

CKEDITOR_IMAGE_BACKEND = 'pillow'

CKEDITOR_RESTRICT_BY_USER = True

CKEDITOR_UPLOAD_PATH = 'uploads/'

CONTACTS_STATS_FILES = {'prod': '/srv/modoboa/env/lib/python2.7/site-packages/modoboa_contacts/static/modoboa_contacts/webpack-stats.json', 'dev': '/srv/modoboa/env/lib/python2.7/site-packages/modoboa_contacts/../frontend/webpack-stats.json'}

CSRF_COOKIE_AGE = 31449600

CSRF_COOKIE_DOMAIN = None

CSRF_COOKIE_HTTPONLY = False

CSRF_COOKIE_NAME = u'csrftoken'

CSRF_COOKIE_PATH = u'/'

CSRF_COOKIE_SECURE = False

CSRF_FAILURE_VIEW = u'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME = u'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS = []

DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': True, 'NAME': 'modoboa', 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'PORT': '', 'HOST': '127.0.0.1', 'USER': 'modoboa', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': u'****', 'OPTIONS': {}}, 'amavis': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': True, 'NAME': 'amavis', 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'PORT': '', 'HOST': '127.0.0.1', 'USER': 'amavis', 'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None}, 'PASSWORD': u'****', 'OPTIONS': {}}}

DATABASE_ROUTERS = ['modoboa_amavis.dbrouter.AmavisRouter']

DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000

DATETIME_FORMAT = u'N j, Y, P'

DATETIME_INPUT_FORMATS = [u'%Y-%m-%d %H:%M:%S', u'%Y-%m-%d %H:%M:%S.%f', u'%Y-%m-%d %H:%M', u'%Y-%m-%d', u'%m/%d/%Y %H:%M:%S', u'%m/%d/%Y %H:%M:%S.%f', u'%m/%d/%Y %H:%M', u'%m/%d/%Y', u'%m/%d/%y %H:%M:%S', u'%m/%d/%y %H:%M:%S.%f', u'%m/%d/%y %H:%M', u'%m/%d/%y']

DATE_FORMAT = u'N j, Y'

DATE_INPUT_FORMATS = [u'%Y-%m-%d', u'%m/%d/%Y', u'%m/%d/%y', u'%b %d %Y', u'%b %d, %Y', u'%d %b %Y', u'%d %b, %Y', u'%B %d %Y', u'%B %d, %Y', u'%d %B %Y', u'%d %B, %Y']

DEBUG = True

DEBUG_PROPAGATE_EXCEPTIONS = False

DECIMAL_SEPARATOR = u'.'

DEFAULT_CHARSET = u'utf-8'

DEFAULT_CONTENT_TYPE = u'text/html'

DEFAULT_EXCEPTION_REPORTER_FILTER = u'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE = u'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL = u'webmaster@localhost'

DEFAULT_INDEX_TABLESPACE = u''

DEFAULT_TABLESPACE = u''

DISALLOWED_USER_AGENTS = []

EMAIL_BACKEND = u'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST = u'localhost'

EMAIL_HOST_PASSWORD = u'****'

EMAIL_HOST_USER = u''

EMAIL_PORT = 25

EMAIL_SSL_CERTFILE = None

EMAIL_SSL_KEYFILE = u'****'

EMAIL_SUBJECT_PREFIX = u'[Django] '

EMAIL_TIMEOUT = None

EMAIL_USE_SSL = False

EMAIL_USE_TLS = False

FILE_CHARSET = u'utf-8'

FILE_UPLOAD_DIRECTORY_PERMISSIONS = None

FILE_UPLOAD_HANDLERS = [u'django.core.files.uploadhandler.MemoryFileUploadHandler', u'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440

FILE_UPLOAD_PERMISSIONS = None

FILE_UPLOAD_TEMP_DIR = None

FIRST_DAY_OF_WEEK = 0

FIXTURE_DIRS = []

FORCE_SCRIPT_NAME = None

FORMAT_MODULE_PATH = None

IGNORABLE_404_URLS = []

INSTALLED_APPS =

INTERNAL_IPS = []

LANGUAGES = [(u'af', u'Afrikaans'), (u'ar', u'Arabic'), (u'ast', u'Asturian'), (u'az', u'Azerbaijani'), (u'bg', u'Bulgarian'), (u'be', u'Belarusian'), (u'bn', u'Bengali'), (u'br', u'Breton'), (u'bs', u'Bosnian'), (u'ca', u'Catalan'), (u'cs', u'Czech'), (u'cy', u'Welsh'), (u'da', u'Danish'), (u'de', u'German'), (u'dsb', u'Lower Sorbian'), (u'el', u'Greek'), (u'en', u'English'), (u'en-au', u'Australian English'), (u'en-gb', u'British English'), (u'eo', u'Esperanto'), (u'es', u'Spanish'), (u'es-ar', u'Argentinian Spanish'), (u'es-co', u'Colombian Spanish'), (u'es-mx', u'Mexican Spanish'), (u'es-ni', u'Nicaraguan Spanish'), (u'es-ve', u'Venezuelan Spanish'), (u'et', u'Estonian'), (u'eu', u'Basque'), (u'fa', u'Persian'), (u'fi', u'Finnish'), (u'fr', u'French'), (u'fy', u'Frisian'), (u'ga', u'Irish'), (u'gd', u'Scottish Gaelic'), (u'gl', u'Galician'), (u'he', u'Hebrew'), (u'hi', u'Hindi'), (u'hr', u'Croatian'), (u'hsb', u'Upper Sorbian'), (u'hu', u'Hungarian'), (u'ia', u'Interlingua'), (u'id', u'Indonesian'), (u'io', u'Ido'), (u'is', u'Icelandic'), (u'it', u'Italian'), (u'ja', u'Japanese'), (u'ka', u'Georgian'), (u'kk', u'Kazakh'), (u'km', u'Khmer'), (u'kn', u'Kannada'), (u'ko', u'Korean'), (u'lb', u'Luxembourgish'), (u'lt', u'Lithuanian'), (u'lv', u'Latvian'), (u'mk', u'Macedonian'), (u'ml', u'Malayalam'), (u'mn', u'Mongolian'), (u'mr', u'Marathi'), (u'my', u'Burmese'), (u'nb', u'Norwegian Bokm\xe5l'), (u'ne', u'Nepali'), (u'nl', u'Dutch'), (u'nn', u'Norwegian Nynorsk'), (u'os', u'Ossetic'), (u'pa', u'Punjabi'), (u'pl', u'Polish'), (u'pt', u'Portuguese'), (u'pt-br', u'Brazilian Portuguese'), (u'ro', u'Romanian'), (u'ru', u'Russian'), (u'sk', u'Slovak'), (u'sl', u'Slovenian'), (u'sq', u'Albanian'), (u'sr', u'Serbian'), (u'sr-latn', u'Serbian Latin'), (u'sv', u'Swedish'), (u'sw', u'Swahili'), (u'ta', u'Tamil'), (u'te', u'Telugu'), (u'th', u'Thai'), (u'tr', u'Turkish'), (u'tt', u'Tatar'), (u'udm', u'Udmurt'), (u'uk', u'Ukrainian'), (u'ur', u'Urdu'), (u'vi', u'Vietnamese'), (u'zh-hans', u'Simplified Chinese'), (u'zh-hant', u'Traditional Chinese')]

LANGUAGES_BIDI = [u'he', u'ar', u'fa', u'ur']

LANGUAGE_CODE = 'en-us'

LANGUAGE_COOKIE_AGE = None

LANGUAGE_COOKIE_DOMAIN = None

LANGUAGE_COOKIE_NAME = u'django_language'

LANGUAGE_COOKIE_PATH = u'/'

LOCALE_PATHS = []

LOGGING = {'loggers': {'modoboa.auth': {'handlers': ['syslog-auth', 'modoboa'], 'propagate': False, 'level': 'INFO'}, 'modoboa.admin': {'handlers': ['modoboa'], 'propagate': False, 'level': 'INFO'}}, 'version': 1, 'formatters': {'syslog': {'format': '%(name)s: %(levelname)s %(message)s'}}, 'handlers': {'syslog-auth': {'formatter': 'syslog', 'class': 'logging.handlers.SysLogHandler', 'facility': 4}, 'modoboa': {'class': 'modoboa.core.loggers.SQLHandler'}}}

LOGGING_CONFIG = u'logging.config.dictConfig'

LOGIN_REDIRECT_URL = u'/accounts/profile/'

LOGIN_URL = u'/accounts/login/'

LOGOUT_REDIRECT_URL = None

MANAGERS = []

MEDIA_ROOT = './media'

MEDIA_URL = '/media/'

MESSAGE_STORAGE = u'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE = None

MIDDLEWARE_CLASSES =

MIGRATION_MODULES = {}

MODOBOA_API_URL = u'****'

MODOBOA_APPS =

MODOBOA_CUSTOM_LOGO = '/media/ids_logo_orange_blue_1116x177.png'

MONTH_DAY_FORMAT = u'F j'

NUMBER_GROUPING = 0

PASSWORD_HASHERS = u'****'

PASSWORD_RESET_TIMEOUT_DAYS = u'****'

PLUGIN_BASE_DIR = '/srv/modoboa/env/lib/python2.7/site-packages/modoboa_contacts'

PREPEND_WWW = False

REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication')}

ROOT_URLCONF = 'instance.urls'

SECRET_KEY = u'****'

SECURE_BROWSER_XSS_FILTER = False

SECURE_CONTENT_TYPE_NOSNIFF = False

SECURE_HSTS_INCLUDE_SUBDOMAINS = False

SECURE_HSTS_SECONDS = 0

SECURE_PROXY_SSL_HEADER = None

SECURE_REDIRECT_EXEMPT = []

SECURE_SSL_HOST = None

SECURE_SSL_REDIRECT = False

SERVER_EMAIL = u'root@localhost'

SESSION_CACHE_ALIAS = u'default'

SESSION_COOKIE_AGE = 1209600

SESSION_COOKIE_DOMAIN = None

SESSION_COOKIE_HTTPONLY = True

SESSION_COOKIE_NAME = u'sessionid'

SESSION_COOKIE_PATH = u'/'

SESSION_COOKIE_SECURE = False

SESSION_ENGINE = u'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE = False

SESSION_FILE_PATH = None

SESSION_SAVE_EVERY_REQUEST = False

SESSION_SERIALIZER = u'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE = 'instance.settings'

SHORT_DATETIME_FORMAT = u'm/d/Y P'

SHORT_DATE_FORMAT = u'm/d/Y'

SIGNING_BACKEND = u'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS = ['fields.W342']

SITE_ID = 1

STATICFILES_DIRS = '/srv/modoboa/env/lib/python2.7/site-packages/modoboa/bower_components'

STATICFILES_FINDERS = [u'django.contrib.staticfiles.finders.FileSystemFinder', u'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE = u'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT = './sitestatic'

STATIC_URL = '/sitestatic/'

TEMPLATES = [{'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'debug': False, 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'modoboa.core.context_processors.top_notifications']}, 'BACKEND': 'django.template.backends.django.DjangoTemplates'}]

TEST_NON_SERIALIZED_APPS = []

TEST_RUNNER = u'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR = u','

TIME_FORMAT = u'P'

TIME_INPUT_FORMATS = [u'%H:%M:%S', u'%H:%M:%S.%f', u'%H:%M']

TIME_ZONE = 'America/Chicago'

USE_ETAGS = False

USE_I18N = True

USE_L10N = True

USE_THOUSAND_SEPARATOR = False

USE_TZ = True

USE_X_FORWARDED_HOST = False

USE_X_FORWARDED_PORT = False

WEBPACK_LOADER = {'CONTACTS': {'IGNORE': ['.+\.hot-update.js', '.+\.map'], 'BUNDLE_DIR_NAME': 'modoboa_contacts/', 'CACHE': False, 'STATS_FILE': '/srv/modoboa/env/lib/python2.7/site-packages/modoboa_contacts/../frontend/webpack-stats.json'}}

WSGI_APPLICATION = 'instance.wsgi.application'

X_FRAME_OPTIONS = 'SAMEORIGIN'

YEAR_MONTH_FORMAT = u'F Y'

You're seeing this error because you have DEBUG = True in your

Django settings file. Change that to False, and Django will

display a standard page generated by the handler for this status code.

From: Antoine Nguyen [mailto:notifications@github.com] Sent: Thursday, November 09, 2017 11:41 AM To: modoboa/modoboa modoboa@noreply.github.com Cc: oconshaw oconshaw@gmail.com; Mention mention@noreply.github.com Subject: Re: [modoboa/modoboa] Edit Domain unresponsive (#1289)

@oconshaw https://github.com/oconshaw So you're saying the error appeared after you manually altered your database? Could you paste the full backtrace of the error you encounter?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/modoboa/modoboa/issues/1289#issuecomment-343233095 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYMBgbwLFwpVv31P0iTdsU-dW3HCR9Zwks5s0zkjgaJpZM4QOVVw . https://github.com/notifications/beacon/AYMBgbbmgUk0L2CbukVyQCFxr3yswsEqks5s0zkjgaJpZM4QOVVw.gif

oconshaw commented 6 years ago

ping.

tonioo commented 6 years ago

@oconshaw Altering the database manually is a very bad idea... Anyway, you forgot to alter the amavis database too. Look at the users table and rename old records.

oconshaw commented 6 years ago

I didn't forget. I altered the domain reference there as well. Maybe something with the email field? Not sure what is the reference there with the binary data.

On Nov 10, 2017 9:56 AM, "Antoine Nguyen" notifications@github.com wrote:

@oconshaw https://github.com/oconshaw Altering the database manually is a very bad idea... Anyway, you forgot to alter the amavis database too. Look at the users table and rename old records.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/modoboa/modoboa/issues/1289#issuecomment-343510690, or mute the thread https://github.com/notifications/unsubscribe-auth/AYMBgSp7kfNR4AzRdWUH1INPubqXaA-mks5s1HIvgaJpZM4QOVVw .

tonioo commented 6 years ago

You also need to update the email field. You can do it using django, it will convert the data for you.

oconshaw commented 6 years ago

Hopefully that is what I am missing. How do I do that?

From: Antoine Nguyen [mailto:notifications@github.com] Sent: Friday, November 10, 2017 10:26 AM To: modoboa/modoboa modoboa@noreply.github.com Cc: oconshaw oconshaw@gmail.com; Mention mention@noreply.github.com Subject: Re: [modoboa/modoboa] Edit Domain unresponsive (#1289)

You also need to update the email field. You can do it using django, it will convert the data for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/modoboa/modoboa/issues/1289#issuecomment-343519254 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYMBge2Rigi4BmY5ojGepzeZNru3RIZOks5s1HkngaJpZM4QOVVw . https://github.com/notifications/beacon/AYMBgR7il3LO-Uy-LY7PZ2o6vpOfnnhYks5s1HkngaJpZM4QOVVw.gif

tonioo commented 6 years ago

Something like this:

python manage.py shell

Then:

from modoboa_amavis.models import Users
Users.objects.filter(email="<OLD EMAIL>").update(email="<NEW EMAIL>")
oconshaw commented 6 years ago

So just type it in exactly like that? For the old email and new email – does that reference just the domain name or actual email accounts? How do I know which one? Is it a comma delimited string listing all the email accounts setup for that domain or something else? –Thanks.

From: Antoine Nguyen [mailto:notifications@github.com] Sent: Friday, November 10, 2017 10:52 AM To: modoboa/modoboa modoboa@noreply.github.com Cc: oconshaw oconshaw@gmail.com; Mention mention@noreply.github.com Subject: Re: [modoboa/modoboa] Edit Domain unresponsive (#1289)

Something like this:

python manage.py shell

Then:

from modoboa_amavis.models import Users Users.objects.filter(email="").update(email="")

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/modoboa/modoboa/issues/1289#issuecomment-343526461 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYMBgXae6zHmNCc8dxlwD3wS1xs4No7Eks5s1H9AgaJpZM4QOVVw . https://github.com/notifications/beacon/AYMBgTM7SPcf5yALRMGQd0fxVS60vN6fks5s1H9AgaJpZM4QOVVw.gif

tonioo commented 6 years ago

We're talking about email addresses. I guess you know which accounts you modified so just run the update() line once by account, using its old an new email address.

oconshaw commented 6 years ago

Interesting. So I have changed those email addresses weeks ago which had a mix of upper and lower case – I wasn’t sure what the exact mix of upper and lower case for the old email addresses are anymore. I decided to have a look in the binary email field of the users table in the amavis database so I could pass into the code you gave me the exact old email address I originally had. It just shows the @domain.com text – no email addresses. It does show up as mixed case so I can definitely see that is a problem, but I was expecting to see email addresses.

SELECT id, priority, policy_id, email, encode(email,'escape'), fullname

        FROM public.users where id=11;

So what does the code you suggested I run actually do? Because it definitely does not insert email addresses into the email field.

Something like this:

python manage.py shell

Then:

from modoboa_amavis.models import Users Users.objects.filter(email="").update(email="")

From: Antoine Nguyen [mailto:notifications@github.com] Sent: Friday, November 10, 2017 11:18 AM To: modoboa/modoboa modoboa@noreply.github.com Cc: oconshaw oconshaw@gmail.com; Mention mention@noreply.github.com Subject: Re: [modoboa/modoboa] Edit Domain unresponsive (#1289)

We're talking about email addresses. I guess you know which accounts you modified so just run the update() line once by account, using its old an new email address.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/modoboa/modoboa/issues/1289#issuecomment-343533169 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYMBga09zMNSTIryNiEKiOI0xklsW_xjks5s1IVdgaJpZM4QOVVw . https://github.com/notifications/beacon/AYMBgVFQhhQ8nFDns0WmRN9h9OESl09jks5s1IVdgaJpZM4QOVVw.gif

tonioo commented 6 years ago

@oconshaw Why are you requesting on the public schema for users?

tonioo commented 6 years ago

@oconshaw Since this issue is not really a bug, I close it.