summaryrefslogtreecommitdiff
path: root/localrmstaleaccounts
diff options
context:
space:
mode:
Diffstat (limited to 'localrmstaleaccounts')
-rwxr-xr-xlocalrmstaleaccounts4
1 files changed, 4 insertions, 0 deletions
diff --git a/localrmstaleaccounts b/localrmstaleaccounts
index 137dd61..f3c9b12 100755
--- a/localrmstaleaccounts
+++ b/localrmstaleaccounts
@@ -65,6 +65,10 @@ for user in "$@"; do
warn "Skipping user $user: Email gets forwarded"
elif [ ! -d "$home/Maildir" ]; then
warn "Skipping user $user: Missing Maildir"
+ elif postalias -s /etc/aliases | grep -qP ':\s+'"$user"'$'; then
+ warn "Skipping user $user: target in /etc/aliases"
+ elif find -- /var/lib/radicale/collections/collection-root -maxdepth 1 -type d -name "$user" -not -empty | grep -q '^'; then
+ warn "Skipping user $user: Uses Radicale"
elif find "$home/Maildir/new" -maxdepth 0 -type d -mtime +365 | grep -q .; then
remove_account "$user" "Removing user $user: Maildir INBOX/new untouched for a year"
elif find "$home/Maildir/cur" -maxdepth 0 -type d -mtime +365 | grep -q .; then