Skip to content

Commit f49bbf8

Browse files
author
Till Brehm
committed
Update 500-clean_mailboxes.inc.php
1 parent a4aab7f commit f49bbf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/lib/classes/cron.d/500-clean_mailboxes.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ private function purge_soft_deleted_maildir() {
128128
if (!empty($matched_dirs)) {
129129
$delay_days = $mail_config['mailbox_soft_delete'];
130130
foreach($matched_dirs as $dir) {
131-
if (is_dir($dir)) {
131+
$owner = posix_getpwuid(fileowner($dir))
132+
if (is_dir($dir) && is_array($owner) && $owner['name'] = 'vmail') {
132133
$mtime = filemtime($dir);
133134
if ($mtime < strtotime("-$delay_days days")) {
134135
// do remove

0 commit comments

Comments
 (0)