Well, it really saddens me that procmail can't write 'standard' maildir
filenames. I've seen the discussions in the archive on this issue. Even
if the standard is not 'clear' and mail readers aren't 'supposed' to parse
the filenames, why can't procmail just conform to what everyone else
does? Is it really that hard to put in the timestamp? Well, I just
wanted to post my gripe, and the perl script I wrote real quick to clean
up my Maildir folder. I'm going back to my custom perl filter. I atleast
have control over that and know exactly what it is doing. Good luck with
the program. I hope this issue is resolved, cause procmail just kicks too
much ass.
Nathan Shafer
#!/usr/bin/env perl
opendir DIR, "/home/nate/Maildir/cur" or die "opendir: $!";
@files = grep /^_/, readdir DIR;
closedir DIR;
foreach $file (@files) {
$file = "/home/nate/Maildir/cur/$file";
@stat = stat($file);
$mtime = $stat[9];
$file =~ /:(.*)/;
$ending = $1;
$pid = int(rand(20000));
until(length($pid) >= 4) {
$pid = int(rand(20000));
}
$newfilename =
"/home/nate/Maildir/cur/$mtime.$pid.rake.lotech.org:$ending";
if(-e $newfilename) {
warn(" !!! $newfilename already exists... skipping\n");
} else {
warn("renaming $file to $newfilename\n");
rename $file, $newfilename;
}
}
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail