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:
install and configure piler instance
set a retention days
log to the container : podman exec -ti piler-app bash
become piler : su piler
display the cron of piler : cat /usr/share/piler/piler.cron40 3 * * * /usr/libexec/piler/purge.sh
trigger manually the script /usr/libexec/piler/purge.sh
we have a lot of python exceptions
piler@piler:/$ /usr/libexec/piler/pilerpurge.py
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'
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:**
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:
podman exec -ti piler-app bash
su piler
cat /usr/share/piler/piler.cron
40 3 * * * /usr/libexec/piler/purge.sh
/usr/libexec/piler/purge.sh
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'
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