]>
gitweb.michael.orlitzky.com - mailshears.git/blob - lib/prune/plugins/dovecot_mailstore.rb
1 require 'common/filesystem'
2 require 'common/mailstore'
3 require 'common/dovecot_mailstore_plugin'
4 require 'prune/prune_plugin'
5 require 'rm/plugins/dovecot_mailstore'
7 class DovecotMailstorePrune
< DovecotMailstoreRm
9 include DovecotMailstorePlugin
13 def get_leftover_domains(db_domains
)
14 # Get the list of domains according to the filesystem.
15 fs_domains
= self.get_domains_from_filesystem()
17 # Return the list of domains on the filesystem that aren't in the DB.
18 return (fs_domains
- db_domains
)
21 def get_leftover_accounts(db_accounts
)
22 # Get the list of accounts according to the filesystem.
23 fs_domains
= self.get_domains_from_filesystem()
24 fs_accounts
= self.get_accounts_from_filesystem(fs_domains
)
26 # And return the accounts on the filesystem that aren't in the DB.
27 return (fs_accounts
- db_accounts
)