summaryrefslogtreecommitdiff
path: root/postfix/cron.weekly/local-purgeoldtrashedmails
diff options
context:
space:
mode:
Diffstat (limited to 'postfix/cron.weekly/local-purgeoldtrashedmails')
-rwxr-xr-xpostfix/cron.weekly/local-purgeoldtrashedmails9
1 files changed, 9 insertions, 0 deletions
diff --git a/postfix/cron.weekly/local-purgeoldtrashedmails b/postfix/cron.weekly/local-purgeoldtrashedmails
new file mode 100755
index 0000000..7674508
--- /dev/null
+++ b/postfix/cron.weekly/local-purgeoldtrashedmails
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# Purge trashed mails older than 2 months
+
+set -e
+
+find /home/*/Maildir/.Trash /home/*/Maildir/.Trash.* /home/*/Maildir/.INBOX_Trash /home/*/Maildir/.trash /home/*/Maildir/.Deleted\ Messages /home/*/Maildir/.Deleted\ Items /home/*/Maildir/.Slettet\ post -type f -mtime +60 -exec rm -f '{}' ';'
+
+exit 0