]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Eml.pm
lei_to_mail+mbox_reader: fix handling of empty/bogus emails
[public-inbox.git] / lib / PublicInbox / Eml.pm
index 955d6a96a51c12b549478145afd45491dd5c9e25..0867a016e1987072c421ec2cfe5783fcc7534c18 100644 (file)
@@ -480,6 +480,14 @@ sub charset_set {
 
 sub crlf { $_[0]->{crlf} // "\n" }
 
+sub raw_size {
+       my ($self) = @_;
+       my $len = length(${$self->{hdr}});
+       defined($self->{bdy}) and
+               $len += length(${$self->{bdy}}) + length($self->{crlf});
+       $len;
+}
+
 # warnings to ignore when handling spam mailboxes and maybe other places
 sub warn_ignore {
        my $s = "@_";