]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/prune/prune_plugin.rb
Add a Rakefile.
[mailshears.git] / lib / prune / prune_plugin.rb
1 require 'rm/rm_plugin'
2
3 module PrunePlugin
4 include RmPlugin
5
6 #
7 # Plugins for the removal of leftover non-PostfixAdmin accounts,
8 # i.e. after an account has been removed from the PostfixAdmin
9 # database.
10 #
11
12 def PrunePlugin.included(c)
13 # Callback, called whenever another class or module includes this
14 # one. The parameter given is the name of the class or module
15 # that included us.
16 @includers ||= []
17 @includers << c
18 end
19
20 def PrunePlugin.includers
21 return @includers
22 end
23
24 def get_leftover_domains(db_domains)
25 # Given a list of domains, determine which domains belonging to
26 # this plugin are not contained in the given list.
27 raise NotImplementedError
28 end
29
30 def get_leftover_accounts(db_accounts)
31 # Given a list of accounts, determine which accounts belonging to
32 # this plugin are not contained in the given list.
33 raise NotImplementedError
34 end
35 end