remove /var/spool/mail/username if --enable user-account.
Signed-off-by: Hu Tao <hutao(a)cn.fujitsu.com>
---
sysprep/sysprep_operation_user_account.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/sysprep/sysprep_operation_user_account.ml
b/sysprep/sysprep_operation_user_account.ml
index fda5547..bda6331 100644
--- a/sysprep/sysprep_operation_user_account.ml
+++ b/sysprep/sysprep_operation_user_account.ml
@@ -83,6 +83,7 @@ let user_account_perform ~verbose ~quiet g root side_effects =
g#aug_rm userpath;
g#aug_rm (sprintf "/files/etc/shadow/%s" username);
g#aug_rm (sprintf "/files/etc/group/%s" username);
+ g#rm_rf ("/var/spool/mail/" ^ username);
match home_dir with
| None -> ()
| Some dir -> g#rm_rf dir
--
1.9.3