]>
gitweb.michael.orlitzky.com - mailshears.git/blob - lib/prune/plugins/dovecot.rb
1 require 'prune/prune_plugin'
2 require 'rm/plugins/dovecot'
4 class DovecotPrune
< DovecotRm
9 def get_leftover_domains(db_domains
)
10 # Get the list of domains according to the filesystem.
11 fs_domains
= self.list_domains()
13 # Return the list of domains on the filesystem that aren't in the DB.
14 return (fs_domains
- db_domains
)
17 def get_leftover_accounts(db_accounts
)
18 # Get the list of accounts according to the filesystem.
19 fs_domains
= self.list_domains()
20 fs_accounts
= self.list_domains_users(fs_domains
)
22 # And return the accounts on the filesystem that aren't in the DB.
23 return (fs_accounts
- db_accounts
)