Dear list members,
when following the instructions to migrate list archives from Mailman21 to Mailman3 (see [1]), I face the following problem:
# python3 manage.py hyperkitty_import -l mailman21-migration-test-04 /var/mailman21/testlist.mbox python3: can't open file '/var/mailman21/manage.py': [Errno 2] No such file or directory
and have no clue, where to find the right <manage.py> file. The command dpkg returns:
# dpkg -l | grep hyperkitty ii python3-django-hyperkitty 1.3.7-1 all Web user interface to access GNU Mailman3 archives
In </etc/mailman3/mailman-web.py> I find:
INSTALLED_APPS = ( 'hyperkitty', 'postorius', 'django_mailman3', ...
Can you please help me? Thank you in advance?
Best, Markus
[1] <https://docs.mailman3.org/en/latest/migration.html>
-- Markus Grandpré Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre und Infrastruktur, Tel: ++49 7531 88 4342
On Mon, Mar 25, 2024 at 5:58 PM Markus Grandpre < markus.grandpre@uni-konstanz.de> wrote:
Dear list members,
when following the instructions to migrate list archives from Mailman21 to Mailman3 (see [1]), I face the following problem:
# python3 manage.py hyperkitty_import -l mailman21-migration-test-04 /var/mailman21/testlist.mbox python3: can't open file '/var/mailman21/manage.py': [Errno 2] No such file or directory
and have no clue, where to find the right <manage.py> file. The command dpkg returns:
Since we also don't know where it is, why don't you just find it? find / -type f -name "manage.py"
Then you can run your command from within the directory where it lives.
# dpkg -l | grep hyperkitty ii python3-django-hyperkitty 1.3.7-1 all Web user interface to access GNU Mailman3 archives
In </etc/mailman3/mailman-web.py> I find:
INSTALLED_APPS = ( 'hyperkitty', 'postorius', 'django_mailman3', ...
Can you please help me? Thank you in advance?
If you need us to help you easily, please consider NOT using the OS packages and use the virtualenv[0] method of installation.
[0] https://docs.mailman3.org/en/latest/install/virtualenv.html
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 3/25/24 07:58, Markus Grandpre wrote:
Dear list members,
when following the instructions to migrate list archives from Mailman21 to Mailman3 (see [1]), I face the following problem:
# python3 manage.py hyperkitty_import -l mailman21-migration-test-04 /var/mailman21/testlist.mbox python3: can't open file '/var/mailman21/manage.py': [Errno 2] No such file or directory
and have no clue, where to find the right <manage.py> file. The command
This depends on how you installed Mailman 3. You may or may not want
python3 manage.py
at all. The required command could be something like
django-admin
or mailman-web
.
Also the #
prompt indicates you may be running as root. Mailman
related commands should be run as the Mailman user (could be mailman
or list
or ... depending again on how you installed Mailman). Running
as root can create files owned by root that later can't be read by the
Mailman user.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Dear Mr Sapiro,
thank you very much for your help. The required command is:
# mailman-web hyperkitty_import
-l mailman21-migration-test-04@mailman.uni-konstanz.de
/var/mailman21/testlist.mbox
Due to the following warnings, I still have to customize Hyperkitty:
django_mailman3.MailDomain: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. ...
Can you give me another hint? As Linux admin I installed the packages mailman and mailman-web that were offered to me under Debian 12. Although during the installation of the packages user "list" was created, I cannot use it:
# su - list This account is currently not available
As with Mailman 2.1, I will probably have to continue working with Mailman3 as root. Too bad that there is no documentation for Debian admins like me, who don't want to dive too deep into the python framework. Or have I overlooked something?
Best regards, Markus
Am 25.03.24 um 18:56 schrieb Mark Sapiro:
On 3/25/24 07:58, Markus Grandpre wrote:
Dear list members,
when following the instructions to migrate list archives from Mailman21 to Mailman3 (see [1]), I face the following problem:
# python3 manage.py hyperkitty_import -l mailman21-migration-test-04 /var/mailman21/testlist.mbox python3: can't open file '/var/mailman21/manage.py': [Errno 2] No such file or directory
and have no clue, where to find the right <manage.py> file. The command
This depends on how you installed Mailman 3. You may or may not want
python3 manage.py
at all. The required command could be something likedjango-admin
ormailman-web
.Also the
#
prompt indicates you may be running as root. Mailman related commands should be run as the Mailman user (could bemailman
orlist
or ... depending again on how you installed Mailman). Running as root can create files owned by root that later can't be read by the Mailman user.
-- Markus Ludwig Grandpré Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung und Lehre, B803, Tel: ++49 7531 88 4342
On 3/26/24 00:06, Markus Grandpré wrote:
Due to the following warnings, I still have to customize Hyperkitty:
django_mailman3.MailDomain: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. ...
This warning is harmless, but to eliminate it set
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
in your django settings.
Can you give me another hint? As Linux admin I installed the packages mailman and mailman-web that were offered to me under Debian 12. Although during the installation of the packages user "list" was created, I cannot use it:
# su - list This account is currently not available
Probably Debian creates the list
user without a login shell.
sudo -i -u list
may work. If not, you can always prefix commands with sudo -u list
as in
sudo -u list mailman-web hyperkitty_import \
-l mailman21-migration-test-04@mailman.uni-konstanz.de \
/var/mailman21/testlist.mbox
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, 2024-03-26 at 08:06 +0100, Markus Grandpré wrote:
Dear Mr Sapiro,
thank you very much for your help. The required command is:
# mailman-web hyperkitty_import
-l mailman21-migration-test-04@mailman.uni-konstanz.de
/var/mailman21/testlist.mboxDue to the following warnings, I still have to customize Hyperkitty:
django_mailman3.MailDomain: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. ...
Can you give me another hint? As Linux admin I installed the packages mailman and mailman-web that were offered to me under Debian 12. Although during the installation of the packages user "list" was created, I cannot use it:
# su - list This account is currently not available
As with Mailman 2.1, I will probably have to continue working with Mailman3 as root. Too bad that there is no documentation for Debian admins like me, who don't want to dive too deep into the python framework. Or have I overlooked something?
Best regards, Markus
Hi Markus,
we are also running MM3 on Debian 12 from Package Repositories.
First of all, you should not try to directly switch user (su) to the
lists user, it's generally intended to executes commands as that user,
if necessary; either using runuser
, sudo
, or su -c
.
However, the prepackaged scripts mailman-wrapper
and mailman-web
already do this and therefore you ca run those as root without
permission problems.
On Debian there are two relevant users for MM3: the list user runs mailman core, whereas the www-data user runs Postorius and Hyperkitty. So you have to make shure, that the www-data user can access the .mbox files while importing.
Hope that helps.
Cheers, Michael
-- Michael Oberrauch (er/ihm) Computerreferent
Fachschaft Mathematik/Physik/Informatik/Chemie Studentische Vertretung Technische Universität München Boltzmannstraße 3 85748 Garching
eMail: oberrauch@fs.tum.de Tel: (+49) 089 289 18545 Fax: (+49) 089 289 18546 https://mpic.fs.tum.de
Dear Michael,
thank you very much for your clarification.
Best regards, Markus
Am 3/26/24 um 17:38 schrieb Michael Oberrauch:
On Tue, 2024-03-26 at 08:06 +0100, Markus Grandpré wrote:
Dear Mr Sapiro,
thank you very much for your help. The required command is:
# mailman-web hyperkitty_import
-l mailman21-migration-test-04@mailman.uni-konstanz.de
/var/mailman21/testlist.mboxDue to the following warnings, I still have to customize Hyperkitty:
django_mailman3.MailDomain: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. ...
Can you give me another hint? As Linux admin I installed the packages mailman and mailman-web that were offered to me under Debian 12. Although during the installation of the packages user "list" was created, I cannot use it:
# su - list This account is currently not available
As with Mailman 2.1, I will probably have to continue working with Mailman3 as root. Too bad that there is no documentation for Debian admins like me, who don't want to dive too deep into the python framework. Or have I overlooked something?
Best regards, Markus
Hi Markus,
we are also running MM3 on Debian 12 from Package Repositories.
First of all, you should not try to directly switch user (su) to the lists user, it's generally intended to executes commands as that user, if necessary; either using
runuser
,sudo
, orsu -c
.However, the prepackaged scripts
mailman-wrapper
andmailman-web
already do this and therefore you ca run those as root without permission problems.On Debian there are two relevant users for MM3: the list user runs mailman core, whereas the www-data user runs Postorius and Hyperkitty. So you have to make shure, that the www-data user can access the .mbox files while importing.
Hope that helps.
Cheers, Michael
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@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 markus.grandpre@uni-konstanz.de
-- Markus Grandpré Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre und Infrastruktur, Tel: ++49 7531 88 4342
short addendum: I was able to correct the following warnings when performing database operations on the mailman-web database:
/usr/lib/python3/dist-packages/django_q/conf.py:139: UserWarning: Retry and timeout are misconfigured. Set retry larger than timeout, failure to do so will cause the tasks to be retriggered before completion. See https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
django_mailman3.MailDomain: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
on our Debian 12 system in file </etc/mailman/mailman-web.cfg>:
Q_CLUSTER = {
'orm': 'default',
'retry': 360,
'save_limit': 100,
'timeout': 300,
'worker': 2
}
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
Best Markus
Am 26.03.24 um 08:06 schrieb Markus Grandpré:
Dear Mr Sapiro,
thank you very much for your help. The required command is:
# mailman-web hyperkitty_import
-l mailman21-migration-test-04@mailman.uni-konstanz.de
/var/mailman21/testlist.mboxDue to the following warnings, I still have to customize Hyperkitty:
django_mailman3.MailDomain: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. ...
Can you give me another hint? As Linux admin I installed the packages mailman and mailman-web that were offered to me under Debian 12. Although during the installation of the packages user "list" was created, I cannot use it:
# su - list This account is currently not available
As with Mailman 2.1, I will probably have to continue working with Mailman3 as root. Too bad that there is no documentation for Debian admins like me, who don't want to dive too deep into the python framework. Or have I overlooked something?
Best regards, Markus
Am 25.03.24 um 18:56 schrieb Mark Sapiro:
On 3/25/24 07:58, Markus Grandpre wrote:
Dear list members,
when following the instructions to migrate list archives from Mailman21 to Mailman3 (see [1]), I face the following problem:
# python3 manage.py hyperkitty_import -l mailman21-migration-test-04 /var/mailman21/testlist.mbox python3: can't open file '/var/mailman21/manage.py': [Errno 2] No such file or directory
and have no clue, where to find the right <manage.py> file. The command
This depends on how you installed Mailman 3. You may or may not want
python3 manage.py
at all. The required command could be something likedjango-admin
ormailman-web
.Also the
#
prompt indicates you may be running as root. Mailman related commands should be run as the Mailman user (could bemailman
orlist
or ... depending again on how you installed Mailman). Running as root can create files owned by root that later can't be read by the Mailman user.
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@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 markus.grandpre@uni-konstanz.de
-- Markus Ludwig Grandpré Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung und Lehre, B803, Tel: ++49 7531 88 4342
participants (5)
-
Mark Sapiro
-
Markus Grandpre
-
Markus Grandpré
-
Michael Oberrauch
-
Odhiambo Washington