Search results for query "sapiro"
- 6020 messages
[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 '^$|^.*#' ¯\_(ツ)_/¯ :-)
2 years, 10 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
>
1 year, 11 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 '^$|^.*#' ¯\_(ツ)_/¯ :-)
2 years, 11 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
[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, 4 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, 2 months
[MM3-users] Re: The doubled entries issue
by Lars Bjørndal
Hi!
The problem seesm to be solved. Anyway, here's the answer to questions:
On Sun, Nov 12, 2023 at 08:07:59AM -0800, Mark Sapiro wrote:
> On 11/11/23 23:56, Lars Bjørndal wrote:
> >
> > Thank you. The script I try to run, is found here: https://gitlab.com/mailman/mailman/-/issues/657
> >
> > I named the script fix-doubled-entries.py. When I try
> >
> > `mailman shell --run ./fix-doubled-entries.py` I get:
>
> This is not the way to run a script with `mailman shell`. See
> ```
> mailman shell --details
> ```
> for info. However, that script cannot be run as is by `mailman shell --run`.
> It can be run by invoking `mailman shell` interactively and copying and
> pasting it,
Yes, that worked, e.g. no error messages.
> or if your Mailman is installed in a venv it can be run with the
> venv active by `python ./fix-doubled-entries.py`.
I have mailman installed in venv, but got the following when trying that:
"python fix-doubled-entries.py" need the IListManager interface but can't find it.
> However, that script will not fix your issue because you don't have multiple
> mhonarc entries for a list. See https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
> and as it says, Tell us more about the "duplicate entries" error, and if
> possible copy it exactly from where you found it originally, including any
> traceback.
Here's the entries in the mailman.log file:
[11/Nov/2023:09:18:41 +0100] "GET /3.1/addresses/lars(a)lamasti.net HTTP/1.1" 200 365 "-" "GNU Mailman REST client v3.3.5"
[11/Nov/2023:09:18:42 +0100] "GET /3.1/lists/annonsering.hodr.no/roster/moderator HTTP/1.1" 200 90 "-" "GNU Mailman REST client v3.3.5"
Nov 11 09:18:43 2023 (1709) HyperKitty archived message <m3sf5cd7ok.fsf(a)dalen.lamasti.net> to https://hodr.no/archives/list/annonsering@hodr.no/message/NL5LTYANYLKOF5N33…
[11/Nov/2023:09:18:44 +0100] "GET /3.1/users/lars(a)lamasti.net HTTP/1.1" 200 259 "-" "GNU Mailman REST client v3.3.5"
Nov 11 09:18:47 2023 (1715) Uncaught runner exception: Multiple rows were found when one or none was required
Nov 11 09:18:47 2023 (1715) Traceback (most recent call last):
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration
self._process_one_file(msg, msgdata)
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file
keepqueued = self._dispose(mlist, msg, msgdata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/runners/outgoing.py", line 111, in _dispose
self._func(mlist, msg, msgdata)
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/mta/deliver.py", line 89, in deliver
refused = agent.deliver(mlist, msg, msgdata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/mta/base.py", line 167, in deliver
callback(mlist, message_copy, msgdata_copy)
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/mta/decorating.py", line 32, in decorate
decorator.process(mlist, msg, msgdata)
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/handlers/decorate.py", line 250, in process
process(mlist, msg, msgdata)
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/handlers/decorate.py", line 73, in process
for archiver in IListArchiverSet(mlist).archivers:
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/zope/component/_api.py", line 167, in adapter_hook
return sitemanager.queryAdapter(object, interface, name, default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/zope/interface/registry.py", line 351, in queryAdapter
return self.adapters.queryAdapter(object, interface, name, default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/database/transaction.py", line 106, in wrapper
return function(args[0], config.db.store, *args[1:], **kws)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/model/mailinglist.py", line 653, in __init__
ListArchiver.name == archiver_name).one_or_none()
^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/orm/query.py", line 2769, in one_or_none
return self._iter().one_or_none() # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/engine/result.py", line 1813, in one_or_none
return self._only_one_row(
^^^^^^^^^^^^^^^^^^^
File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/engine/result.py", line 816, in _only_one_row
raise exc.MultipleResultsFound(
sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when one or none was required
Nov 11 09:18:47 2023 (1715) SHUNTING: 1699690727.810848+3b6f3baba5576f3d87d3ff392aba2715d4dda793
[11/Nov/2023:10:00:02 +0100] "GET /3.1/lists?count=10&page=1 HTTP/1.1" 200 4061 "-" "GNU Mailman REST client v3.3.5"
I don't know what fixed the problem, but when I did `mailman unshunt` the message went through.
Will mailman notify when there's shunted messages?
Lars
2 years, 1 month
[MM3-users] Re: Disable Sign-up per domain
by Mark
On 2025-08-01 01:37, Mark Sapiro wrote:
>> raise self.model.DoesNotExist(
>> django.contrib.sites.models.Site.DoesNotExist: Site matching query
>> does not exist.
> That error will occur when settings.py contains
>
> SITE_ID = 0
>
> and the host in the http request is not one of the hosts in the
> django_site table in the database or in Sites in the Django admin web
> UI.
> Is that possibly the case here?
The SITE_ID and database table check okay. The SITE_ID is supposed to be
"0"? No?
SITE_ID
Test server - settings.py: SITE_ID = 0
Prod server - settings.py: SITE_ID = 0
HTTP_HOST
Test server DB - mailmanweb.django_site table: domain and name fields OK
Prod server DB - mailmanweb.django_site table: domain and name fields
OK
And the hosts are displayed in Sites in the admin UI.
I also checked the ALLOWED_HOSTS in the Test and Prod servers. Both
have:
...
"localhost",
"127.0.0.1",
"<IP4 ADDRESS OF HOST>",
"<MY.DOMAIN.COM>"
"<OTHER.DOMAINNAME.COM>",
...
> Is there a complete traceback preceding the log snippet you report. If
> so, what is it?
The traceback does suggest that the SITE does not exist...
======================= TRACEBACK =====================
Traceback (most recent call last):
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/sites/models.py",
line 39, in _get_site_by_request
SITE_CACHE[host] = self.get(domain__iexact=host)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/manager.py",
line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py",
line 637, in get
raise self.model.DoesNotExist(
django.contrib.sites.models.Site.DoesNotExist: Site matching query does
not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/core/handlers/exception.py",
line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/core/handlers/base.py",
line 197, in _get_response
response = wrapped_callback(request, *callback_args,
**callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/postorius/views/list.py",
line 1158, in list_index
return render(
^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/shortcuts.py",
line 24, in render
content = loader.render_to_string(template_name, context, request,
using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/template/loader.py",
line 62, in render_to_string
return template.render(context, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/template/backends/django.py",
line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/template/base.py",
line 173, in render
with context.bind_template(self):
File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/template/context.py",
line 254, in bind_template
updates.update(processor(self.request))
^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django_mailman3/context_processors.py",
line 32, in common
context["site_name"] = get_current_site(request).name
^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/sites/shortcuts.py",
line 16, in get_current_site
return Site.objects.get_current(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/sites/models.py",
line 61, in get_current
return self._get_site_by_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/sites/models.py",
line 45, in _get_site_by_request
SITE_CACHE[domain] = self.get(domain__iexact=domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/manager.py",
line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py",
line 637, in get
raise self.model.DoesNotExist(
django.contrib.sites.models.Site.DoesNotExist: Site matching query does
not exist.
ERROR 2025-08-01 05:21:46,176 2030595 django.request Internal Server
Error: /owa/auth/logon.aspx
ERROR 2025-08-01 05:21:46,176 2030595 django.request Internal Server
Error: /owa/auth/logon.aspx
============= END TRACEBACK =================
>> ... -- "whatever is proxying to Django setting the appropriate
>> HTTP_HOST header." -- which I don't understand.
> This is in the configuration of the web server. It should be
> configured to pass the host of the incoming request to the proxy
> target in the HTTP_HOST header. In nginx this is `proxy_set_header
> Host $host;`. In apache it is `ProxyPreserveHost On`, but again the
> change to user_adapter shouldn't affect this.
>
That all looks good for both the Prod and Test servers.
...
location /static/ {
alias /opt/mailman/web/static/;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
...
4 months, 2 weeks
[MM3-users] Re: A little stuck with installation of MM3 - ModuleNotFoundError: No module named 'flufl.lock'
by Odhiambo Washington
On Sun, 26 Jul 2020 at 18:48, Mark Sapiro <mark(a)msapiro.net> wrote:
> On 7/26/20 3:15 AM, Odhiambo Washington wrote:
>
> > There is still some confusion on my part about the directives in the file
> > so allow me to seek some clarifications.
> >
> > The following are the contents of a file I have created and placed in my
> > Apache Includes/ directory.
> > I was hoping that with it, I can now access http://lists.my.server/mm3
> and
> > get the UI.
> >
> > <CUT>
> >
> > # Global section
> > WSGIDaemonProcess mailman-web display-name=mailman-web
> > maximum-requests=1000 umask=0002 user=mailman3 \
> > group=mailman3
> >
> python-path=/opt/mailman/mm/venv/lib/python3.7/site-packages:/opt/mailman/mm/venv/lib/python3.7
> > \
> > python-home=/opt/mailman/mm/venv home=/opt/mailman/mm/var
> > WSGIRestrictSignal Off
> >
> > <VirtualHost *:80>
> > ServerName lists.my.server
> > ServerAdmin odhiambo(a)gmail.com
> >
> > # (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.)
> >
> > ErrorLog /var/log/myserver-error.log
> > LogLevel debug
> >
> > # This goes in the VirtualHost block for the domain.
> >
> > # Mailman 3 stuff
> > Alias /static "/var/spool/mailman-web/static" *<----- Where is this
> > directory supposed to be and what/who creates it and with what
> permissions?*
>
>
> It is created/updated by the mailman-post-update script based on CONFDIR
> and STATIC_DIR.
>
The fact that I have run the mailman-post-update script and these
directories aren't created means there is a problem in my setup, yes?
> > <Directory "/var/spool/mailman-web/static">
>
> With the settings in the sample, the above should be
>
> <Directory "/opt/mailman/mm/static">
>
> and the alias
>
> Alias /static "/opt/mailman/mm/static"
>
> Clearly
> <
> https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=At…
> >
> doesn't match some other files. I'll review abd update that.
>
Okay. I am anxiously waiting.
>
> > Require all granted
> > </Directory>
> > WSGIScriptAlias /mm3 /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-HERE>
> >
> > I end up with an "Internal server error" and from the error log I see:
> >
> ...
> > [Sun Jul 26 12:04:44.093265 2020] [wsgi:error] [pid 6444] [remote
> > 197.232.81.246:53383] ModuleNotFoundError: No module named 'settings'
>
>
> Django is trying to import your settings.py file and can't find it. Is
> it at /opt/mailman/mm/settings.py and also local settings at
> /opt/mailman/mm/settings_local.py?
Yes, I have these files:
(venv) [root@gw /opt/mailman/mm]# ls -al /opt/mailman/mm/settings*
-rw-r--r-- 1 mailman3 wheel 15518 Jul 25 14:34
/opt/mailman/mm/settings.py
-rw-r--r-- 1 mailman3 wheel 15773 Jul 26 10:33
/opt/mailman/mm/settings_local.py
PS: I made my /opt/mailman to be owned by mailman3:wheel because of a
confusion with the instructions at some point in the reading
of some documentation previously (in my previous attempt last year!) and
had noted that in my NOTES. I'll change this once things get clear for me.
Also, the fact that one of the init scripts
<https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=At…>
in your "reflection" page was calling sudo :)
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
5 years, 4 months
[MM3-users] Re: SPF check fails for lists subdomain
by Jan Eden
On 2023-01-04 15:07, Mark Sapiro wrote:
> On 1/4/23 14:02, Jan Eden via Mailman-users wrote:
> > Although I could specify the IP address in my SPF records directly (as
> > you suggested), I do hope that my understanding of DNS records laid out
> > above is not entirely misguided. My current setup does work as expected
> > for eden.one, after all.
>
> As I said at <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…>
> I was misreading your DNS and now I am as puzzled as you about the failure.
It gets even more mysterious. I tried sending messages from both
lists.eden.one and janeden.net (my other domain) to a gmail account and
to another mail provider. Both messages passed the SPF checks on both
services (s. the relevant headers quoted below). Now because I send
those messages via my SMTP user (smtpuser(a)eden.one) and use SRS, the SPF
check operates (and succeeds) on e.g.
srs0=jdm+=5c=lists.eden.one=testlist-bounces+gmailuser=googlemail.com(a)eden.one
(and not on somethingsomething(a)lists.eden.one or
somethingsomething(a)janeden.net) Could this be the reason for the failed
SPF checks in Yahoo's and Google's DMARC reports?
- Jan
==============================
Authentication-Results: posteo.de; dmarc=pass (p=quarantine dis=none) header.from=lists.eden.one
Authentication-Results: posteo.de; spf=pass smtp.mailfrom=eden.one
Authentication-Results: posteo.de;
dkim=pass (2048-bit key) header.d=lists.eden.one header.i=(a)lists.eden.one header.b=8FtNB1m3;
dkim-atps=neutral
------------------------------
Delivered-To: gmailuser(a)gmail.com
Received: by 2002:a05:7022:4584:b0:4b:2a9c:6c6f with SMTP id cf4csp83532dlb;
Wed, 4 Jan 2023 23:29:12 -0800 (PST)
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=(a)lists.eden.one header.s=s42 header.b=lrjRRPic;
spf=pass (google.com: domain of srs0=jdm+=5c=lists.eden.one=testlist-bounces+gmailuser=googlemail.com(a)eden.one designates 123.123.123.123 as permitted sender) smtp.mailfrom="SRS0=JDm+=5C=lists.eden.one=testlist-bounces+gmailuser=googlemail.com(a)eden.one";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=lists.eden.one
Received-SPF: pass (google.com: domain of srs0=jdm+=5c=lists.eden.one=testlist-bounces+gmailuser=googlemail.com(a)eden.one designates 123.123.123.123 as permitted sender) client-ip=123.123.123.123;
Authentication-Results: mx.google.com;
dkim=pass header.i=(a)lists.eden.one header.s=s42 header.b=lrjRRPic;
spf=pass (google.com: domain of srs0=jdm+=5c=lists.eden.one=testlist-bounces+gmailuser=googlemail.com(a)eden.one designates 123.123.123.123 as permitted sender) smtp.mailfrom="SRS0=JDm+=5C=lists.eden.one=testlist-bounces+gmailuser=googlemail.com(a)eden.one";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=lists.eden.one
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.eden.one; s=s42; t=1672903751; h=from:from:reply-to:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:mime-version:mime-version:
content-type:content-type:list-id:list-help:list-owner:
list-unsubscribe:list-subscribe:list-post; bh=q4JtVWzFRbBZ12C26k1xKRRVOBGue+2uV43xiHohi3M=; b=lrjRRPicpiyGUP11wjj76yIg8qHib1aUAS99+RNhSwYE9HzXctedXbdMXeY7WJyUc1gE2Z PFkDPZD6YMGIAY9N35fzgzoMgrgNAWkTLqDF7i5d0kEXEhEuQ+hLbRHKMcsD8XDVff41iY vLnygg85AKj5L4dvq/p5o4TEjmfaXHadRJ6ZI6qY67Yys1D+LqZzbfIQyvgUH+U986d0Ed SO3POUWJLcYNwwQk0UzTc4iIenM7042alew/wXoncDc1lnMQrAYHY/lPwGHFyqqyPebkLZ bE3nM4g8pM9ODXBbn0Vs7602SzCFkHs2l1QScFtV9+pZbPaKgYL5TW6Q8BT0MA==
Received: from client.eden.one (unknown [195.37.242.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
Date: Thu, 5 Jan 2023 08:29:05 +0100
To: testlist(a)lists.eden.one
Subject: [Testlist] Test (Listenmail)
From: Jan Eden via Testlist <testlist(a)lists.eden.one>
Reply-To: Jan Eden <mailuser(a)eden.one>
==============================
==============================
Authentication-Results: posteo.de; dmarc=pass (p=quarantine dis=none) header.from=janeden.net
Authentication-Results: posteo.de; spf=pass smtp.mailfrom=eden.one
Authentication-Results: posteo.de;
dkim=pass (2048-bit key) header.d=janeden.net header.i=(a)janeden.net header.b=VV5k+gN7;
dkim-atps=neutral
------------------------------
Delivered-To: gmailuser(a)gmail.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=(a)janeden.net header.s=s42 header.b=B8NPELsC;
spf=pass (google.com: domain of srs0=xtlx=5c=janeden.net=mailuser(a)eden.one designates 123.123.123.123 as permitted sender) smtp.mailfrom="SRS0=Xtlx=5C=janeden.net=mailuser(a)eden.one";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=janeden.net
Received-SPF: pass (google.com: domain of srs0=xtlx=5c=janeden.net=mailuser(a)eden.one designates 123.123.123.123 as permitted sender) client-ip=123.123.123.123;
Authentication-Results: mx.google.com;
dkim=pass header.i=(a)janeden.net header.s=s42 header.b=B8NPELsC;
spf=pass (google.com: domain of srs0=xtlx=5c=janeden.net=mailuser(a)eden.one designates 123.123.123.123 as permitted sender) smtp.mailfrom="SRS0=Xtlx=5C=janeden.net=mailuser(a)eden.one";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=janeden.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janeden.net; s=s42; t=1672903599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type; bh=wE7NXSkgnx9PGiavN4OZhJztvkqPDlemV3OGuEnLwNo=; b=B8NPELsC7r7WI62YOpEFUhESxumSjhP/aQNOlWRmusnTHgbHgjEHeCKNRhEDUeh+fRRVZw JnRVZx9WAU58/3UXx0XJIN6ivLYJnOtJ9vw3r1nVAzU6wk7RCE1Zx6zTJLybwHNijHcCn4 A2cRJZc1IUfJTAok3RHclBB8c10difp5SNPKVGRtNEPAOEFnG5vaNecPvQWc0+4EyHNCYX WSEARKApxpL31gBcojCEHjtdAFgmcknReosUN9I3PUiQQIxqFQ6uU9hA6XWyg6qCsEAll7 E1sGL9HopGIHQA2pHXPanQ9FZxOFou8BcjwN4w65Vygr78hAO5e2Ru6tDFwr4g==
Date: Thu, 5 Jan 2023 08:26:37 +0100
From: Jan Eden <mailuser(a)janeden.net>
To: gmailuser(a)googlemail.com
Subject: Test
==============================
2 years, 11 months