From dd47ebac138ecb04c70ace2efb6bd7bffa488044 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 26 Jan 2016 12:37:19 +0100 Subject: [PATCH] Remove auto-reply when unlocking user --- root/etc/e-smith/events/actions/user-reset-expired | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/root/etc/e-smith/events/actions/user-reset-expired b/root/etc/e-smith/events/actions/user-reset-expired index 7e22c62..d3c5c1b 100644 --- a/root/etc/e-smith/events/actions/user-reset-expired +++ b/root/etc/e-smith/events/actions/user-reset-expired @@ -2,6 +2,7 @@ use strict; use esmith::AccountsDB; +use User::pwent; my $a = esmith::AccountsDB->open || die "Couldn't open the AccountsDB\n"; @@ -17,4 +18,7 @@ if (!$user){ my $rec = $a->get($user) || die "user $user not found in AccountsDB\n"; $rec->del_prop('ExpireLockedOn'); +$rec->del_prop('ExpireAutoReply'); +unlink glob (getpwnam($userName)->dir . "/.lock-auto-reply/*" ) + if -d getpwnam($userName)->dir . "/.lock-auto-reply/";