On 06/08/2019 09:48, Phil Thompson wrote:
On 06/08/2019 03:38, Abhilash Raj wrote:
On Mon, Aug 5, 2019, at 10:06 AM, Phil Thompson wrote:
I'm in the process of setting up mailman3. The only problem I seem to be having is getting Hyperkitty to archive messages. Rather than the authorisation problems people have previously asked about on the list, I am getting a 403 error...
Aug 05 15:38:40 2019 (10229) HyperKitty failure on http://localhost/mailman3/hyperkitty/api/mailman/urls: <html><title>Forbidden</title><body> <h1>Access is forbidden</h1></body></html> (403) Aug 05 15:38:58 2019 (10222) HyperKitty failure on http://localhost/mailman3/hyperkitty/api/mailman/archive: <html><title>Forbidden</title><body> <h1>Access is forbidden</h1></body></html> (403)
Any suggestions would be appreciated.
How did you install Hyperkitty?
On Ubuntu...
apt-get install mailman3-full
You probably need to the set the API key correctly in both Core and Hyperkitty.
Have you looked at documentation here1?
Note that the MAILMAN_ARCHIVER_KEY = "value" (this value should be in quotes, single or double, doesn't matter) in your settings.py for Web (Django) should be same as the
api_key : value
(without quotes here in hyperkitty.cfg config file).That's all correct. I'm familiar with the authorisation issues that other people have had.
The only thing I'm doing differently (as far as I am aware) is that I'm using a URL prefixed with /mailman3 which is stripped off in my nginx configuration...
# mailman3. location /mailman3/ { uwsgi_pass unix:/run/mailman3/web/uwsgi.sock; include uwsgi_params; uwsgi_param SERVER_ADDR $server_addr; uwsgi_modifier1 30; uwsgi_param SCRIPT_NAME /mailman3; } location /mailman3/static { alias /var/lib/mailman3/web/static; } location /mailman3/static/favicon.ico { alias /var/lib/mailman3/web/static/postorius/img/favicon.ico; }
...but I don't see this affecting the mailman to Hyperkitty communication. Posting to lists and the Postorius and Hyperkitty frontends seem to work fine.
I have now fixed the 403 error (by setting MAILMAN_ARCHIVER_FROM to my public IP address). However I now get a 400 Bad Request error.
I have traced this to the archive() function in hyperkitty/views/mailman.py which is expect a POST but is actually getting a GET, specifically...
GET '/mailman3/hyperkitty/api/mailman/archive?key=...'
...which seems to be a fairly fundamental problem.
Again, any suggestions would be welcome.
Phil