Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 28e5603482
Fetching contributors…

Cannot retrieve contributors at this time

executable file 28 lines (23 sloc) 0.799 kb
use strict;
use warnings;
use File::Find::Rule;
my $ROOT = "$ENV{HOME}/Maildir";
my @dirs = File::Find::Rule->directory
->exec(sub { -d "$_/new" })
my $total = 0;
for my $dir (sort @dirs) {
my $count = File::Find::Rule->file
->exec(sub { $_[2] =~ m{/(?:new|cur)/} })
next unless $count;
$total += $count;
$dir =~ s{\Q$ROOT\E}{/INBOX};
$dir =~ tr|.|/|;
printf "%-30s : %u\n", $dir, $count;
$total ? (printf "%30s : %u\n", 'total', $total) : (print "no new mail\n");
Jump to Line
Something went wrong with that request. Please try again.