]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/prune/plugins/dovecot_mailstore.rb
Move domain removal into the plugins.
[mailshears.git] / lib / prune / plugins / dovecot_mailstore.rb
index f504d9c5560159d55e5ccbb900fbdd33fc9d76a8..eddd822f0bfff4c04fbf2d9bcf2da51aba17d23f 100644 (file)
@@ -1,5 +1,3 @@
-require 'common/filesystem'
-require 'common/mailstore'
 require 'common/dovecot_mailstore_plugin'
 require 'prune/prune_plugin'
 require 'rm/plugins/dovecot_mailstore'
@@ -12,7 +10,7 @@ class DovecotMailstorePrune < DovecotMailstoreRm
 
   def get_leftover_domains(db_domains)
     # Get the list of domains according to the filesystem.
-    fs_domains = self.get_domains_from_filesystem()
+    fs_domains = self.list_domains()
 
     # Return the list of domains on the filesystem that aren't in the DB.
     return (fs_domains - db_domains)
@@ -20,8 +18,8 @@ class DovecotMailstorePrune < DovecotMailstoreRm
 
   def get_leftover_accounts(db_accounts)
     # Get the list of accounts according to the filesystem.
-    fs_domains = self.get_domains_from_filesystem()
-    fs_accounts = self.get_accounts_from_filesystem(fs_domains)
+    fs_domains = self.list_domains()
+    fs_accounts = self.list_domains_users(fs_domains)
 
     # And return the accounts on the filesystem that aren't in the DB.
     return (fs_accounts - db_accounts)