]> gitweb.michael.orlitzky.com - mailshears.git/commitdiff
Added the get_domains_from_filesystem function to the DovecotMailstore class.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Jun 2010 15:40:23 +0000 (11:40 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Jun 2010 15:40:23 +0000 (11:40 -0400)
Make get_accounts_from_filesystem take its list of domains as a parameter.

src/dovecot_mailstore.rb

index 187b6b0dbfad083f5533b86916c099997d29a948..a794032c246d3c171a33193ab56c1cc823429cec 100644 (file)
@@ -3,15 +3,18 @@ require 'src/mailstore'
 
 class DovecotMailstore < Mailstore
 
-  def get_accounts_from_filesystem()
+  def get_domains_from_filesystem()
+    return Filesystem.get_subdirs(@domain_root)
+  end
+
+
+  def get_accounts_from_filesystem(domains)
     accounts = []
-  
-    domains = Filesystem.get_subdirs(@domain_root)
-  
+
     domains.each do |domain|
       domain_path = File.join(@domain_root, domain)
       usernames = Filesystem.get_subdirs(domain_path)
-      
+
       usernames.each do |username|
         accounts << "#{username}@#{domain}"
       end
@@ -19,5 +22,5 @@ class DovecotMailstore < Mailstore
 
     return accounts
   end
-    
+
 end