diff -Nur -x '*.orig' -x '*.rej' e-smith-email-4.16.0/root/etc/e-smith/events/actions/purge-junkmail-folders mezzanine_patched_e-smith-email-4.16.0/root/etc/e-smith/events/actions/purge-junkmail-folders --- e-smith-email-4.16.0/root/etc/e-smith/events/actions/purge-junkmail-folders 2007-06-25 17:12:39.000000000 -0400 +++ mezzanine_patched_e-smith-email-4.16.0/root/etc/e-smith/events/actions/purge-junkmail-folders 2007-06-25 17:12:06.000000000 -0400 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w #---------------------------------------------------------------------- -# copyright (C) 1999-2006 Mitel Networks Corporation +# copyright (C) 1999-2007 Mitel Networks Corporation #---------------------------------------------------------------------- use strict; @@ -38,9 +38,17 @@ warn("Couldn't chdir to junkmail folder of user $user: $!\n"); next; } - purgedir("new", $age); - purgedir("tmp", $age); - purgedir("cur", $age); + foreach my $dir (qw(new tmp cur)) + { + if (-d $dir) + { + purgedir($dir, $age); + } + else + { + warn("Somebody has been fiddling - ~$user/Maildir/.junkmail/$dir is missing\n"); + } + } } exit 0;