http://bugzilla.spamassassin.org/show_bug.cgi?id=3003
Summary: Real maildir support for
ArchiveIterator::scan_directories
Product: Spamassassin
Version: 2.63
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: Learner
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
ArchiveIterator::scan_directories currently does not support Maildirs properly,
the following patch fixes this.
--- ArchiveIterator.pm.org 2004-02-04 17:41:53.000000000 +0100
+++ ArchiveIterator.pm 2004-02-04 17:44:10.000000000 +0100
@@ -433,7 +433,16 @@
my @files;
opendir(DIR, $folder) || die "Can't open '$folder' dir: $!";
- if (-f "$folder/cyrus.header") {
+ if (-d "$folder/new" && -d "$folder/cur" && -d "$folder/tmp") {
+ # Maildir format
+ for my $sub ("new", "cur") {
+ closedir(DIR);
+ opendir (DIR, "$folder/$sub") || die "Can't open '$folder/$sub' dir: $!";
+ # Don't learn from messages marked as deleted
+ # Or files starting with a leading dot
+ push @files, map {$_ = "$sub/$_";} grep { !/^\.|:2,.*T/ } readdir(DIR);
+ }
+ } elsif (-f "$folder/cyrus.header") {
# cyrus metadata: http://unix.lsa.umich.edu/docs/imap/imap-lsa-srv_3.html
@files = grep { /^\S+$/ && !/^cyrus\.(?:index|header|cache|seen)/ }
readdir(DIR);
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.