]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/dovecot_plugin.rb
Use semantic bound on pg library.
[mailshears.git] / lib / common / dovecot_plugin.rb
index 4718483bec420e0e11731502597069300c816cb4..fa61d5367b593d959c1839de143f1f0c767490db 100644 (file)
@@ -10,31 +10,15 @@ module DovecotPlugin
   include Plugin
 
   def initialize(cfg)
-    @domain_root = cfg.mail_root
+    @domain_root = cfg.dovecot_mail_root
   end
 
   def describe_domain(domain)
-    begin
-      domain_path = get_domain_path(domain)
-      return domain_path
-    rescue NonexistentDomainError => e
-      return "Doesn't exist: #{e.to_s}"
-    end
+    return get_domain_path(domain)
   end
 
   def describe_user(user)
-    begin
-      user_path = get_user_path(user)
-      return user_path
-    rescue NonexistentUserError => e
-      return "Doesn't exist: #{e.to_s}"
-    end
-  end
-
-
-  def domain_exists(domain)
-    domains = list_domains()
-    return domains.include?(domain)
+    return get_user_path(user)
   end