Suspend email delivery during account archiving

GLPI #48692
tags/smeserver-expire-accounts-0.1.7-1
Daniel Berteaud 4 years ago
parent ce4d4efaee
commit 3f8d0c636a
  1. 3
      root/sbin/e-smith/expire-accounts

@ -123,6 +123,9 @@ foreach my $u (@delete){
} }
my $archive = $user->prop('ExpireArchiveBeforeDelete') || 'yes'; my $archive = $user->prop('ExpireArchiveBeforeDelete') || 'yes';
if ( $archive =~ m/^yes|enabled|1|on$/ ){ if ( $archive =~ m/^yes|enabled|1|on$/ ){
# Suspend email delivery, prevent tar ending with exit code 1
# because Maildir changed during archive
system('chmod', '+t', getpwnam($u)->dir)
my $tar = $archive_path . '/' . $u . '-' . $now->ymd . '.tar.' . $archive_ext; my $tar = $archive_path . '/' . $u . '-' . $now->ymd . '.tar.' . $archive_ext;
my $res = system( my $res = system(
'tar', 'tar',

Loading…
Cancel
Save