+25Aug00=======================================================================
+1. moan about and then delete empty message files
24Aug00=======================================================================
1. Removed WWV command so that users can't interfere (read mess up) the
automatic feeds which come from various places on the net.
}
$size = -s $fn;
$line = <$file>; # first line
+ if ($size == 0 || !$line) {
+ dbg('err', "Empty $fn $!");
+ Log('err', "Empty $fn $!");
+ return undef;
+ }
chomp $line;
$size -= length $line;
if (! $line =~ /^===/o) {
next unless /^m\d+$/o;
$ref = read_msg_header("$msgdir/$_");
- next unless $ref;
+ unless ($ref) {
+ dbg('err', "Deleting $_");
+ Log('err', "Deleting $_");
+ unlink "$msgdir/$_";
+ next;
+ }
# delete any messages to 'badmsg.pl' places
if (grep $ref->{to} eq $_, @badmsg) {