my $mhfolder = shift;
my $mhmsg;
my $msgnum;
+ my $status;
# We must do this even in -n mode because later steps fail without
# it. This should be harmless.
}
if ($mhfolder ne 'SPAM') {
- system("mark +$mhfolder $msgnum -sequence unseen -add");
+ $status = system("mark +$mhfolder $msgnum -sequence unseen -add");
+ if (not (WIFEXITED($status) and WEXITSTATUS($status) == 0)) {
+ errx(&EX_TEMPFAIL, "Failed to mark message unseen");
+ }
}
}