@@ -433,6 +433,10 @@ function user_delete($event_name, $data) {
433433 // Move it, adding a date based suffix. A cronjob should purge or archive.
434434 $ thrash_maildir_path = $ old_maildir_path . '- ' . date ("YmdHis " );
435435 $ app ->system ->exec_safe ('mv ? ? ' , $ old_maildir_path , $ thrash_maildir_path );
436+
437+ // Update the dir's timestamp to make filtering on age easier in any cleanup cronjob.
438+ $ app ->system ->exec_safe ('touch ? ' , $ thrash_maildir_path );
439+
436440 $ app ->log ('Renamed the Maildir: ' . $ data ['old ' ]['maildir ' ] . ' to ' . $ thrash_maildir_path , LOGLEVEL_DEBUG );
437441 } else {
438442 $ app ->system ->exec_safe ('rm -rf ? ' , $ old_maildir_path );
@@ -484,6 +488,10 @@ function domain_delete($event_name, $data) {
484488 // Move it, adding a date based suffix. A cronjob should purge or archive.
485489 $ thrash_maildomain_path = $ old_maildomain_path . '- ' . date ("YmdHis " );
486490 $ app ->system ->exec_safe ('mv ? ? ' , $ old_maildomain_path , $ thrash_maildomain_path );
491+
492+ // Update the dir's timestamp to make filtering on age easier in any cleanup cronjob.
493+ $ app ->system ->exec_safe ('touch ? ' , $ thrash_maildomain_path );
494+
487495 $ app ->log ('Renamed the mail domain directory: ' . $ old_maildomain_path . ' to ' . $ thrash_maildomain_path , LOGLEVEL_DEBUG );
488496 } else {
489497 $ app ->system ->exec_safe ('rm -rf ? ' , $ old_maildomain_path );
0 commit comments