[GH-ISSUE #1987] Radicale (thus CardDAV and CalDAV) or modoboa-contacts (or at least I think) doesn't seem to work on a stock ubuntu 20.04 modoboa install #1489

Closed
opened 2026-02-27 11:17:22 +03:00 by kerem · 5 comments
Owner

Originally created by @extragreen on GitHub (Jul 5, 2020).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1987

Impacted versions

  • Modoboa: 1.15.0
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Run installer on ubuntu 20.04 fresh install (thus using python3.8) after making a quick change to database.py as outlined in the comments here https://github.com/modoboa/modoboa/issues/1883. AND after installing python3-virtualenv and python3-pip. Even created a symlink for pip just in case: ln -s /usr/bin/pip3 /usr/bin/pip.

Install finishes and everything looks good except for a couple of errors (not sure if related to the issue) which include:

modulenotfounderror: no module named 'braces'
image

Apparently the above shows if django-braces isn't installed but doesn't it install in the line directly above the error?

you'll have caldav 0.5.0 which is incompatible
image

The above 2 errors were also documented here https://github.com/modoboa/modoboa/issues/1975 (although different trigger) but, unfortunately, nothing in this issue seems to work.

Current behaviour

On any user with a mailbox, selecting yes for the 'synchronise address book using CardDAV' option doesn't stick. It just reverts back to 'no' after a refresh of the page:

image

And, one can't access their contacts 'from the outside':

image

As it just leads to this error once one logs in:

image

Also tried running the installer with python2.7, same outcome. Running this on 18.04 works flawlessly so i'm assuming this is a python3.8/pip3/python3-virtualenv compatibility issue like some other posts outlined. Regardless, just posting here to increase awareness.

Any help understanding these errors would also be greatly appreciated as I am relatively new to this, thanks!

Expected behavior

For it to download the .vcf contact file just like on Ubuntu 18.04 or on the modoboa demo.

Video/Screenshot link (optional)

Originally created by @extragreen on GitHub (Jul 5, 2020). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1987 # Impacted versions * Modoboa: 1.15.0 * installer used: Yes * Webserver: Nginx # Steps to reproduce Run installer on ubuntu 20.04 fresh install (thus using python3.8) after making a quick change to `database.py` as outlined in the comments here https://github.com/modoboa/modoboa/issues/1883. AND after installing `python3-virtualenv` and `python3-pip`. Even created a symlink for pip just in case: `ln -s /usr/bin/pip3 /usr/bin/pip`. Install finishes and everything looks good except for a couple of errors (not sure if related to the issue) which include: **modulenotfounderror: no module named 'braces'** ![image](https://user-images.githubusercontent.com/11571540/86533403-2e952980-bf14-11ea-995f-49d4ef3ef489.png) Apparently the above shows if `django-braces` isn't installed but doesn't it install in the line directly above the error? **you'll have caldav 0.5.0 which is incompatible** ![image](https://user-images.githubusercontent.com/11571540/86533405-3359dd80-bf14-11ea-89fa-0e7b10717080.png) The above 2 errors were also documented here https://github.com/modoboa/modoboa/issues/1975 (although different trigger) but, unfortunately, nothing in this issue seems to work. # Current behaviour On any user with a mailbox, selecting yes for the 'synchronise address book using CardDAV' option doesn't stick. It just reverts back to 'no' after a refresh of the page: ![image](https://user-images.githubusercontent.com/11571540/86533533-3acdb680-bf15-11ea-8070-f78ba62238a5.png) And, one can't access their contacts 'from the outside': ![image](https://user-images.githubusercontent.com/11571540/86533618-bcbddf80-bf15-11ea-865a-e84db8fc3110.png) As it just leads to this error once one logs in: ![image](https://user-images.githubusercontent.com/11571540/86533640-e37c1600-bf15-11ea-8457-a41d9af44541.png) Also tried running the installer with python2.7, same outcome. Running this on 18.04 works flawlessly so i'm assuming this is a python3.8/pip3/python3-virtualenv compatibility issue like some other posts outlined. Regardless, just posting here to increase awareness. Any help understanding these errors would also be greatly appreciated as I am relatively new to this, thanks! # Expected behavior For it to download the .vcf contact file just like on Ubuntu 18.04 or on the modoboa demo. # Video/Screenshot link (optional)
kerem closed this issue 2026-02-27 11:17:22 +03:00
Author
Owner

@extragreen commented on GitHub (Jul 7, 2020):

Alright I managed to install it without any errors by rebuilding the virtualenv after running the installer. Lots of VMs died in the making of this modoboa install haha. Rebuilding the env seemed to build the wheel for everything successfully and installed caldav 0.6.2. Unfortunately, the same behaviour is still present.

I've checked the logs for nginx when I click 'save' after selecting yes for the 'synchronise address book using CardDAV' option (as shown above):

10.0.2.2 - postmaster@DOMAIN [07/Jul/2020:14:17:52 +1000] "OPTIONS /radicale/postmaster@DOMAIN/contacts HTTP/1.1" 500 59 "-" "pyCardDAV"
10.0.2.2 - - [07/Jul/2020:14:18:03 +1000] "POST /user/preferences/ HTTP/2.0" 500 870 "https://HOSTNAME/user/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"

And the logs for uwsgi:

mail.DOMAIN [pid: 7829|app: 1|req: 5/8] 10.0.2.2 () {62 vars in 1246 bytes} [Tue Jul  7 14:17:47 2020] POST /user/preferences/ => generated 870 bytes in 15608 msecs (HTTP/2.0 500) 5 headers in 181 bytes (1 switches on core 0)

AND this is the django error email I get:


[Django] ERROR (EXTERNAL IP): Internal Server Error: /user/preferences/
--

Internal Server Error: /user/preferences/

HTTPError at /user/preferences/
500 Server Error: Internal Server Error for url: https://mail.DOMAIN/radicale/postmaster@DOMAIN/contacts

Request Method: POST
Request URL: https://mail.DOMAIN/user/preferences/
Django Version: 2.2.14
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.8.2
Python Path: ['.', '', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/srv/modoboa/env/lib/python3.8/site-packages']
Server time: Tue, 7 Jul 2020 14:17:40 +1000
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',
 'phonenumber_field',
 'modoboa',
 'modoboa.core',
 'modoboa.lib',
 'modoboa.admin',
 'modoboa.transport',
 'modoboa.relaydomains',
 'modoboa.limits',
 'modoboa.parameters',
 'modoboa.dnstools',
 'modoboa_amavis',
 'modoboa_pdfcredentials',
 'modoboa_postfix_autoreply',
 'modoboa_sievefilters',
 'modoboa_stats',
 'modoboa_webmail',
 'modoboa_contacts',
 'modoboa_radicale',
 '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/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

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

File "/usr/lib/python3.8/contextlib.py" in inner
  75.                 return func(*args, **kwds)

File "/usr/lib/python3.8/contextlib.py" in inner
  75.                 return func(*args, **kwds)

File "/srv/modoboa/env/lib/python3.8/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa/core/views/user.py" in preferences
  75.                 form.save()

File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/forms.py" in save
  60.         tasks.create_cdav_addressbook(

File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/tasks.py" in create_cdav_addressbook
  22.     clt = carddav.PyCardDAV(

File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/lib/carddav.py" in __init__
  148.         response.raise_for_status()  # raises error on not 2XX HTTP status code

File "/srv/modoboa/env/lib/python3.8/site-packages/requests/models.py" in raise_for_status
  940.             raise HTTPError(http_error_msg, response=self)

Exception Type: HTTPError at /user/preferences/
Exception Value: 500 Server Error: Internal Server Error for url: https://mail.DOMAIN/radicale/postmaster@DOMAIN/contacts
Request information:
USER: postmaster@DOMAIN

GET: No GET data

POST:
csrfmiddlewaretoken = '0NurMAgjUU4bJlaNbYNn1Vg9tBbHqRt6zfBIRwxdIesNB1Aj9ypiPS0bNBRCXleY'
modoboa_contacts-enable_carddav_sync = 'True'
modoboa_contacts-sync_frequency = '300'
modoboa_sievefilters-editor_mode = 'gui'
modoboa_sievefilters-trash_folder = 'Trash'
modoboa_sievefilters-sent_folder = 'Sent'
modoboa_sievefilters-drafts_folder = 'Drafts'
modoboa_amavis-messages_per_page = '40'
modoboa_webmail-displaymode = 'plain'
modoboa_webmail-enable_links = 'False'
modoboa_webmail-messages_per_page = '40'
modoboa_webmail-refresh_interval = '300'
modoboa_webmail-mboxes_col_width = '200'
modoboa_webmail-trash_folder = 'Trash'
modoboa_webmail-sent_folder = 'Sent'
modoboa_webmail-drafts_folder = 'Drafts'
modoboa_webmail-junk_folder = 'Junk'
modoboa_webmail-editor = 'plain'
modoboa_webmail-signature = ''

FILES: No FILES data

COOKIES:
csrftoken = 'iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3'
sessionid = 'gy84abio317s83tdmgorq1pes11sx1d7'

META:
CONTENT_LENGTH = '729'
CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'
CSRF_COOKIE = 'iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3'
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_CONTENT_LENGTH = '729'
HTTP_CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'
HTTP_COOKIE = 'csrftoken=iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3; sessionid=gy84abio317s83tdmgorq1pes11sx1d7'
HTTP_HOST = 'mail.DOMAIN'
HTTP_ORIGIN = 'https://mail.DOMAIN'
HTTP_REFERER = 'https://mail.DOMAIN/user/'
HTTP_SEC_FETCH_DEST = 'empty'
HTTP_SEC_FETCH_MODE = 'cors'
HTTP_SEC_FETCH_SITE = 'same-origin'
HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'
HTTP_X_CSRFTOKEN = 'iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PATH_INFO = '/user/preferences/'
QUERY_STRING = ''
REMOTE_ADDR = '10.0.2.2'
REMOTE_PORT = '10383'
REQUEST_METHOD = 'POST'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/user/preferences/'
SCRIPT_NAME = ''
SERVER_NAME = 'mail.DOMAIN'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/2.0'
UWSGI_APPID = 'mail.DOMAIN|'
UWSGI_SCRIPT = 'instance.wsgi:application'
uwsgi.node = b'mail.DOMAIN'
uwsgi.version = b'2.0.18-debian'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7fba3d3835d0>
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'

Settings:
Using settings module instance.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = [('Administrator', 'postmaster@DOMAIN')]
ALLOWED_HOSTS = ['mail.DOMAIN']
AMAVIS_DEFAULT_DATABASE_ENCODING = 'utf8'
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend',)"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'core.User'
BASE_DIR = '/srv/modoboa/instance'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CKEDITOR_ALLOW_NONIMAGE_FILES = False
CKEDITOR_BROWSE_SHOW_DIRS = True
CKEDITOR_CONFIGS = {'default': {'allowedContent': True, 'toolbar': 'Modoboa', 'width': None, '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']]}}
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 = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = True
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'modoboa', 'USER': 'modoboa', 'PASSWORD': '********************', 'HOST': '127.0.0.1', 'PORT': '', 'ATOMIC_REQUESTS': True, 'OPTIONS': {'init_command': 'SET foreign_key_checks = 0;'}, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}, 'amavis': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'amavis', 'USER': 'amavis', 'PASSWORD': '********************', 'HOST': '127.0.0.1', 'PORT': '', 'ATOMIC_REQUESTS': True, 'OPTIONS': {'init_command': 'SET foreign_key_checks = 0;'}, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = ['modoboa_amavis.dbrouter.AmavisRouter']
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
DEBUG = False
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISABLE_DASHBOARD_EXTERNAL_QUERIES = False
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', '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
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = "('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', 'phonenumber_field', 'modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.transport', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa.dnstools', 'modoboa_amavis', 'modoboa_pdfcredentials', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_stats', 'modoboa_webmail', 'modoboa_contacts', 'modoboa_radicale', 'webpack_loader')"
INTERNAL_IPS = []
LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'en'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = []
LOGGING = {'version': 1, 'formatters': {'syslog': {'format': '%(name)s: %(levelname)s %(message)s'}}, 'handlers': {'mail-admins': {'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', 'include_html': True}, 'syslog-auth': {'class': 'logging.handlers.SysLogHandler', 'facility': 4, 'formatter': 'syslog'}, 'modoboa': {'class': 'modoboa.core.loggers.SQLHandler'}}, 'loggers': {'django': {'handlers': ['mail-admins'], 'level': 'ERROR', 'propagate': False}, 'modoboa.auth': {'handlers': ['syslog-auth', 'modoboa'], 'level': 'INFO', 'propagate': False}, 'modoboa.admin': {'handlers': ['modoboa'], 'level': 'INFO', 'propagate': False}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/accounts/profile/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = []
MEDIA_ROOT = '/srv/modoboa/instance/media'
MEDIA_URL = '/media/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
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')"
MIGRATION_MODULES = {}
MODOBOA_API_URL = '********************'
MODOBOA_APPS = "('modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.transport', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa.dnstools', 'modoboa_amavis', 'modoboa_pdfcredentials', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_stats', 'modoboa_webmail', 'modoboa_contacts', 'modoboa_radicale')"
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PHONENUMBER_DB_FORMAT = 'INTERNATIONAL'
PREPEND_WWW = False
REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication')}
ROOT_URLCONF = 'instance.urls'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'postmaster@DOMAIN'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = True
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'instance.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = ['security.W019', 'fields.W342']
SITE_ID = 1
STATICFILES_DIRS = "('/srv/modoboa/env/lib/python3.8/site-packages/modoboa/bower_components',)"
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/srv/modoboa/instance/sitestatic'
STATIC_URL = '/sitestatic/'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'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'], 'debug': False}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'Australia/Melbourne'
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': {'CACHE': True, 'BUNDLE_DIR_NAME': 'modoboa_contacts/', 'STATS_FILE': '/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/static/modoboa_contacts/webpack-stats.json', 'IGNORE': ['.+\\.hot-update.js', '.+\\.map']}, 'CALENDAR': {'CACHE': True, 'BUNDLE_DIR_NAME': 'modoboa_radicale/', 'STATS_FILE': '/srv/modoboa/env/lib/python3.8/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json', 'IGNORE': ['.+\\.hot-update.js', '.+\\.map']}}
WSGI_APPLICATION = 'instance.wsgi.application'
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'

All I can gather from these is that there's a http 500 error coming from somewhere... I tried a few different changes to my nginx config just in case that was the issue but none work. Here's my nginx config if it'll help:

upstream modoboa {
    server unix:/run/uwsgi/app/modoboa_instance/socket fail_timeout=0;
}

server {
    server_name mail.DOMAIN;
    root /srv/modoboa/instance;

    client_max_body_size 10M;

    access_log /var/log/nginx/mail.DOMAIN-access.log;
    error_log /var/log/nginx/mail.DOMAIN-error.log;

    location /sitestatic/ {
        try_files $uri $uri/ =404;
    }

    location /media/ {
        try_files $uri $uri/ =404;
    }

    location / {
        include uwsgi_params;
        uwsgi_param UWSGI_SCRIPT instance.wsgi:application;
        uwsgi_pass modoboa;
    }
    
    location ~* ^/autodiscover/autodiscover.xml {
        include uwsgi_params;
        uwsgi_pass automx;
    }
    location /mobileconfig {
        include uwsgi_params;
        uwsgi_pass automx;
    }

    location /radicale/ {
        proxy_pass http://localhost:5232/; # The / is important!
        proxy_set_header X-Script-Name /radicale;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass_header Authorization;
    }
    


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/mail.DOMAIN/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mail.DOMAIN/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


    add_header Strict-Transport-Security "max-age=31536000" always; # managed by Certbot


    ssl_trusted_certificate /etc/letsencrypt/live/mail.DOMAIN/chain.pem; # managed by Certbot
    ssl_stapling on; # managed by Certbot
    ssl_stapling_verify on; # managed by Certbot

}


server {
    if ($host = mail.DOMAIN) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name mail.DOMAIN;
    root /srv/modoboa/instance;

    client_max_body_size 10M;

    access_log /var/log/nginx/mail.DOMAIN-access.log;
    error_log /var/log/nginx/mail.DOMAIN-error.log;

    location /sitestatic/ {
        try_files $uri $uri/ =404;
    }

    location /media/ {
        try_files $uri $uri/ =404;
    }

    location / {
        include uwsgi_params;
        uwsgi_param UWSGI_SCRIPT instance.wsgi:application;
        uwsgi_pass modoboa;
    }
    
    location ~* ^/autodiscover/autodiscover.xml {
        include uwsgi_params;
        uwsgi_pass automx;
    }
    location /mobileconfig {
        include uwsgi_params;
        uwsgi_pass automx;
    }

    location /radicale/ {
        proxy_pass http://localhost:5232/; # The / is important!
        proxy_set_header X-Script-Name /radicale;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass_header Authorization;
    }
    




}

Have also tried this with localhost:5232 on the server and still returns the same error as above when trying to access the contacts list:
image

Creating a calendar event also does not work and gives me the following django error right after clicking 'create' for an event (API is enabled):


[Django] ERROR (EXTERNAL IP): Internal Server Error: /api/v1/user-calendars/1/events/
--

Internal Server Error: /api/v1/user-calendars/1/events/

PutError at /api/v1/user-calendars/1/events/
500 Internal Server Error

b'A server error occurred.  Please contact the administrator.'

Absolutely everything else works except for carddav/caldav, any help would be greatly appreciated!

<!-- gh-comment-id:654643355 --> @extragreen commented on GitHub (Jul 7, 2020): Alright I managed to install it without any errors by rebuilding the virtualenv after running the installer. Lots of VMs died in the making of this modoboa install haha. Rebuilding the env seemed to build the wheel for everything successfully and installed caldav 0.6.2. Unfortunately, the same behaviour is still present. I've checked the logs for nginx when I click 'save' after selecting yes for the 'synchronise address book using CardDAV' option (as shown above): ``` 10.0.2.2 - postmaster@DOMAIN [07/Jul/2020:14:17:52 +1000] "OPTIONS /radicale/postmaster@DOMAIN/contacts HTTP/1.1" 500 59 "-" "pyCardDAV" 10.0.2.2 - - [07/Jul/2020:14:18:03 +1000] "POST /user/preferences/ HTTP/2.0" 500 870 "https://HOSTNAME/user/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" ``` And the logs for uwsgi: ``` mail.DOMAIN [pid: 7829|app: 1|req: 5/8] 10.0.2.2 () {62 vars in 1246 bytes} [Tue Jul 7 14:17:47 2020] POST /user/preferences/ => generated 870 bytes in 15608 msecs (HTTP/2.0 500) 5 headers in 181 bytes (1 switches on core 0) ``` AND this is the django error email I get: ``` [Django] ERROR (EXTERNAL IP): Internal Server Error: /user/preferences/ -- Internal Server Error: /user/preferences/ HTTPError at /user/preferences/ 500 Server Error: Internal Server Error for url: https://mail.DOMAIN/radicale/postmaster@DOMAIN/contacts Request Method: POST Request URL: https://mail.DOMAIN/user/preferences/ Django Version: 2.2.14 Python Executable: /usr/bin/uwsgi-core Python Version: 3.8.2 Python Path: ['.', '', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/srv/modoboa/env/lib/python3.8/site-packages'] Server time: Tue, 7 Jul 2020 14:17:40 +1000 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', 'phonenumber_field', 'modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.transport', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa.dnstools', 'modoboa_amavis', 'modoboa_pdfcredentials', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_stats', 'modoboa_webmail', 'modoboa_contacts', 'modoboa_radicale', '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/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner 34. response = get_response(request) File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response 115. response = self.process_exception_by_middleware(e, request) File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response 113. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python3.8/contextlib.py" in inner 75. return func(*args, **kwds) File "/usr/lib/python3.8/contextlib.py" in inner 75. return func(*args, **kwds) File "/srv/modoboa/env/lib/python3.8/site-packages/django/contrib/auth/decorators.py" in _wrapped_view 21. return view_func(request, *args, **kwargs) File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa/core/views/user.py" in preferences 75. form.save() File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/forms.py" in save 60. tasks.create_cdav_addressbook( File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/tasks.py" in create_cdav_addressbook 22. clt = carddav.PyCardDAV( File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/lib/carddav.py" in __init__ 148. response.raise_for_status() # raises error on not 2XX HTTP status code File "/srv/modoboa/env/lib/python3.8/site-packages/requests/models.py" in raise_for_status 940. raise HTTPError(http_error_msg, response=self) Exception Type: HTTPError at /user/preferences/ Exception Value: 500 Server Error: Internal Server Error for url: https://mail.DOMAIN/radicale/postmaster@DOMAIN/contacts Request information: USER: postmaster@DOMAIN GET: No GET data POST: csrfmiddlewaretoken = '0NurMAgjUU4bJlaNbYNn1Vg9tBbHqRt6zfBIRwxdIesNB1Aj9ypiPS0bNBRCXleY' modoboa_contacts-enable_carddav_sync = 'True' modoboa_contacts-sync_frequency = '300' modoboa_sievefilters-editor_mode = 'gui' modoboa_sievefilters-trash_folder = 'Trash' modoboa_sievefilters-sent_folder = 'Sent' modoboa_sievefilters-drafts_folder = 'Drafts' modoboa_amavis-messages_per_page = '40' modoboa_webmail-displaymode = 'plain' modoboa_webmail-enable_links = 'False' modoboa_webmail-messages_per_page = '40' modoboa_webmail-refresh_interval = '300' modoboa_webmail-mboxes_col_width = '200' modoboa_webmail-trash_folder = 'Trash' modoboa_webmail-sent_folder = 'Sent' modoboa_webmail-drafts_folder = 'Drafts' modoboa_webmail-junk_folder = 'Junk' modoboa_webmail-editor = 'plain' modoboa_webmail-signature = '' FILES: No FILES data COOKIES: csrftoken = 'iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3' sessionid = 'gy84abio317s83tdmgorq1pes11sx1d7' META: CONTENT_LENGTH = '729' CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8' CSRF_COOKIE = 'iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3' 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_CONTENT_LENGTH = '729' HTTP_CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8' HTTP_COOKIE = 'csrftoken=iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3; sessionid=gy84abio317s83tdmgorq1pes11sx1d7' HTTP_HOST = 'mail.DOMAIN' HTTP_ORIGIN = 'https://mail.DOMAIN' HTTP_REFERER = 'https://mail.DOMAIN/user/' HTTP_SEC_FETCH_DEST = 'empty' HTTP_SEC_FETCH_MODE = 'cors' HTTP_SEC_FETCH_SITE = 'same-origin' HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36' HTTP_X_CSRFTOKEN = 'iq3pinUNNqZiCk2LFJCDo4DmCJCPiqLbRSaGnjbHBKnUu0shDjeyc1noWJiKPUw3' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' PATH_INFO = '/user/preferences/' QUERY_STRING = '' REMOTE_ADDR = '10.0.2.2' REMOTE_PORT = '10383' REQUEST_METHOD = 'POST' REQUEST_SCHEME = 'https' REQUEST_URI = '/user/preferences/' SCRIPT_NAME = '' SERVER_NAME = 'mail.DOMAIN' SERVER_PORT = '443' SERVER_PROTOCOL = 'HTTP/2.0' UWSGI_APPID = 'mail.DOMAIN|' UWSGI_SCRIPT = 'instance.wsgi:application' uwsgi.node = b'mail.DOMAIN' uwsgi.version = b'2.0.18-debian' wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> wsgi.file_wrapper = '' wsgi.input = <uwsgi._Input object at 0x7fba3d3835d0> wsgi.multiprocess = True wsgi.multithread = False wsgi.run_once = False wsgi.url_scheme = 'https' wsgi.version = '(1, 0)' Settings: Using settings module instance.settings ABSOLUTE_URL_OVERRIDES = {} ADMINS = [('Administrator', 'postmaster@DOMAIN')] ALLOWED_HOSTS = ['mail.DOMAIN'] AMAVIS_DEFAULT_DATABASE_ENCODING = 'utf8' APPEND_SLASH = True AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend',)" AUTH_PASSWORD_VALIDATORS = '********************' AUTH_USER_MODEL = 'core.User' BASE_DIR = '/srv/modoboa/instance' CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} CACHE_MIDDLEWARE_ALIAS = 'default' CACHE_MIDDLEWARE_KEY_PREFIX = '********************' CACHE_MIDDLEWARE_SECONDS = 600 CKEDITOR_ALLOW_NONIMAGE_FILES = False CKEDITOR_BROWSE_SHOW_DIRS = True CKEDITOR_CONFIGS = {'default': {'allowedContent': True, 'toolbar': 'Modoboa', 'width': None, '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']]}} 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 = 'csrftoken' CSRF_COOKIE_PATH = '/' CSRF_COOKIE_SAMESITE = 'Lax' CSRF_COOKIE_SECURE = True CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN' CSRF_TRUSTED_ORIGINS = [] CSRF_USE_SESSIONS = False DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'modoboa', 'USER': 'modoboa', 'PASSWORD': '********************', 'HOST': '127.0.0.1', 'PORT': '', 'ATOMIC_REQUESTS': True, 'OPTIONS': {'init_command': 'SET foreign_key_checks = 0;'}, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}, 'amavis': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'amavis', 'USER': 'amavis', 'PASSWORD': '********************', 'HOST': '127.0.0.1', 'PORT': '', 'ATOMIC_REQUESTS': True, 'OPTIONS': {'init_command': 'SET foreign_key_checks = 0;'}, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}} DATABASE_ROUTERS = ['modoboa_amavis.dbrouter.AmavisRouter'] DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATETIME_FORMAT = 'N j, Y, P' DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] DATE_FORMAT = 'N j, Y' DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] DEBUG = False DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = '.' DEFAULT_CHARSET = 'utf-8' DEFAULT_CONTENT_TYPE = 'text/html' DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL = 'webmaster@localhost' DEFAULT_INDEX_TABLESPACE = '' DEFAULT_TABLESPACE = '' DISABLE_DASHBOARD_EXTERNAL_QUERIES = False DISALLOWED_USER_AGENTS = [] EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_HOST_PASSWORD = '********************' EMAIL_HOST_USER = '' EMAIL_PORT = 25 EMAIL_SSL_CERTFILE = None EMAIL_SSL_KEYFILE = '********************' EMAIL_SUBJECT_PREFIX = '[Django] ' EMAIL_TIMEOUT = None EMAIL_USE_LOCALTIME = False EMAIL_USE_SSL = False EMAIL_USE_TLS = False FILE_CHARSET = 'utf-8' FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', '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 FORM_RENDERER = 'django.forms.renderers.DjangoTemplates' IGNORABLE_404_URLS = [] INSTALLED_APPS = "('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', 'phonenumber_field', 'modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.transport', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa.dnstools', 'modoboa_amavis', 'modoboa_pdfcredentials', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_stats', 'modoboa_webmail', 'modoboa_contacts', 'modoboa_radicale', 'webpack_loader')" INTERNAL_IPS = [] LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur'] LANGUAGE_CODE = 'en' LANGUAGE_COOKIE_AGE = None LANGUAGE_COOKIE_DOMAIN = None LANGUAGE_COOKIE_NAME = 'django_language' LANGUAGE_COOKIE_PATH = '/' LOCALE_PATHS = [] LOGGING = {'version': 1, 'formatters': {'syslog': {'format': '%(name)s: %(levelname)s %(message)s'}}, 'handlers': {'mail-admins': {'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', 'include_html': True}, 'syslog-auth': {'class': 'logging.handlers.SysLogHandler', 'facility': 4, 'formatter': 'syslog'}, 'modoboa': {'class': 'modoboa.core.loggers.SQLHandler'}}, 'loggers': {'django': {'handlers': ['mail-admins'], 'level': 'ERROR', 'propagate': False}, 'modoboa.auth': {'handlers': ['syslog-auth', 'modoboa'], 'level': 'INFO', 'propagate': False}, 'modoboa.admin': {'handlers': ['modoboa'], 'level': 'INFO', 'propagate': False}}} LOGGING_CONFIG = 'logging.config.dictConfig' LOGIN_REDIRECT_URL = '/accounts/profile/' LOGIN_URL = '/accounts/login/' LOGOUT_REDIRECT_URL = None MANAGERS = [] MEDIA_ROOT = '/srv/modoboa/instance/media' MEDIA_URL = '/media/' MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' 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')" MIGRATION_MODULES = {} MODOBOA_API_URL = '********************' MODOBOA_APPS = "('modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.transport', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa.dnstools', 'modoboa_amavis', 'modoboa_pdfcredentials', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_stats', 'modoboa_webmail', 'modoboa_contacts', 'modoboa_radicale')" MONTH_DAY_FORMAT = 'F j' NUMBER_GROUPING = 0 PASSWORD_HASHERS = '********************' PASSWORD_RESET_TIMEOUT_DAYS = '********************' PHONENUMBER_DB_FORMAT = 'INTERNATIONAL' PREPEND_WWW = False REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication')} ROOT_URLCONF = 'instance.urls' SECRET_KEY = '********************' SECURE_BROWSER_XSS_FILTER = False SECURE_CONTENT_TYPE_NOSNIFF = False SECURE_HSTS_INCLUDE_SUBDOMAINS = False SECURE_HSTS_PRELOAD = False SECURE_HSTS_SECONDS = 0 SECURE_PROXY_SSL_HEADER = None SECURE_REDIRECT_EXEMPT = [] SECURE_SSL_HOST = None SECURE_SSL_REDIRECT = False SERVER_EMAIL = 'postmaster@DOMAIN' SESSION_CACHE_ALIAS = 'default' SESSION_COOKIE_AGE = 1209600 SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_NAME = 'sessionid' SESSION_COOKIE_PATH = '/' SESSION_COOKIE_SAMESITE = 'Lax' SESSION_COOKIE_SECURE = True SESSION_ENGINE = 'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_FILE_PATH = None SESSION_SAVE_EVERY_REQUEST = False SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' SETTINGS_MODULE = 'instance.settings' SHORT_DATETIME_FORMAT = 'm/d/Y P' SHORT_DATE_FORMAT = 'm/d/Y' SIGNING_BACKEND = 'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS = ['security.W019', 'fields.W342'] SITE_ID = 1 STATICFILES_DIRS = "('/srv/modoboa/env/lib/python3.8/site-packages/modoboa/bower_components',)" STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_ROOT = '/srv/modoboa/instance/sitestatic' STATIC_URL = '/sitestatic/' TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'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'], 'debug': False}}] TEST_NON_SERIALIZED_APPS = [] TEST_RUNNER = 'django.test.runner.DiscoverRunner' THOUSAND_SEPARATOR = ',' TIME_FORMAT = 'P' TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE = 'Australia/Melbourne' 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': {'CACHE': True, 'BUNDLE_DIR_NAME': 'modoboa_contacts/', 'STATS_FILE': '/srv/modoboa/env/lib/python3.8/site-packages/modoboa_contacts/static/modoboa_contacts/webpack-stats.json', 'IGNORE': ['.+\\.hot-update.js', '.+\\.map']}, 'CALENDAR': {'CACHE': True, 'BUNDLE_DIR_NAME': 'modoboa_radicale/', 'STATS_FILE': '/srv/modoboa/env/lib/python3.8/site-packages/modoboa_radicale/static/modoboa_radicale/webpack-stats.json', 'IGNORE': ['.+\\.hot-update.js', '.+\\.map']}} WSGI_APPLICATION = 'instance.wsgi.application' X_FRAME_OPTIONS = 'SAMEORIGIN' YEAR_MONTH_FORMAT = 'F Y' ``` All I can gather from these is that there's a http 500 error coming from somewhere... I tried a few different changes to my nginx config just in case that was the issue but none work. Here's my nginx config if it'll help: ``` upstream modoboa { server unix:/run/uwsgi/app/modoboa_instance/socket fail_timeout=0; } server { server_name mail.DOMAIN; root /srv/modoboa/instance; client_max_body_size 10M; access_log /var/log/nginx/mail.DOMAIN-access.log; error_log /var/log/nginx/mail.DOMAIN-error.log; location /sitestatic/ { try_files $uri $uri/ =404; } location /media/ { try_files $uri $uri/ =404; } location / { include uwsgi_params; uwsgi_param UWSGI_SCRIPT instance.wsgi:application; uwsgi_pass modoboa; } location ~* ^/autodiscover/autodiscover.xml { include uwsgi_params; uwsgi_pass automx; } location /mobileconfig { include uwsgi_params; uwsgi_pass automx; } location /radicale/ { proxy_pass http://localhost:5232/; # The / is important! proxy_set_header X-Script-Name /radicale; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header Authorization; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/mail.DOMAIN/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/mail.DOMAIN/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot add_header Strict-Transport-Security "max-age=31536000" always; # managed by Certbot ssl_trusted_certificate /etc/letsencrypt/live/mail.DOMAIN/chain.pem; # managed by Certbot ssl_stapling on; # managed by Certbot ssl_stapling_verify on; # managed by Certbot } server { if ($host = mail.DOMAIN) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name mail.DOMAIN; root /srv/modoboa/instance; client_max_body_size 10M; access_log /var/log/nginx/mail.DOMAIN-access.log; error_log /var/log/nginx/mail.DOMAIN-error.log; location /sitestatic/ { try_files $uri $uri/ =404; } location /media/ { try_files $uri $uri/ =404; } location / { include uwsgi_params; uwsgi_param UWSGI_SCRIPT instance.wsgi:application; uwsgi_pass modoboa; } location ~* ^/autodiscover/autodiscover.xml { include uwsgi_params; uwsgi_pass automx; } location /mobileconfig { include uwsgi_params; uwsgi_pass automx; } location /radicale/ { proxy_pass http://localhost:5232/; # The / is important! proxy_set_header X-Script-Name /radicale; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header Authorization; } } ``` Have also tried this with localhost:5232 on the server and still returns the same error as above when trying to access the contacts list: ![image](https://user-images.githubusercontent.com/11571540/86718572-8fcd1200-c066-11ea-93f9-2eb37bf392d2.png) Creating a calendar event also does not work and gives me the following django error right after clicking 'create' for an event (API is enabled): ``` [Django] ERROR (EXTERNAL IP): Internal Server Error: /api/v1/user-calendars/1/events/ -- Internal Server Error: /api/v1/user-calendars/1/events/ PutError at /api/v1/user-calendars/1/events/ 500 Internal Server Error b'A server error occurred. Please contact the administrator.' ``` Absolutely everything else works except for carddav/caldav, any help would be greatly appreciated!
Author
Owner

@tonioo commented on GitHub (Sep 17, 2020):

@extragreen Can you try to manually install caldav 0.6.2?

<!-- gh-comment-id:694240565 --> @tonioo commented on GitHub (Sep 17, 2020): @extragreen Can you try to manually install caldav 0.6.2?
Author
Owner

@extragreen commented on GitHub (Nov 3, 2020):

Apologies for the delay, crazy year :) Yep so just at the start of my second post I rebuilt the virtualenv including all extensions and caldav 0.6.2 did install.

It's been a while since i've had time to work on the machine so I'm going to try a completely fresh install with the newer version later in the year and see what happens

<!-- gh-comment-id:720959645 --> @extragreen commented on GitHub (Nov 3, 2020): Apologies for the delay, crazy year :) Yep so just at the start of my second post I rebuilt the virtualenv including all extensions and caldav 0.6.2 did install. It's been a while since i've had time to work on the machine so I'm going to try a completely fresh install with the newer version later in the year and see what happens
Author
Owner

@KrystianPlichta commented on GitHub (Jan 5, 2022):

I have same issue on debian 10

Radicale management | 1.5.1
Contacts | 0.8.2

<!-- gh-comment-id:1005442595 --> @KrystianPlichta commented on GitHub (Jan 5, 2022): I have same issue on debian 10 Radicale management | 1.5.1 Contacts | 0.8.2
Author
Owner

@yga01 commented on GitHub (Mar 30, 2022):

Seems like I have comparable problem:

  • modoboa 1.17.0 on ubuntu server 20.04 lts
  • Radicale management 1.5.1
  • /srv/radicale/env/bin/radicale --version gives "3.1.5"
  • ps -ef | grep radicale gives "/srv/radicale/env/bin/python3 /srv/radicale/env/bin/radicale -C /etc/radicale/config"

in supervisord.log I see something which I think looks weird:
cat supervisord.log | grep radicale

2022-03-28 18:25:35,174 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing
2022-03-28 18:25:36,184 INFO spawned: 'radicale' with pid 31216
2022-03-28 18:25:37,187 INFO success: radicale entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 21:42:42,759 INFO waiting for policyd, radicale to die
2022-03-28 21:42:42,778 INFO stopped: radicale (exit status 0)
2022-03-28 21:43:31,740 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing
2022-03-28 21:43:32,751 INFO spawned: 'radicale' with pid 733
2022-03-28 21:43:33,752 INFO success: radicale entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-03-28 21:47:39,151 INFO waiting for policyd, radicale to die
2022-03-28 21:47:39,170 INFO stopped: radicale (exit status 0)
2022-03-28 21:48:29,716 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing
2022-03-28 21:48:30,726 INFO spawned: 'radicale' with pid 733
2022-03-28 21:48:31,727 INFO success: radicale entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

But maybe this is normal startup behaviour?

extragreen wrote: "On any user with a mailbox, selecting yes for the 'synchronise address book using CardDAV' option doesn't stick. It just reverts back to 'no' after a refresh of the page:" I have the same issue, switch doesn't stick.

Anyways, I can't connect to the caldav or carddav server.

<!-- gh-comment-id:1082794940 --> @yga01 commented on GitHub (Mar 30, 2022): Seems like I have comparable problem: - modoboa 1.17.0 on ubuntu server 20.04 lts - Radicale management 1.5.1 - /srv/radicale/env/bin/radicale --version gives "3.1.5" - ps -ef | grep radicale gives "/srv/radicale/env/bin/python3 /srv/radicale/env/bin/radicale -C /etc/radicale/config" in supervisord.log I see something which I think looks weird: cat supervisord.log | grep radicale ----- 2022-03-28 18:25:35,174 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing 2022-03-28 18:25:36,184 INFO spawned: 'radicale' with pid 31216 2022-03-28 18:25:37,187 INFO success: radicale entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-03-28 21:42:42,759 INFO waiting for policyd, radicale to die 2022-03-28 21:42:42,778 INFO stopped: radicale (exit status 0) 2022-03-28 21:43:31,740 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing 2022-03-28 21:43:32,751 INFO spawned: 'radicale' with pid 733 2022-03-28 21:43:33,752 INFO success: radicale entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-03-28 21:47:39,151 INFO waiting for policyd, radicale to die 2022-03-28 21:47:39,170 INFO stopped: radicale (exit status 0) 2022-03-28 21:48:29,716 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing 2022-03-28 21:48:30,726 INFO spawned: 'radicale' with pid 733 2022-03-28 21:48:31,727 INFO success: radicale entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ----- But maybe this is normal startup behaviour? extragreen wrote: "On any user with a mailbox, selecting yes for the 'synchronise address book using CardDAV' option doesn't stick. It just reverts back to 'no' after a refresh of the page:" I have the same issue, switch doesn't stick. Anyways, I can't connect to the caldav or carddav server.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1489
No description provided.