]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/plugins/dovecot.rb
Rename PostfixadminDb, RoundcubeDb without the Db suffix.
[mailshears.git] / lib / rm / plugins / dovecot.rb
diff --git a/lib/rm/plugins/dovecot.rb b/lib/rm/plugins/dovecot.rb
new file mode 100644 (file)
index 0000000..4283e9c
--- /dev/null
@@ -0,0 +1,25 @@
+# Needed for rm_r.
+require 'fileutils'
+
+require 'common/dovecot_plugin'
+require 'rm/rm_plugin'
+
+class DovecotRm
+
+  include DovecotPlugin
+  include RmPlugin
+
+
+  def delete_domain(domain)
+    # Will raise an exception if the path doesn't exist.
+    domain_path = self.get_domain_path(domain)
+    FileUtils.rm_r(domain_path)
+  end
+
+  def delete_account(account)
+    # Will raise an exception if the path doesn't exist.
+    account_path = self.get_account_path(account)
+    FileUtils.rm_r(account_path)
+  end
+
+end