]>
gitweb.michael.orlitzky.com - mailshears.git/blob - src/dovecot_mailstore.rb
81eb167ed4c56a540aeb48f8a3b11385f891becc
1 require 'src/filesystem'
2 require 'src/mailstore'
4 class DovecotMailstore
< Mailstore
6 def get_domains_from_filesystem()
7 return Filesystem
.get_subdirs(@domain_root)
11 def get_accounts_from_filesystem(domains
)
14 domains
.each
do |domain
|
15 domain_path
= File
.join(@domain_root, domain
)
17 if File
.directory
?(domain_path
)
18 # If domain_path isn't a directory, maybe the
19 # domain folder doesn't exist? In that case, I
20 # guess we want to report zero accounts.
21 usernames
= Filesystem
.get_subdirs(domain_path
)
23 usernames
.each
do |username
|
24 accounts
<< "#{username}@#{domain}"