#1082541 mailman3-web: Cronjob reports warnings every minute after clean install

Package:
mailman3-web
Source:
mailman3-web
Submitter:
Jens Kutilek
Date:
2025-08-12 12:45:02 UTC
Severity:
normal
Tags:
#1082541#5
Date:
2024-09-21 18:30:37 UTC
From:
To:
Dear Maintainer,

I did a first-time install of mailman3-web (along with mailman3 and
mailman-full) on bookworm.

After installation, I get an e-mail from a cronjob every minute that

a) Retry and timeout are misconfigured in django_q
b) Warnings apparently about the database used by mailman3-web

It's quite annoying to get those mails every minute, and it's also not
clear if I could do anything to fix those problems myself.

The mail:

Subject: "Cron <www-data@pwr>     [ -f /usr/bin/django-admin ] && flock -n /var/run/mailman3-web/cron.hourly /usr/share/mailman3-web/manage.py runjobs {minutely | hourly ...}"

/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.
 warn(
System check identified some issues:

WARNINGS:
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'.
django_mailman3.Profile: (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'.
hyperkitty.Attachment: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Email: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Favorite: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.LastView: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.MailingList: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Profile: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Tag: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Tagging: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Thread: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.ThreadCategory: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Vote: (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 HyperKittyConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
postorius.EmailTemplate: (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 PostoriusConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

#1082541#10
Date:
2024-10-29 16:22:17 UTC
From:
To:
forcemerge 1082541 1051617
severity  1082541 important
found 1082541 0+20200530-2.1
fixed 1082541 0+20240312-1
forwarded 1082541 https://gitlab.com/mailman/mailman/-/issues/957

I'm getting this as well. It looks like this is an upstream issue, with
a relatively simple workaround. I've added this to our configuration:

DEFAULT_AUTO_FIELD='django.db.models.AutoField'

Q_CLUSTER = {
    'timeout': 300,
    'retry': 600,
    'save_limit': 100,
    'orm': 'default',
    'poll': 5,
}

And it fixes both warnings. Those have been fixed upstream, in fact, and
probably are gone from trixie.

a.

#1082541#23
Date:
2024-10-29 17:36:30 UTC
From:
To:
Hello,

Antoine Beaupré <anarcat@debian.org> wrote on 29/10/2024 at 17:22:17+0100:

That's my bad. Upstream fixed the auto_field thing and I made a patch
for Q_CLUSTER config.

I thought I did a pu for bookworm but never did.

I'll do it.

Sorry.

#1082541#28
Date:
2024-10-29 17:41:47 UTC
From:
To:
On 2024-10-29 18:36:30, Pierre-Elliott Bécue wrote:

[...]

Dude. Don't be sorry, things slip through the cracks all the time, and
mailman is *really* complicated now, so i totally understand things like
that coming up!

Thanks for maintaining the package, it's in much better shape than when
i tried it last. :)

a.

#1082541#35
Date:
2025-08-12 12:35:30 UTC
From:
To:
Dear fellow Maintainer,

as of today I got 2.8k mails from cron because of failing jobs:
- /var/run/mailman3-web/cron.minutely
- /var/run/mailman3-web/cron.quarter_hourl
- /var/run/mailman3-web/cron.hourly
- /var/run/mailman3-web/cron.daily

This time caused by
  python3-robot-detection: /usr/lib/python3/dist-packages/robot_detection.py
...

I have patched my /etc/cron.d/mailman3-web to have an '2>/dev/null'
after each cron command to silence this for now.

This is sub-optimal as now all errors are lost. Maybe better redirect
those errors to some log file.
Even better would be rate-limiting to one messeage per time-unit.


python3-robot-detection should also be fixed, but as mailman3-web seems
to have a similar problem after each Debian update, do not just hope
that all Python-3 packages will be fixed next time.
Maybe add a `autopkgtest` to check for those warnings automatically?

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078661

Philipp