modoboa / modoboa-amavis

The amavis frontend of Modoboa
https://modoboa.org
MIT License
23 stars 14 forks source link

qcleanup doesn't delete messages (PostgreSQL) #136

Closed skandragon closed 2 years ago

skandragon commented 3 years ago

It seems that either I don't understand what qcleanup is supposed to do, or it doesn't delete messages properly.

This is a very old install which has been upgraded over the years. However, while it seems I can delete in the web UI's quarantine page, running qcleanup doesn't seem to delete mail older than the configured 14 days:

Before running:

amavis=# select min(time_iso), max(time_iso), count(*) from msgs;
          min           |          max           | count
------------------------+------------------------+-------
 2020-06-22 00:26:50+00 | 2021-03-29 00:47:06+00 | 29362
/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py qcleanup -v 3 --verbose
Deleting marked messages...
Deleting messages older than 14 days...
Deleting unreferenced e-mail addresses...
Done.

After running:

amavis=# select min(time_iso), max(time_iso), count(*) from msgs;
          min           |          max           | count
------------------------+------------------------+-------
 2020-06-22 00:26:50+00 | 2021-03-29 00:47:06+00 | 29362
(1 row)

(that is, the same)

tonioo commented 3 years ago

@skandragon Could it be the same issue than https://github.com/modoboa/modoboa-amavis/issues/135?