diff options
Diffstat (limited to 'localrmstaleaccounts')
-rwxr-xr-x | localrmstaleaccounts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/localrmstaleaccounts b/localrmstaleaccounts index c7ceaae..137dd61 100755 --- a/localrmstaleaccounts +++ b/localrmstaleaccounts @@ -53,7 +53,8 @@ info() { } remove_account() { - [ -n "$DRY_RUN" ] || localrmaccount "$1" + warn "$2" + [ -n "$DRY_RUN" ] || localrmaccount "$1" "$2" } for user in "$@"; do @@ -65,14 +66,11 @@ for user in "$@"; do elif [ ! -d "$home/Maildir" ]; then warn "Skipping user $user: Missing Maildir" elif find "$home/Maildir/new" -maxdepth 0 -type d -mtime +365 | grep -q .; then - info "Removing user $user: Maildir INBOX/new untouched for a year" - remove_account "$user" + 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 - info "Removing user $user: Maildir INBOX/cur untouched for a year" - remove_account "$user" + remove_account "$user" "Removing user $user: Maildir INBOX/cur untouched for a year" elif find "$home/Maildir/new" -type f -mtime +365 | grep -q .; then - info "Removing user $user: new mail in INBOX untouched for a year" - remove_account "$user" + remove_account "$user" "Removing user $user: new mail in INBOX untouched for a year" else info "Skipping user $user" fi |