Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

mailman_web complains about hyperkitty (local) webcalls #332

Closed
gmanic opened this issue May 31, 2019 · 3 comments
Closed

mailman_web complains about hyperkitty (local) webcalls #332

gmanic opened this issue May 31, 2019 · 3 comments
Labels

Comments

@gmanic
Copy link

gmanic commented May 31, 2019

Installed working MM core/web. When writing a new list msg, no archive entry is being created, by starting a new thread on hyperkitty list page mailman_web log always complains:

ERROR 2019-05-30 20:29:57,016 22 django.security.DisallowedHost Invalid HTTP_HOST header: 'mailman_web:8000'. The domain name provided is not valid according to RFC 1034/1035.
WARNING 2019-05-30 20:29:57,016 22 django.request Bad Request: /api/mailman/archive
WARNING 2019-05-30 20:29:57,016 22 django.request Bad Request: /api/mailman/archive

Tried exact hostname as well as '*' as DJANGO_ALLOWED_HOSTS, but no change. According to Django 2.2 src https://docs.djangoproject.com/en/2.2/_modules/django/http/request/ this should not happen (domain -> present and allowed_host -> '*').

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.69. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug label May 31, 2019
@gmanic
Copy link
Author

gmanic commented Nov 10, 2019

Update. The error msg "domain name not valid according to RFC" goes away, if you define the hostname without _ (underline). Django's function "valid_hostname" checks on this.

Unfortunately, the "bad request" stays. mailman-core (different docker container to mailman-web) cannot fetch templates and no mails reach the archive.

@gmanic
Copy link
Author

gmanic commented Nov 10, 2019

Solved.

Two comments. As mentioned on another list (actually, lists.mailman3.org, documentation is spread way to far apart), MAILMAN_HOST_IP must not be set to a hostname. This is very unfortunate in an environment with automagic provisioning.

Second, if you want to avoid Django's security problems (DJANGO_ALLOWED_HOSTS), use asterisk (*) instead of hyphenated asterisk ("*")

@gmanic gmanic closed this as completed Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant