i noticed that the purge trash and junk is not working. I found out that the file that needs to be run is: lib/classes/cron.d/500-clean_mailboxes.inc.php But i cant find witch cron is starting it, so is this a bug or am i missing something?
It is run by /usr/local/ispconfig/server/cron.sh, you can find the cronjob in the root crontab. Run: crontab -l as root user to see if cron.sh is started by the root crontab.
Sorry i missed your reply. Cron is running Centos 7 In the db i see: purge_trash_days and purge_junk_days for this mailbox on 90 days But looking in: .Trash/cur/ the oldest file is: -rw------- 1 vmail vmail 13206 May 5 2022 1663676834
The internal ISPConfig cron system tracks the cron runs in sys_cron table in the ispconfig database, open that table with phpmyadmin, locate the line for the clean_mailboxes plugin and delete it. This should reset the corn schedule for this plugin and run it on next cron execution.
is there a way to debug this Still no luck cron is running, scripts seems to be running debugging gives me: Code: doveadm expunge -u '[email protected]' mailbox 'Trash' sentbefore 90d - return code: 0 DEBUG [system.inc:2399] - safe_exec cmd: doveadm expunge -u '[email protected]' mailbox 'Junk' sentbefore 90d - return code: 0 DEBUG [system.inc:2399] - safe_exec cmd: doveadm purge -u '[email protected]' - return code: 0 DEBUG [system.inc:2399] - safe_exec cmd: doveadm quota recalc -u 'info@xxx' - return code: 0 if i run this manualy im getting no output but the emails older then 90d are deleted Code: doveadm expunge -u '[email protected]' mailbox 'Trash' sentbefore 90d
like i sead... doveadm expunge -u '[email protected]' mailbox 'Trash' sentbefore 90d is working fine, message are getting deleted thanxs for the pointer to verbose the output. Manualty running: Code: doveadm -Dv expunge -u '[email protected]' mailbox 'Trash' sentbefore 86d 2 messages getting deleted Code: doveadm([email protected]): Debug: Added userdb setting: mail=maildir:/var/vmail/xxx.nl/info/Maildir doveadm([email protected]): Debug: Added userdb setting: plugin/quota_rule=*:storage=1048576000B doveadm([email protected]): Debug: Added userdb setting: plugin/sieve=/var/vmail/xxx.nl/info/.sieve doveadm([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/xxx.nl/info doveadm([email protected]): Debug: Quota root: name=user backend=dict args=:file:/var/vmail/xxx.nl/info/.quotausage doveadm([email protected]): Debug: Quota rule: root=user mailbox=* bytes=1048576000 messages=0 doveadm([email protected]): Debug: Quota grace: root=user bytes=104857600 (10%) doveadm([email protected]): Debug: dict quota: [email protected], uri=file:/var/vmail/xxx.nl/info/.quotausage, noenforcing=0 doveadm([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/xxx.nl/info/Maildir doveadm([email protected]): Debug: maildir++: root=/var/vmail/xxx.nl/info/Maildir, index=, indexpvt=, control=, inbox=/var/vmail/xxx.nl/info/Maildir, alt= doveadm([email protected]): Debug: quota: quota_over_flag check: quota_over_script unset - skipping doveadm([email protected]): Debug: Trash: Mailbox opened because: expunge doveadm([email protected]): Debug: expunge: box=Trash uid=4547 doveadm([email protected]): Debug: expunge: box=Trash uid=4998 i dont know what this does: Code: doveadm -Dv purge -u '[email protected]' The output: Code: doveadm([email protected]): Debug: Added userdb setting: mail=maildir:/var/vmail/xxx.nl/info/Maildir doveadm([email protected]): Debug: Added userdb setting: plugin/quota_rule=*:storage=1048576000B doveadm([email protected]): Debug: Added userdb setting: plugin/sieve=/var/vmail/xxx.nl/info/.sieve doveadm([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/xxx.nl/info doveadm([email protected]): Debug: Quota root: name=user backend=dict args=:file:/var/vmail/xxx.nl/info/.quotausage doveadm([email protected]): Debug: Quota rule: root=user mailbox=* bytes=1048576000 messages=0 doveadm([email protected]): Debug: Quota grace: root=user bytes=104857600 (10%) doveadm([email protected]): Debug: dict quota: [email protected], uri=file:/var/vmail/xxx.nl/info/.quotausage, noenforcing=0 doveadm([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/xxx.nl/info/Maildir doveadm([email protected]): Debug: maildir++: root=/var/vmail/xxx.nl/info/Maildir, index=, indexpvt=, control=, inbox=/var/vmail/xxx.nl/info/Maildir, alt= doveadm([email protected]): Debug: quota: quota_over_flag check: quota_over_script unset - skipping
You can run ISPConfig internal cronjobs manually using the /usr/local/ispconfig/server/cron_debug.php script.
hm just a followup It looks like it is working... but not everything is getting deleted. No idee why... I put the -Dv debug option in the script and i see messages getting deleted. But looking in some mailboxes i see messages from 2020 Code: -rw------- 1 vmail vmail 171773 Dec 15 2020 1664689267.M276670P24957 Well i leave this for now. dont know what is the problem with hese messages