+module PostfixadminDbPlugin
+ # Code that all PostfixadminDb plugins (Prune, Rm, Mv...) will
+ # share. That is, we implement the Plugin interface.
+ include Plugin
+
+ def initialize()
+
+ cfg = Configuration.new()
+ @db_host = cfg.dbhost
+ @db_port = cfg.dbport
+ @db_opts = cfg.dbopts
+ @db_tty = cfg.dbtty
+ @db_name = cfg.dbname
+ @db_user = cfg.dbuser
+ @db_pass = cfg.dbpass
+ end
+
+
+ def describe_account(account)
+ # There's no other unique identifier in PostfixAdmin
+ return account
+ end
+
+
+ def describe_domain(domain)
+ # There's no other unique identifier in PostfixAdmin
+ return domain