Search results for query "sapiro"
- 6217 messages
[MM3-users] Re: Problem with missing MySQLDatabase
by Peter Sørensen
Hi Mark,
Unfortunately I answered on ³auto response not sent² instead of this -
sorry.
In the meantime I found one problem. The comment I¹ve put at the end of
line ## MOD ..
This is not the way to do it in Python. I normally use Perl and not a
Python as script language.
Deleteing the #Š Made this problem disappear but instead below problem
showed up.
/etc/mailman3# mailman aliases
Traceback (most recent call last):
File /usr/bin/mailman, line 11, in <module>
load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')()
File /usr/lib/python3/dist-packages/mailman/bin/mailman.py, line 94, in
main
initialize(config_path)
File /usr/lib/python3/dist-packages/mailman/core/initialize.py, line
189, in initialize
initialize_2(propagate_logs=propagate_logs)
File /usr/lib/python3/dist-packages/mailman/core/initialize.py, line
160, in initialize_2
config.db = getUtility(IDatabaseFactory, utility_name).create()
File /usr/lib/python3/dist-packages/mailman/database/factory.py, line
54, in create
database.initialize()
File /usr/lib/python3/dist-packages/mailman/database/base.py, line 106,
in initialize
self.engine = create_engine(url, isolation_level='READ UNCOMMITTED')
File /usr/lib/python3/dist-packages/sqlalchemy/engine/__init__.py, line
387, in create_engine
return strategy.create(*args, **kwargs)
File /usr/lib/python3/dist-packages/sqlalchemy/engine/strategies.py,
line 80, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File
/usr/lib/python3/dist-packages/sqlalchemy/dialects/mysql/pymysql.py, line
62, in dbapi
return __import__('pymysql')
ModuleNotFoundError: No module named Œpymysql'
I have installed pymysql with: pip install pymysql
When I do this once more I get
pip install pymysql
Requirement already satisfied: pymysql in
/usr/local/lib/python2.7/dist-packages
Requirement already satisfied: cryptography in
/usr/lib/python2.7/dist-packages (from pymysql)
So the problem has probably to do with this installed in python2.7 and not
python3.
How do I solve that ?
Best regards
Peter Sørensen
University of Southern Denmark
Den 19/10/18 19:13 skrev "Mark Sapiro" <mark(a)msapiro.net>:
>On 10/19/18 3:44 AM, Peter Sørensen wrote:
>> Hi,
>>
>> I have looked into installing this before without success but found
>> The Debian package Mailman3-full
>>
>> I installed this succesfully along with the mailman-suite.
>> I have configured varios setting but are stuck when trying to generate
>>aliases
>> For mailman with:
>>
>> mailman aliases
>> Traceback (most recent call last):
>> File /usr/bin/mailman, line 11, in <module>
>> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')()
>> File /usr/lib/python3/dist-packages/mailman/bin/mailman.py, line 94,
>>in main
>> initialize(config_path)
>> File /usr/lib/python3/dist-packages/mailman/core/initialize.py, line
>>189, in initialize
>> initialize_2(propagate_logs=propagate_logs)
>> File /usr/lib/python3/dist-packages/mailman/core/initialize.py, line
>>160, in initialize_2
>> config.db = getUtility(IDatabaseFactory, utility_name).create()
>> File /usr/lib/python3/dist-packages/mailman/database/factory.py, line
>>52, in create
>> database = call_name(database_class)
>> File /usr/lib/python3/dist-packages/mailman/utilities/modules.py,
>>line 67, in call_name
>> named_callable = find_name(dotted_name)
>> File /usr/lib/python3/dist-packages/mailman/utilities/modules.py,
>>line 50, in find_name
>> __import__(package_path)
>> ModuleNotFoundError: No module named
>>'mailman.database.mysql.MySQLDatabase\t\t\t#MOD(inserted ) 02';
>>'mailman.database.mysql' is not a package
>>
>> I can see from the message that I¹m missing a module but I can¹t figure
>>out. how to get
>> This installed. The mudule is referenced in the mailman.cfg as
>> class: mailman.database.mysql.MySQLDatabase
>
>
>The module mailman.database.mysql is part of mailman core. In your case,
>it should be /usr/lib/python3/dist-packages/mailman/database/mysql.py.
>If that file exists, I don't know what the problem might be. If not,
>there is something wrong with your installation. In any case, this is a
>Debian issue. You need to take it up with Debian.
>
>--
>Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
>San Francisco Bay Area, California better use your sense - B. Dylan
>_______________________________________________
>Mailman-users mailing list -- mailman-users(a)mailman3.org
>To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
7 years, 6 months
[MM3-users] Re: Mailman installation results in KeyError: 'env_py'
by Abhilash Raj
On Sun, Oct 22, 2017, at 09:36 AM, Marvin Gülker wrote:
> Am 22. October 2017 um 07:49 Uhr -0700 schrieb Mark Sapiro
> <mark(a)msapiro.net>:
> > or you can install the fix at
>
> Thanks. Applying this patch makes it work. Now I've got a different
> problem, though. I can't get it to connect to Postfix for sending
> emails it appears. After I created a superuser account using
>
> $ python manage.py createsuperuser
>
> as described on <http://postorius.readthedocs.io/en/latest/setup.html>,
> I tried to login using this credentials into Postorius. It then reported
> it sent a confirmation email to me (for an account I created on
> commandline?!), but Postfix' logs reveal that it didn't; there's not
> even a sign of an attempted delivery in /var/log/mail.log. I've
> configured the Postfix configuration in mailman.cfg like this:
>
> [mta]
> incoming: mailman.mta.postfix.LMTP
> outgoing: mailman.mta.deliver.deliver
> lmtp_host: 127.0.0.1
> lmtp_port: 8024
> smtp_host: localhost
> smtp_port: 25
> configuration: python:mailman.config.postfix
>
> as was outlined on
> <http://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html>.
>
> mailman-suite's settings.py contains:
>
> # Change this when you have a real email backend
> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
> EMAIL_HOST = 'localhost'
> EMAIL_PORT = 25
>
> which was described on <http://docs.list.org/en/latest/config-web.html>.
>
> For completeness, the following is in Postfix' main.cf, but is not the
> cause of the problem as it affects the incoming direction, whereas I
> refer to the outgoing one:
>
> transport_maps = hash:/home/mailman/var/data/postfix_lmtp
> local_recipient_maps = hash:/home/mailman/var/data/postfix_lmtp
>
> I failed to locate any kind of logging information about the failed
> email, so I don't even know where I should start looking for the
> problem. var/logs/smtp.log is empty in the mailman directory, and
> likewise is logs/mailmansuite.log in the mailman-suite_project
> directory.
As Simon mentioned, try using DEBUG=False, if you don't already have
that. With DEBUG=True, you should see emails printed in a `emails`
directory under `mailman-suite_project` directory.
This is a confirmation email to verify the email addresses, which
happens even if you create an account from command line.
> That being said, the enormous number of configuration files to consider
> and dozens of cross-references to other pages in the docs make the
> installation guide hard to follow; it also lacks logical structure in my
> opinion, when it refers to parts of the configuration which are later
> explained. For someone like me who never programmed a Django application
> (Ruby dev) this is all pretty cryptic. Especially, that some parts of
> information are on <http://docs.list.org/en/latest/index.html> whereas
> other parts are scattered over readthedocs.io makes it very
> complicated.
There are only two primary configuration files (there are a few more for
finer configurations ;-):
- mailman.cfg: This is the configuration for the Core engine and can be
located any of the places mentioned in [1] or pointed to by environment
var MAILMAN_CONFIG_FILE.
- settings.py: This is the configuration file for Django under
`mailman-suite_project` and controls the frontend (Postorius &
Hyperkitty). Django is a huge framework with literally 1000s of options.
It would be impossible to copy that information from Django's
documentation and keep it updated in our docs. Hence, we have links to
appropriate places when needed. Same goes out for the rest of the
libraries that we use.
All the settings mentioned in the documentation go to either of these
files, except, when configuring web server and mail server. Please open
an issue[2] if it is not clear where a particular configuration snippet
goes and we will fix it.
[1]: http://docs.mailman3.org/en/latest/config-core.html
[2]: https://gitlab.com/mailman/mailman-suite-doc/issues
Hope that helps!
--
Abhilash Raj
maxking(a)asynchronous.in
8 years, 6 months
[MM3-users] mailman-web migrate fails: KeyError: 'django'
by David Newman
Following the venv installation docs on a Debian 10 system, the command
"mailman-web migrate" fails with a "KeyError: 'django'" error.
Output pasted below [1].
There's an earlier thread on this error [2] but I think the cause may be
different. Even so, per Mark Sapiro's suggestion I changed STATIC_ROOT
to /opt/mailman/mm/var/static in settings.py. In mailman.cfg, var_dir is
at the default setting of /opt/mailman/mm/var/static.
I previously had tried creating /opt/mailman/mm/web/logs and chown'ing
it to mailman, but "mailman-web migrate" failed with the same error.
FWIW, mailman-web and hyperkitty installation initially failed with the
suggesting that I upgrade pip, which I did using " pip install --upgrade
pip".
Thanks in advance for troubleshooting clues.
dn
[1]
(venv) mailman@somehost:~$ mailman-web migrate
Traceback (most recent call last):
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/utils.py", line
66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/backends/django.py",
line 121, in get_package_libraries
module = import_module(entry[1])
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File
"/opt/mailman/venv/lib/python3.7/site-packages/hyperkitty/templatetags/decorate.py",
line 4, in <module>
from hyperkitty.lib.renderer import markdown_renderer, text_renderer
File
"/opt/mailman/venv/lib/python3.7/site-packages/hyperkitty/lib/renderer.py",
line 7, in <module>
from mistune.scanner import escape_html, escape_url
ImportError: cannot import name 'escape_html' from 'mistune.scanner'
(/opt/mailman/venv/lib/python3.7/site-packages/mistune/scanner.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/mailman/venv/bin/mailman-web", line 8, in <module>
sys.exit(main())
File
"/opt/mailman/venv/lib/python3.7/site-packages/mailman_web/manage.py",
line 30, in main
execute_from_command_line(sys.argv)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/__init__.py",
line 401, in execute_from_command_line
utility.execute()
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/__init__.py",
line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/base.py",
line 328, in run_from_argv
self.execute(*args, **cmd_options)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/base.py",
line 366, in execute
self.check()
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/base.py",
line 395, in check
include_deployment_checks=include_deployment_checks,
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/commands/migrate.py",
line 64, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/management/base.py",
line 382, in _run_checks
return checks.run_checks(**kwargs)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/core/checks/registry.py",
line 72, in run_checks
new_errors = check(app_configs=app_configs)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/contrib/admin/checks.py",
line 76, in check_dependencies
for engine in engines.all():
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/utils.py", line
90, in all
return [self[alias] for alias in self]
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/utils.py", line
90, in <listcomp>
return [self[alias] for alias in self]
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/utils.py", line
81, in __getitem__
engine = engine_cls(params)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/backends/django.py",
line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/backends/django.py",
line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/backends/django.py",
line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File
"/opt/mailman/venv/lib/python3.7/site-packages/django/template/backends/django.py",
line 125, in get_package_libraries
"trying to load '%s': %s" % (entry[1], e)
django.template.library.InvalidTemplateLibrary: Invalid template library
specified. ImportError raised when trying to load
'hyperkitty.templatetags.decorate': cannot import name 'escape_html'
from 'mistune.scanner'
(/opt/mailman/venv/lib/python3.7/site-packages/mistune/scanner.py)
[2]
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/…
4 years, 4 months
[MM3-users] Re: Badsignature on uwsgi-error.log
by David Partain
Hi Mark & all,
Thanks for the response. Just picking up where we are at the moment to provide a bit more info, in case you have ideas. Thanks, Stephen T. as well for the idea of turning on DEBUG. We might resort to that in the end.
This is what our system is running right now:
Mailman Core Version GNU Mailman 3.3.9 (Tom Sawyer)
Mailman Core API Version 3.1
Mailman Core Python Version 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
As previously noted, we moved this off of an old Ubuntu package-based installation that has delivered mail reliably but many other things haven't worked well, so we're happy to be on something that might improve that situation.
Right now, archiving is not working on the new installation, both building the archive on the new installation after the move and for new messages.
uwsgi-error.log is getting blasted with constant errors along the lines of what follows. I suspect that these errors are why archiving isn't working, but I obviously don't know that:
Message: BadSignature('Signature "ZWBXqQmWZwHTfa390lLIacpp8NQ" does not match')
Arguments: ('Traceback (most recent call last):
File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 356, in pusher
task = SignedPackage.loads(task[1])
File "/local/mailman/venv/lib/python3.10/site-packages/django_q/signing.py", line 25, in loads
return signing.loads(
File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 35, in loads
base64d = force_bytes(TimestampSigner(key, salt=salt).unsign(s, max_age=max_age))
File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 70, in unsign
result = super(TimestampSigner, self).unsign(value)
File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 55, in unsign
raise BadSignature(\'Signature "%s" does not match\' % sig)
django.core.signing.BadSignature: Signature "ZWBXqQmWZwHTfa390lLIacpp8NQ" does not match',)
What we have in our config files on the old installation and new installation are (the quotes are exactly as they are in the files):
Old installation:
mailman-web.py
SECRET_KEY = 'somerandomstringiaintputtinginmail'
MAILMAN_ARCHIVER_KEY = 'somerandomstringiaintputtinginmail'
mailman-hyperkitty.cfg
api_key: somerandomstringiaintputtinginmail
New installation:
settings.py
SECRET_KEY = 'somerandomstringiaintputtinginmail'
MAILMAN_ARCHIVER_KEY = 'somerandomstringiaintputtinginmail'
mailman-hyperkitty.cfg
api_key: somerandomstringiaintputtinginmail
All of that says that the value is the same for all three (whether I should have done so or not...) and those settings were carried along to the new installation as well.
Django is a big scary beast as I've not had to manage django apps before. Would it make sense that the error above is because what I _think_ django believes is the SECRET_KEY (in the config files above) is in fact not what django believes? Maybe it was set during installation (which I didn't do)? I don't believe anyone has purposefully changed it.
I suppose I could do something like https://medium.com/django-unleashed/securing-django-applications-best-pract… to reset the secret key, but I'm not doing that on Friday afternoon :)
If anyone has other thoughts, please holler. Wishing you all a good weekend from lighter-by-the-day Sweden.
Cheers,
David
-----Original Message-----
From: Mark Sapiro <mark(a)msapiro.net<mailto:Mark%20Sapiro%20%3cmark@msapiro.net%3e>>
To: mailman-users(a)mailman3.org<mailto:mailman-users@mailman3.org>
Subject: [MM3-users] Re: Badsignature on uwsgi-error.log
Date: Wed, 20 Mar 2024 18:12:20 -0700
On 3/20/24 14:25, Helio Loureiro wrote:
Hi,
I keep receiving a lot of errors like this:
--- Logging error ---
Traceback (most recent call last):
...
"/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py",
line 55, in unsign
raise BadSignature('Signature "%s" does not match' % sig)
django.core.signing.BadSignature: Signature "F6V0Dr_SvBsx5-cY8vcvLXrX8tA"
does not match
...
The api_key on mailman-hypperkitty.cfg, SECRET_KEY and MAILMAN_ARCHIVE_KEY
on setting.py are the same.
Of those three, the api_key on mailman-hypperkitty.cfg and
MAILMAN_ARCHIVE_KEY must match. SECRET_KEY is different. It is a Django
thing and has nothing to do with the others. See https://docs.djangoproject.com/en/5.0/ref/settings/#secret-key
If you changed it, that's the issue. If you know what it was previously,
you could set the previous value in SECRET_KEY_FALLBACKS, see https://docs.djangoproject.com/en/5.0/ref/settings/#secret-key-fallbacks
2 years, 1 month
[MM3-users] Re: Fwd: [Django] ERROR (EXTERNAL IP): Internal Server Error: /archives/search
by Odhiambo Washington
On Sat, Jan 28, 2023 at 7:44 PM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 1/27/23 23:53, Odhiambo Washington wrote:
> >
> > I have reread what you wrote now and I'm beginning to get the hang of
> this
> > method.
> > My observation is that it can only be _obvious_ to someone very familiar
> > with Python config
> > to decipher that *additional* settings *that can be augmented or
> overridden
> > in /etc/mailman3/settings.py* can be obtained from:
> > /PATH-TO/mailman_web/settings/{base|mailman}.py after they have noticed
> > these two lines in
> > the sample settings given in /etc/mailman3/settings.py:
> >
> > from mailman_web.settings.base import *from
> > mailman_web.settings.mailman import *
>
>
> This is how it was always done in Mailman 2.1 and how it should have
> been done in Mailman 3's Django web UI from the start, but wasn't.
>
> MM 2.1 had mm_cfg.py which had
> ```
> from Defaults import *
>
> ##################################################
> # Put YOUR site-specific settings below this line.
> ```
>
>
> > [At first instance, it is not obvious that mailman_web.settings.base and
> > mailman_web.settings.mailman are
> > actually paths in Python - which magically translates to
> > mailman_web/settings/base.py and mailman_web/settings/mailman.py]
>
> This is very basic Python.
>
>
> > Granted, I am a slow learner, and perhaps already so mixed up after
> reading
> > the myriad HOWTOs for
> > installing MM3 that are available online. I am tempted to say there are
> > many like me who are likely to
> > miss "where to obtain" other settings from.
> >
> > For example, my mind all along has been tuned to having a
> settings_local.py
> > for overriding the settings.py.
> > However, with this particular documentation, it would appear that
> > everything is intended to just go into /etc/mailman3/settings.py.
>
>
> In that method you had the defaults in settings.py which at the end
> imported settings_local.py.
>
> This method has defaults in
> /PATH-TO/mailman_web/settings/{base|mailman}.py and those are imported
> at the beginning of settings.py which then has overrides. This is
> preferable because it allows things in settings.py like
> ```
> HAYSTACK_CONNECTIONS['default']['PATH'] = 'some path'
> ```
> to just override that one thing rather than having to redefine all of
> HAYSTACK_CONNECTIONS or import it from settings in settings_local.py.
>
>
> > Is it possible to modify the documentation to somehow make it obvious
> (in a
> > language that a layman can easily understand,
> > that those two "import *" _DO establish a base set of settings that can
> be
> > augmented or overridden in /etc/mailman3/settings.py_
> > and that those settings are in what file(s) ?
>
>
> Again, this is very basic Python, but if you submit a merge request to
> update
>
> https://gitlab.com/mailman/mailman-suite-doc/-/blob/master/source/install/v…,
>
> we'll certainly consider it.
>
Hi Mark,
Before I wrote this email that you have responded to, I was in the process
of writing another email to you offlist. I kept it in abbeyance.
Now that you have mentioned
https://gitlab.com/mailman/mailman-suite-doc/-/blob/master/source/install/v…,,
please show me how to import it, edit. Then I can submit a diff.
Alternatively, I'd love to be given access to edit that document (and the
edit can be reviewed before getting published) to make it easy to follow by
someone with zero python background.
I am willing to invest some time in improving it for laymen.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
3 years, 3 months
[MM3-users] Re: Migrating mailman3 to latest ubuntu lts
by Helio Loureiro
Hi,
Indeed it was the configuration. It was placed into
/etc/mailman3/mailman-web.py. After a I changed to
/etc/mailman3/settings.py a few things advanced a little bit more.
I had to figure out how to fix mysqlclient installation since there isn't a
mention about it and the simple "pip install mysqclient" was breaking with
pkg-config issues. But it did work at the end.
Now I can see further messages on mailman3-web than before.
(venv) mailman@new-server ~ (v3.3.9)> mailman-web migrate
System check identified some issues:
WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique
constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you don't care
about it.
account.EmailAddress: (models.W043) MariaDB does not support indexes on
expressions.
HINT: An index won't be created. Silence this warning if you don't care
about it.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
Applying account.0004_alter_emailaddress_drop_unique_email...Traceback
(most recent call last):
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 89, in _execute
return self.cursor.execute(sql, params)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
line 75, in execute
return self.cursor.execute(query, args)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
179, in execute
res = self._query(mogrified_query)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
330, in _query
db.query(q)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
line 257, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (2013, 'Lost connection to MySQL server during
query')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/local/mailman/venv/bin/mailman-web", line 8, in <module>
sys.exit(main())
File
"/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py",
line 90, in main
execute_from_command_line(sys.argv)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py",
line 446, in execute_from_command_line
utility.execute()
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py",
line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
line 402, in run_from_argv
self.execute(*args, **cmd_options)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
line 448, in execute
output = self.handle(*args, **options)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
line 96, in wrapped
res = handle_func(*args, **kwargs)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py",
line 349, in handle
post_migrate_state = executor.migrate(
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py",
line 135, in migrate
state = self._migrate_all_forwards(
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py",
line 167, in _migrate_all_forwards
state = self.apply_migration(
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py",
line 252, in apply_migration
state = migration.apply(state, schema_editor)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/migration.py",
line 130, in apply
operation.database_forwards(
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/operations/fields.py",
line 235, in database_forwards
schema_editor.alter_field(from_model, from_field, to_field)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py",
line 788, in alter_field
self._alter_field(
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py",
line 858, in _alter_field
self.execute(self._delete_unique_sql(model, constraint_name))
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py",
line 199, in execute
cursor.execute(sql, params)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 67, in execute
return self._execute_with_wrappers(
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 84, in _execute
with self.db.wrap_database_errors:
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/utils.py", line
91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 89, in _execute
return self.cursor.execute(sql, params)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
line 75, in execute
return self.cursor.execute(query, args)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
179, in execute
res = self._query(mogrified_query)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
330, in _query
db.query(q)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
line 257, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server
during query')
Which seems to be complaining with DB credentials. But they're properly
set and it works via mysql command line.
(venv) mailman@new-server ~ (v3.3.9)> mysql -umailman3web -p mailman3web
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
MariaDB [mailman3web]> show tables;
+-------------------------------+
| Tables_in_mailman3web |
+-------------------------------+
| account_emailaddress |
| account_emailconfirmation |
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| django_admin_log |
| django_content_type |
| django_mailman3_maildomain |
| django_mailman3_profile |
| django_migrations |
| django_q_ormq |
| django_q_schedule |
| django_q_task |
| django_session |
| django_site |
| hyperkitty_attachment |
| hyperkitty_email |
| hyperkitty_favorite |
| hyperkitty_lastview |
| hyperkitty_mailinglist |
| hyperkitty_profile |
| hyperkitty_sender |
| hyperkitty_tag |
| hyperkitty_tagging |
| hyperkitty_thread |
| hyperkitty_threadcategory |
| hyperkitty_vote |
| socialaccount_socialaccount |
| socialaccount_socialapp |
| socialaccount_socialapp_sites |
| socialaccount_socialtoken |
+-------------------------------+
34 rows in set (0.000 sec)
On the /etc/mailman3/settings.py:
(venv) mailman@seliius26224 ~ (v3.3.9)> cat /etc/mailman3/settings.py |
grep -v "#" | grep -v '^$'
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
ADMINS = (
('Mailman Suite Admin', 'root@localhost'),
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mailman3web',
'USER': 'mailman3web',
'PASSWORD': '*******************',
'HOST': 'localhost',
'PORT': '3306',
}
}
STATIC_ROOT = '/local/mailman/web/static'
COMPRESS_ENABLED = True
LOGGING['handlers']['file']['filename'] =
'/local/mailman/web/logs/mailmanweb.log'
ALLOWED_HOSTS = [
"127.0.0.1",
"*"
]
CSRF_TRUSTED_ORIGINS = [
]
SITE_ID = 1
SECRET_KEY = '****************************************'
DEFAULT_FROM_EMAIL = 'admin(a)mailman.domain.com'
SERVER_EMAIL = 'admin(a)mailman.domain.com'
MAILMAN_REST_API_URL = 'http://localhost:8001'
MAILMAN_REST_API_USER = 'restadmin'
MAILMAN_REST_API_PASS = '***************************'
MAILMAN_ARCHIVER_KEY = '****************************'
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1', '1.2.3.4')
HAYSTACK_CONNECTIONS = {
'default': {
'PATH': "/opt/mailman/web/xapian_index",
'ENGINE': 'xapian_backend.XapianEngine'
},
}
And /local/mailman/web/logs/mailmanweb.log is empty.
Best Regards,
Helio Loureiro
https://helio.loureiro.eng.br
https://github.com/helioloureiro
https://mastodon.social/@helioloureiro
On Sun, 17 Dec 2023 at 16:35, Mark Sapiro <mark(a)msapiro.net> wrote:
> On 12/16/23 10:12 AM, Helio Loureiro wrote:
> > Hi,
> >
> > Well... not that good. Now it is mailman3-web that doesn't work.
> >
> > mailman@new-machine ~ (v3.3.9)> source venv/bin/activate.fish
> > (venv) mailman@new-machine ~ (v3.3.9)> mailman-web
> >
> > Type 'mailman-web help <subcommand>' for help on a specific subcommand.
> >
> > Available subcommands:
> >
> > [django]
> > check
> > compilemessages
> > createcachetable
> > dbshell
> > diffsettings
> > dumpdata
> > flush
> > inspectdb
> > loaddata
> > makemessages
> > makemigrations
> > migrate
> > optimizemigration
> > runserver
> > sendtestemail
> > shell
> > showmigrations
> > sqlflush
> > sqlmigrate
> > sqlsequencereset
> > squashmigrations
> > startapp
> > startproject
> > test
> > testserver
>
> This response indicates that `mailman-web` is not getting settings.py.
> Have you configured /etc/mailman3/settings.py? See
> <
> https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configu…
> >.
>
> > (venv) mailman@new-machine ~ (v3.3.9)> mailman-web check
> > System check identified no issues (0 silenced).
> > (venv) mailman@new-machine ~ (v3.3.9)> mailman-web check migrate
>
> You should run `mailman-web migrate` not `mailman-web check migrate`
> plus others. See
> <
> https://docs.mailman3.org/en/latest/install/virtualenv.html#run-database-mi…>
>
> et.seq. but first you need the appropriate settings so `mailman-web`
> returns something like
> ```
> $ mailman-web
>
> Type 'mailman-web help <subcommand>' for help on a specific subcommand.
>
> Available subcommands:
>
> [account]
> account_unsetmultipleprimaryemails
>
> [auth]
> changepassword
> createsuperuser
>
> [compressor]
> compress
> mtime_cache
>
> [contenttypes]
> remove_stale_contenttypes
>
> [django]
> check
> compilemessages
> createcachetable
> dbshell
> diffsettings
> dumpdata
> flush
> inspectdb
> loaddata
> makemessages
> makemigrations
> migrate
> optimizemigration
> sendtestemail
> shell
> showmigrations
> sqlflush
> sqlmigrate
> sqlsequencereset
> squashmigrations
> startapp
> startproject
> test
> testserver
>
> [django_extensions]
> admin_generator
> clean_pyc
> clear_cache
> compile_pyc
> create_command
> create_jobs
> create_template_tags
> delete_squashed_migrations
> describe_form
> drop_test_database
> dumpscript
> export_emails
> find_template
> generate_password
> generate_secret_key
> graph_models
> list_model_info
> list_signals
> mail_debug
> managestate
> merge_model_instances
> notes
> pipchecker
> print_settings
> print_user_for_session
> raise_test_exception
> reset_db
> reset_schema
> runjob
> runjobs
> runprofileserver
> runscript
> runserver_plus
> set_default_site
> set_fake_emails
> set_fake_passwords
> shell_plus
> show_template_tags
> show_urls
> sqlcreate
> sqldiff
> sqldsn
> sync_s3
> syncdata
> unreferenced_files
> update_permissions
> validate_templates
>
> [django_q]
> qcluster
> qinfo
> qmemory
> qmonitor
>
> [haystack]
> build_solr_schema
> clear_index
> haystack_info
> rebuild_index
> update_index
>
> [hyperkitty]
> attachments_to_file
> hyperkitty_import
> hyperkitty_warm_up_cache
> mailman_sync
> update_index_one_list
>
> [postorius]
> mmclient
> reset_passwords
>
> [rest_framework]
> generateschema
>
> [sessions]
> clearsessions
>
> [staticfiles]
> collectstatic
> findstatic
> runserver
> ```
>
>
> --
> Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
>
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
> Archived at:
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
>
> This message sent to helio(a)loureiro.eng.br
>
2 years, 4 months
[MM3-users] Re: Apache+mod_wsgi issue
by Odhiambo Washington
On Thu, Dec 22, 2022 at 8:02 PM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 12/22/22 03:49, Odhiambo Washington wrote:
> >
> > My challenge now is to get Apache+mod_uwsgi to serve my pages,
>
> I assume that's a typo. I.e, mod_wsgi, not mod_uwsgi.
>
That's right :)
> > but I am hitting the error below which has gotten me stuck.
> > Thanking you in advance for your advice on how to overcome this.
> >
> ...> [Thu Dec 22 14:21:23.041064 2022] [wsgi:error] [pid 4288] [remote
> > 197.232.81.246:15107] ModuleNotFoundError: No module named 'settings'
>
>
> Django can't import your settings.py. Is the directory that contains it
> in your Python path and does that directory contain (an empty) __init__.py?
>
Here is the VHOST...
<CUT> vhost ---8<
[00:53 mm ]$ less /usr/local/etc/apache24/Includes/mailman3-uwsgi.cf
# mm3-lists.kictanet.or.ke
<VirtualHost *:80>
ServerName mm3-lists.kictanet.or.ke
ServerAdmin odhiambo(a)gmail.com
Redirect permanent / https://mm3-lists.kictanet.or.ke
</VirtualHost>
# This goes in a global section.
WSGIDaemonProcess mailman-web display-name=mailman-web
maximum-requests=1000 umask=0002 user=mailman group=mailman
python-path=/opt/mailman/mm/venv/lib/python3.9/site-packages:/opt/mailman/mm/venv/lib/python3.9
python-home=/opt/mailman/mm/venv home=/opt/mailman/mm/var
WSGIRestrictSignal Off
<VirtualHost *:443>
ServerName mm3-lists.kictanet.or.ke
ServerAdmin odhiambo(a)gmail.com
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/usr/local/etc/letsencrypt/live/
mm3-lists.kictanet.or.ke/cert.pem"
SSLCertificateKeyFile "/usr/local/etc/letsencrypt/live/
mm3-lists.kictanet.or.ke/privkey.pem"
SSLCertificateChainFile "/usr/local/etc/letsencrypt/live/
mm3-lists.kictanet.or.ke/chain.pem"
CustomLog /var/log/mm3-lists-access.log combined
ErrorLog /var/log/mm3-lists-error.log
LogLevel info
Alias /favicon.ico /opt/mailman/mm/static/hyperkitty/img/favicon.ico
# (I'm not sure that WSGIRestrictSignal Off is required, but it was in the
# provided example so I kept it. I also made changes to WSGIDaemonProcess
# based on my own mod_wsgi experience elsewhere.)
# This goes in the VirtualHost block for the domain.
# Mailman 3 stuff
Alias /static "/opt/mailman/mm/static"
<Directory "/opt/mailman/mm/static">
Require all granted
</Directory>
WSGIScriptAlias /mailman3 /opt/mailman/mm/wsgi.py
<Directory "/opt/mailman/mm/">
<Files wsgi.py>
Order deny,allow
Allow from all
Require all granted
</Files>
WSGIProcessGroup mailman-web
</Directory>
</VirtualHost>
</CUT>
And here is the path - or maybe there is something I am missing in the
VHOST?
[00:53 ~ ]$ cd /opt/mailman/mm/
[00:53 mm ]$ ls -al
total 116
drwxr-xr-x 9 mailman mailman 512 Dec 22 13:54 .
drwxr-xr-x 6 mailman mailman 512 Dec 21 07:54 ..
-rw-r--r-- 1 mailman mailman 0 Sep 29 2021 __init__.py
drwxr-xr-x 2 mailman mailman 512 Dec 22 14:18 __pycache__
-rw-r--r-- 1 mailman mailman 15574 Dec 20 18:16 _settings.py
drwxr-xr-x 3 mailman mailman 512 Dec 20 19:47 bin
drwxr-xr-x 5 mailman mailman 512 Dec 8 10:32 etc
drwxr-xr-x 2 mailman mailman 1536 Dec 21 11:54 fulltext_index
-rw-r--r-- 1 mailman mailman 317 Dec 21 16:53 gunicorn.conf
lrwxr-xr-x 1 mailman mailman 13 Dec 21 16:55 gunicorn.conf.py ->
gunicorn.conf
-rw-r--r-- 1 mailman mailman 0 Dec 5 18:10 init.py
lrwxr-xr-x 1 mailman mailman 24 Dec 5 17:38 logs ->
/opt/mailman/mm/var/logs
-rw-r--r-- 1 mailman mailman 592 Oct 2 2021 mailman-crontab
-rw-r--r-- 1 mailman mailman 409 Dec 20 16:32 mailman-hyperkitty.cfg
-rw-r--r-- 1 mailman mailman 1330 Dec 20 16:24 mailman.cfg
-rw-r--r-- 1 mailman mailman 183 Dec 2 15:17 main.py
-rwxr-xr-x 1 mailman mailman 243 Sep 29 2021 manage.py
-rw-r--r-- 1 mailman mailman 510 Dec 11 14:11 modify-db.sql
-rw-r--r-- 1 mailman mailman 15844 Dec 22 14:18 settings.py
-rw-r--r-- 1 mailman mailman 6622 Dec 22 11:27 settings_local.py
drwxr-xr-x 10 mailman mailman 512 Dec 5 17:38 static
-rw-r--r-- 1 mailman mailman 1453 Dec 20 16:32 urls.py
-rw-r--r-- 1 mailman mailman 1266 Dec 22 13:55 uwsgi.ini
drwxr-xr-x 12 mailman mailman 512 Dec 22 14:21 var
drwxr-xr-x 7 mailman mailman 512 Dec 6 15:35 venv
-rw-r--r-- 1 mailman mailman 1173 Sep 29 2021 wsgi.py
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
3 years, 4 months
[MM3-users] Re: Post-installation documentation?
by David Newman
On 11/24/21 2:36 PM, Mark Sapiro wrote:
> On 11/24/21 9:40 AM, David Newman wrote:
>>
>> IMO post-installation docs for list admins would be a big help in
>> Mailman3 adoption. I'm willing to help with this.
>
>
> Thank you for being willing to contribute. I think the place for list
> admin docs would be in the https://gitlab.com/mailman/mailman-suite-doc
> project which is the source for https://docs.mailman3.org/en/latest/.
> There is currently a userguide there at source/userguide.rst and
> referenced from source/index.rst. the addition of an adminguide.rst
> would be welcom if you want to work on that.
Thanks, will get into this ASAP. Am happy to contribute once I acquire a
bit more clue.
>
>
>> When I say "working": I'm looking to migrate Mailman2 mailing lists to
>> Mailman3, but am struggling with even basic setup tasks before we
>> attempt list migtration.
>>
>> For example, on admin page I've set up two lists, one public and one
>> private (each with unique list IDs), but neither appear in the site's
>> list index.
>
>
> Here are the steps to migrate a 2.1 list named `alist(a)example.com` and
> its archives.
>
> run Mailman's `bin/mailman create alist(a)example.com`
>
> follow that with
> ```
> bin/mailman import21 alist(a)example.com
> /path/to/mailman2.1/lists/alist/config.pck
> ```
> That will create the list and import its members and settings.
>
> To import archives run the Django admin command with arguments
> ```
> hyperkitty_import -l alist(a)example.com
> /path/to/mailman2.1/archives/private/alist.mbox/alist.mbox
Good up to here, but ... hyperkitty_import not found.
This wasn't covered in the venv docs:
https://docs.mailman3.org/en/latest/install/virtualenv.html
or in the web frontend docs [1]:
https://docs.mailman3.org/en/latest/config-web.html
or in the howto Brian Carpenter (RIP) wrote for Debian 10:
https://wiki.list.org/DOC/Howto_Install_Mailman3_On_Debian10
Also, I had previously created two other lists under the site admin
page. These do not appear in the site's mailing lists page, nor does the
list I successfully imported from MM 2.1 appear in the admin page, under
mailing lists.
> ```
>
>> And I don't know where to add list members.
>
>
> For imported lists, they are already added, but for new lists, you can
> add them in Postorius under Mass operations -> Mass subscribe or via the
> bin/mailman commands `addmembers` or `syncmembers`. See
> https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/commands/d…
>
>
>
>> And clicking the site archives link throws this error:
>>
>> django.urls.exceptions.NoReverseMatch: Reverse for 'hk_list_overview'
>> with keyword arguments '{'mlist_fqdn': 'wheee'}' not found. 1
>> pattern(s) tried: ['archives/list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/$']
>
>
> Did you specify the list's fqdn as in
> https://www.example.com/archives/list/list@example.com/
No. I clicked the archives icon at the top of a Postorious page. This is
possibly related to the hyperkitty_import issue above.
Thanks again.
dn
[1] In addition to the web frontend docs, there is also a hyperkitty
docs page:
https://docs.mailman3.org/projects/hyperkitty/en/latest/install.html
I found this page unhelpful. For example it starts with this command:
sudo python setup.py install
but doesn't say where setup.py resides, or which directory the command
should be run from. (And yes, different OSs use different locations. I'd
setting for one being named, along with a YMMV disclaimer.)
Then this doc goes to database setup, with this example:
django-admin migrate --pythonpath example_project --settings settings
Again, this is unclear. I don't know what "example_project" is, or in
what context it's used here.
This doc also describes a different, and less straightforward,
import-from-2.1 procedure than Mark described above.
It's possible the hyperkitty doc is now outdated. I'd be glad to help
bring the various different install guides together and update them --
once I better understand how they work. Thanks.
4 years, 5 months
[MM3-users] Re: hyperkitty threads by month question
by Bryan Fields
On 7/26/24 4:01 PM, Mark Sapiro wrote:
> Yes, I suspect this bad date is part of the issue.
>
> I would do a few things. First,
>
> SELECT message_id FROM hyperkitty_email WHERE thread_id = 35670;
mailmanweb=> SELECT message_id FROM hyperkitty_email WHERE thread_id = 35670;
message_id
-------------------------------------
200204151506953.SM01412(a)sunchar.com
Yep, that matches the bad date message ID.
> If this returns just the one message_id, I would then
>
> DELETE FROM hyperkitty_thread WHERE id = 35670;
> DELETE FROM hyperkitty_email WHERE id = 150555;
It's giving an error due to a fk constraint on another table. I'm not
familiar with the db structure enough to be certain how to clean/fix it.
mailmanweb=> DELETE FROM hyperkitty_thread WHERE id = 35670;
ERROR: update or delete on table "hyperkitty_thread" violates foreign key constraint "hyperkitty_lastview_thread_id_5bd4f0ad_fk_hyperkitty_thread_id" on table "hyperkitty_lastview"
DETAIL: Key (id)=(35670) is still referenced from table "hyperkitty_lastview".
mailmanweb=> DELETE FROM hyperkitty_email WHERE id = 150555;
ERROR: update or delete on table "hyperkitty_email" violates foreign key constraint "hyperkitty_thread_starting_email_id_fa7c55f5_fk_hyperkitt" on table "hyperkitty_thread"
DETAIL: Key (id)=(150555) is still referenced from table "hyperkitty_thread".
> and see if that fixes the internal server error when accessing the
> archive. I would also
>
> SELECT * FROM hyperkitty_email WHERE id = 136872;
mailmanweb=> SELECT * FROM hyperkitty_email WHERE id = 136872;
id | message_id | message_id_hash | subject | content | date | timezone | in_reply_to | archived_date | thread_depth | thread_order | mailinglist_id | parent_id | sender_id | thread_id | sender_name
--------+------------------------------------------+----------------------------------+------------------+-------------------------------------------------------------------+------------------------+----------+-------------+------------------------+--------------+--------------+----------------+-----------+-------------------------+-----------+---------------
136872 | 200001010102.BAA05112(a)genesis.domino.org | SGZJVBCSRYSHGHR4BB2632INFGYWOJYH | UK GMT roll over | +| 0100-01-01 01:02:34+00 | 0 | | 1999-12-31 20:20:13+00 | 0 | 0 | 3 | | neil(a)genesis.domino.org | 31067 | Neil J. McRae
| | | | GMT and CET rolled over without any major incidents. The cellular+| | | | | | | | | | |
| | | | networks were busy but thats to be expected. +| | | | | | | | | | |
| | | | +| | | | | | | | | | |
| | | | Regards, +| | | | | | | | | | |
| | | | Neil. +| | | | | | | | | | |
| | | | -- +| | | | | | | | | | |
| | | | Neil J. McRae - Alive and Kicking. +| | | | | | | | | | |
| | | | neil(a)DOMINO.ORG +| | | | | | | | | | |
| | | | +| | | | | | | | | | |
| | | | | | | | | | | | | | |
That message had "Date: Sat, 1 Jan 100 01:02:34 +0000 (GMT)" in the mbox.
It looks like it should be year 2000 from the rest of the headers
This message was found by your script too:
Date: changed at line 13785764
Date: Sat, 1 Jan 100 01:02:34 +0000 (GMT)
Date: Fri, 31 Dec 1999 20:20:13 -0000
> and maybe update the `date` in that entry.
I'm actually thinking I need to fix the archive mbox, then delete them and
re-import them once they are cleaned.
> Also, FYI, assuming those messages with very old Date: headers had
> reasonable unix from dates, the hyperkitty/contrib/cleanarch3 script
> would fix them, except you have to get the script from
> https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/contrib/clea…
> or https://www.msapiro.net/scripts/cleanarch3 because the script in the
> latest release has a bug.
I tried the dry run option on your script and it gave a bunch of output for bad
dates. This was absent on the one shipping with the source. What's interesting
is that pipermail seems to have no issue with this, detecting the date
correctly.
https://mailman.nanog.org/pipermail/nanog/2000-January/137630.html
One other thing, I did notice a number of archives not showing up in sequence
due to missing "In-Reply-To:" headers from the source. The first message in
this is one like this, and pipermail in mmm2 seems to handle this by referencing
the subject, https://mailman.nanog.org/pipermail/nanog/2002-April/151325.html,
where as in hyperkitty it's an orphaned thread.
Is the archive tool in pipermail's import more robust in this manner? I'd argue
it's common to have missing In-Reply-To: headers where the subject and time
would need to be used to infer the likely thread. I'll agree this is a major
violation of the relevant RFC's to be missing this, but many MUA's (M$) are
famous for doing just this.
Thank you,
--
Bryan Fields
727-409-1194 - Voice
http://bryanfields.net
1 year, 9 months
[MM3-users] Re: Database permission problem?
by Bill Oliver
On Tue, 2024-10-15 at 17:13 -0700, Mark Sapiro wrote:
> On 10/15/24 15:24, Bill Oliver wrote:
> >
> > Yeah, I saw that, too. The double db files are created by
> > postmap. I
> > haven't worried about it too much yet, since the permissions are
> > the
> > same. I don't know why postmap does this, but it's next on my
> > list of
> > things to fix.
>
>
> You should not be running postmap manually and never on a *.db file
> in
> any case. Mailman should be creating postfix_domains, postfix_lmtp
> and
> postfix_vmap and calling postmap on those to create the .db files.
>
> > In my main.cf postfix_lmtp is mentioned four times:
> >
> > virtual_mailbox_maps =
> > proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
> >
> > proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_map
> > s.cf
> > #added 20241009 for mailman
> > hash:/opt/mailman/mm/var/data/postfix_lmtp ${dovecot}
> >
> > virtual_alias_maps =
> > proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
> >
> > proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
> >
> > proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_ma
> > ps.c
> > f
> > #added 20241009 for mailman
> > hash:/opt/mailman/mm/var/data/postfix_vmap
> >
> > #Mailman transport stuff
> > transport_maps =
> > hash:/opt/mailman/mm/var/data/postfix_lmtp
> > local_recipient_maps =
> > hash:/opt/mailman/mm/var/data/postfix_lmtp ${dovecot}
>
>
> Are you adding ${dovecot} to the local_recipient_maps and
> virtual_mailbox_maps mailman entries or was that there before?
Thanks. The reason I created them by hand is that they are not being
created automatically it seemed. If I remove them and restart things, I
get the following errors in /var/log/mail.err:
2024-10-15T12:43:31.060478-04:00 mail postfix/smtpd[961837]: error:
open database /opt/mailman/mm/var/data/postfix_domains.db: No such file
or directory
2024-10-15T12:43:31.060874-04:00 mail postfix/smtpd[961837]: error:
open database /opt/mailman/mm/var/data/postfix_lmtp.db: No such file or
directory
2024-10-15T12:43:31.069450-04:00 mail postfix/smtpd[961837]: error:
open database /opt/mailman/mm/var/data/postfix_vmap.db: No such file or
directory
However.... I just looked at the /opt/mailman/mm/var/data directory and
the (single) db files are now there, and that error occurs only once.
So, I probably over-reacted to it.
Unfortunately, I'm back to the permission declined error:
2024-10-15T22:31:31.973125-04:00 mail postfix/virtual[3497]: error:
open database /opt/mailman/mm/var/data/postfix_lmtp.db: Permission
denied
As far as the addition of ${dovecot} goes, I did it myself because of
the instructions at:
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.h…
Dovecot is having a hard time authenticating mailinglist users. I
figured that problem arose because it can't use any of the mailman .db
files, but I don't know. In any case, a dovecot error message that
happens when a user (who has an account on the local machine) sends
mail to the mailing list includes:
2024-10-15T21:50:45.231465-04:00 mail dovecot: auth-worker(5669):
Debug: conn unix:auth-worker (pid=3690,uid=111): auth-worker<1>:
pam(oliver(a)billoblog.com,129.222.252.225): lookup service=dovecot
2024-10-15T21:50:45.234036-04:00 mail dovecot: auth-worker(5669):
Debug: conn unix:auth-worker (pid=3690,uid=111): auth-worker<1>:
pam(oliver(a)billoblog.com,129.222.252.225): #1/1 style=1 msg=Password:
2024-10-15T21:50:46.716360-04:00 mail dovecot: auth-worker(5669): conn
unix:auth-worker (pid=3690,uid=111): auth-worker<1>:
pam(oliver(a)billoblog.com,129.222.252.225): pam_authenticate() failed:
Authentication failure (Password mismatch?) (given password: XXXXXXX)
2024-10-15T21:50:46.716497-04:00 mail dovecot: auth-worker(5669):
Debug: conn unix:auth-worker (pid=3690,uid=111): auth-worker<1>:
pam(oliver(a)billoblog.com,129.222.252.225): Finished passdb lookup
2024-10-15T21:50:46.716562-04:00 mail dovecot: auth-worker(5669):
Debug: conn unix:auth-worker (pid=3690,uid=111): auth-worker<1>:
Finished: password_mismatch
It should be noted that mail works fine for that user, and this error
arises *only* when mail is sent to the mailinglist address. Dovecot
does not complain if I send mail elsewhere. Mail is received and
delivered to and from this address without a problem.
The other thing I did was add an alias domain when I set up the domain
in postorius, again because it seemed from reading the instructions
that this was advisable on a server with multiple virtual domains.
Thanks.
1 year, 6 months