Getting Archives to work - new setup on Ubuntu 18.04 (with mailman3-full pkg)
Happy New Year!
I'm setting up my first Mailman 3 server and was delighted to find a distribution package for Ubuntu 18.04, since that's the environment I'm most familiar with working in, that installs an integrated mailman3-hyperkitty-postorius setup. The package install plus the additional config steps in the included README files have gotten me oh-so-very close! What isn't working yet are the archives, specifically the messages sent to lists showing up at .../mailman3/hyperkitty. I'm at a loss and I'm hoping maybe the folks on this list can help me bring it home.
Messages are distributed to subscribers as they should be - subscribers can send from their emails or from the web site. People can subscribe, etc. It's all working great. Just no archives.
I am able to successfully run these django-admin processes without errors (described here: http://docs.mailman3.org/en/latest/config-web.html#scheduled-tasks-required). I've run them all manually and then I've been running the minutely and hourly ones manually after each test message I send (haven't set up the actual cron jobs yet).
I'm not sure what to try next or what info to provide here for help - can anyone suggest where I can look to see why archives aren't getting created, or let me know what information would be essential for me to post to get help on this? I'm using PostgreSQL for the database, Postfix for mail and Apache2 for the web server.
Thanks for your time!
~Kelly
On 1/2/19 4:20 PM, kelly.close@lrewater.com wrote:
Happy New Year!
What isn't working yet are the archives, specifically the messages sent to lists showing up at .../mailman3/hyperkitty. I'm at a loss and I'm hoping maybe the folks on this list can help me bring it home.
Messages are distributed to subscribers as they should be - subscribers can send from their emails or from the web site. People can subscribe, etc. It's all working great. Just no archives.
Presumably the list is known to HyperKitty since you appear to be able to post from there.
I'm not sure what to try next or what info to provide here for help - can anyone suggest where I can look to see why archives aren't getting created, or let me know what information would be essential for me to post to get help on this? I'm using PostgreSQL for the database, Postfix for mail and Apache2 for the web server.
The first place to look is Mailman's mailman.log.
Are there errors there with tracebacks?
Are there messages there like
<timestamp> 2018 (9606) HyperKitty archived message <message-ID> to <archive_URL>
Also is there an Archived-At: header in received posts?
If either or both of those, what happens if you go to the URLs?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Yes - lists are known to Hyperkitty but no, no Archived-At header in received posts.
But, Bingo!
I hadn't looked at the log file immediately after trying to post a message so I missed this. I don't know the solution yet but ... what is this telling me? Something doesn't have the permissions it needs somewhere...
Jan 02 18:01:15 2019 (616) 127.0.0.1 - - "GET /3.0/lists/mailman3_test.udfcd-lists.org/member/udfcd.alert@gmail.com HTTP/1.1" 200 484 Jan 02 18:01:18 2019 (609) ACCEPT: <20190103010115.530.63813@udmailman> Jan 02 18:01:18 2019 (615) HyperKitty failure on https://udfcd-lists.org/mailman3/hyperkitty/api/mailman/urls: <html><title>Auth required</title><bod$ <h1>Authorization Required</h1></body></html> (401) ... (that line repeates 4 times) Jan 02 18:01:20 2019 (606) Exception in the HyperKitty archiver: <html><title>Auth required</title><body> <h1>Authorization Required</h1></body></html> Jan 02 18:01:20 2019 (606) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 154, in _archive_message url = self._send_message(mlist, msg) File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 210, in _send_message raise ValueError(result.text) ValueError: <html><title>Auth required</title><body> <h1>Authorization Required</h1></body></html>
I just verified that the api_key in the mailman-hyperkitty.cfg matches the 'MAILMAN_ARCHIVER_KEY' credential in mailman-web.py - I had to set that manually in the .cfg and thought maybe I messed that up. I also took a look at the MAILMAN_REST_API_... credentials in mailman-web.py (that's the settings_local.py file on the Ubuntu setup) and verified they matched the webservice credentials in the mailman.cfg, thinking that maybe this is a permissions issue related to the API?
The error message says HyperKitty failure on https://udfcd-lists.org/mailman3/hyperkitty/api/mailman/urls. I'm not sure if that's a clue or not - I can see the Authorization Required message at that address, to be sure. I looked into the referenced .py file at the line numbers referenced, and I can see the lines of code referenced in the error message, but I don't know why they are failing. I suspect I don't have a key or password or some other credential set properly in some file...but where?
What about the MAILMAN_REST_API_URL credential in the settings_local.py file? It's set to http://localhost:8001.
On 1/3/19 9:46 AM, kelly.close@lrewater.com wrote:
What about the MAILMAN_REST_API_URL credential in the settings_local.py file? It's set to http://localhost:8001.
What you have should be correct, and it's not related to this issue anyway.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 1/3/19 9:40 AM, kelly.close@lrewater.com wrote:
The error message says HyperKitty failure on https://udfcd-lists.org/mailman3/hyperkitty/api/mailman/urls. I'm not sure if that's a clue or not - I can see the Authorization Required message at that address, to be sure. I looked into the referenced .py file at the line numbers referenced, and I can see the lines of code referenced in the error message, but I don't know why they are failing. I suspect I don't have a key or password or some other credential set properly in some file...but where?
What do you have in your Django settings for MAILMAN_ARCHIVER_FROM
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I have what came with the file plus I added my machine's fixed IP address: MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1', '5.152.179.191')
Resolution for me:
I changed the api_key (in mailman-hyperkitty.cfg) and MAILMAN_ARCHIVER_KEY (in the Django local settings .py file) to something new, rather than using the original string that came with the settings file. I don't know if one of the characters in the original string is a no-no in my server environment (Ubuntu), or if a non-printing character was hiding in there, or WHAT, but...it works now!
participants (2)
-
kelly.close@lrewater.com
-
Mark Sapiro