mipmip
8/17/2015 - 1:35 PM

check all maildir subdir

check all maildir subdir

dir = "/var/customers/mail/wimsnel/aan@wimsnel.nl"
#p Dir.glob(dir)
dirs =Dir.entries(dir).select {|entry|
    File.directory? File.join(dir,entry) and !(entry =='.' || entry == '..')
}

dirs.each do |d|
    p dir + ':' + d
    #p d
    sd =Dir.entries(File.join(dir,d)).select {|entry|
        File.directory? File.join(dir,entry) and !(entry =='.' || entry == '..')
    }
    p sd

end