diff options
author | root <root@homebase.dk> | 2012-04-17 17:17:21 +0200 |
---|---|---|
committer | root <root@homebase.dk> | 2012-04-17 17:17:21 +0200 |
commit | 4a26e197fcc7db3b77a08eaa61163631ba03112a (patch) | |
tree | c6deacd98f3e9511ff7d7643f1ced1019486dbbe /postfix/cron.weekly/local-purgeoldtrashedmails | |
parent | b8ab1ccea83bc2d8f99a7df8e6ba10c5d2c71740 (diff) |
Purge trashed mails one layer deeper when adduser has LETTERHOMES enabled.
Diffstat (limited to 'postfix/cron.weekly/local-purgeoldtrashedmails')
-rwxr-xr-x | postfix/cron.weekly/local-purgeoldtrashedmails | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/postfix/cron.weekly/local-purgeoldtrashedmails b/postfix/cron.weekly/local-purgeoldtrashedmails index e440b02..7ec70e7 100755 --- a/postfix/cron.weekly/local-purgeoldtrashedmails +++ b/postfix/cron.weekly/local-purgeoldtrashedmails @@ -4,6 +4,11 @@ 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 /home/*/Maildir/.Junk -type f -mtime +60 -delete +prefix=/home/*/Maildir +if grep -Fxq LETTERHOMES=yes /etc/adduser.conf; then + prefix=/home/*/*/Maildir +fi + +find $prefix/.Trash $prefix/.Trash.* $prefix/.INBOX_Trash $prefix/.trash $prefix/.Deleted\ Messages $prefix/.Deleted\ Items $prefix/.Slettet\ post $prefix/.Junk -type f -mtime +60 -delete exit 0 |