]> gitweb.michael.orlitzky.com - mailshears.git/blob - src/dovecot_mailstore.rb
187b6b0dbfad083f5533b86916c099997d29a948
[mailshears.git] / src / dovecot_mailstore.rb
1 require 'src/filesystem'
2 require 'src/mailstore'
3
4 class DovecotMailstore < Mailstore
5
6 def get_accounts_from_filesystem()
7 accounts = []
8
9 domains = Filesystem.get_subdirs(@domain_root)
10
11 domains.each do |domain|
12 domain_path = File.join(@domain_root, domain)
13 usernames = Filesystem.get_subdirs(domain_path)
14
15 usernames.each do |username|
16 accounts << "#{username}@#{domain}"
17 end
18 end
19
20 return accounts
21 end
22
23 end