jsuto / piler

Email archiving application
https://www.mailpiler.org/
Other
62 stars 9 forks source link

[BUG] purge message not workable #45

Closed stephdl closed 5 months ago

stephdl commented 5 months ago

Describe the bug

It seems the purge of emails are not done well, I tried to launch manually the script in the cronjob and I get python errors. We saw it on our real python instance, it seems that the default retention values 2555 values has not been applied

I installed piler 1.4.4 from your container and tested also with 1.4.5

To Reproduce Steps to reproduce the behavior:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/libexec/piler/pilerpurge.py", line 272, in main() File "/usr/libexec/piler/pilerpurge.py", line 215, in main read_options(args.config, opts) File "/usr/libexec/piler/pilerpurge.py", line 35, in read_options opts['storedir'] = config.get('piler', 'queuedir') File "/usr/lib/python3.10/configparser.py", line 794, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'queuedir' in section: 'piler' piler@piler:/$ /usr/libexec/piler/purge.sh Traceback (most recent call last): File "/usr/lib/python3.10/configparser.py", line 791, in get value = d[option] File "/usr/lib/python3.10/collections/init.py", line 986, in getitem return self.missing(key) # support subclasses that define missing File "/usr/lib/python3.10/collections/init.py", line 978, in missing raise KeyError(key) KeyError: 'queuedir'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/libexec/piler/pilerpurge.py", line 272, in main() File "/usr/libexec/piler/pilerpurge.py", line 215, in main read_options(args.config, opts) File "/usr/libexec/piler/pilerpurge.py", line 35, in read_options opts['storedir'] = config.get('piler', 'queuedir') File "/usr/lib/python3.10/configparser.py", line 794, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'queuedir' in section: 'piler'


**Expected behavior**
I expect that we could purge periodically the emails following the default retention days value

**Screenshots**
no screenshot
**Piler version:**

piler@piler:/$ piler -V piler 1.4.4, build 1001, Janos SUTO sj@acts.hu

Build Date: Wed Mar 22 13:59:43 UTC 2023 ldd version: ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35 gcc version: gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1) OS: Linux d4b9dee07b72 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux Configure command: ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-database=mariadb MySQL client library version: 3.3.8 Extractors: /usr/bin/pdftotext /usr/bin/catdoc /usr/bin/catppt /usr/bin/xls2csv /usr/bin/unrtf /usr/bin/tnef libzip

piler@piler:/$ piler -V piler 1.4.5-c13432f, Janos SUTO sj@acts.hu

Build Date: Sun Apr 14 06:22:54 UTC 2024 ldd version: ldd (Ubuntu GLIBC 2.35-0ubuntu3.6) 2.35 gcc version: gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) OS: Linux a11a91de5f7a 5.15.0-101-generic #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Configure command: ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-database=mariadb MySQL client library version: 3.3.8 Extractors: /usr/bin/pdftotext /usr/bin/catdoc /usr/bin/catppt /usr/bin/xls2csv /usr/bin/unrtf /usr/bin/tnef libzip

stephdl commented 5 months ago

I missed a configuration line queuedir=/var/piler/store in piler.conf

sorry for the noise, closing not a bug