]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/prune/plugins/dovecot.rb
mailshears.gemspec: bump version to 0.1.0
[mailshears.git] / lib / prune / plugins / dovecot.rb
index bf96420d209753da032d77bd4cbcb7e71d3d5f3e..9fbeb58f14170f3d56bf0edad78e39ed28ae1144 100644 (file)
@@ -1,26 +1,11 @@
 require 'prune/prune_plugin'
 require 'rm/plugins/dovecot'
 
+# Handle the pruning of Dovecot users from its database. This class
+# doesn't need to do anything; by inheriting from {DovecotRm}, we get
+# its {DovecotRm#remove_user} method and that's all we need to prune.
+#
 class DovecotPrune < DovecotRm
-
+  # Needed for the magic includers <tt>run()</tt> method.
   include PrunePlugin
-
-
-  def get_leftover_domains(db_domains)
-    # Get the list of domains according to the 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)
-  end
-
-  def get_leftover_users(db_users)
-    # Get the list of users according to the filesystem.
-    fs_domains = self.list_domains()
-    fs_users = self.list_domains_users(fs_domains)
-
-    # And return the users on the filesystem that aren't in the DB.
-    return (fs_users - db_users)
-  end
-
 end