X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fprune%2Fplugins%2Fdovecot.rb;h=9fbeb58f14170f3d56bf0edad78e39ed28ae1144;hp=bf96420d209753da032d77bd4cbcb7e71d3d5f3e;hb=f52761d8c74b146415329f7a8ac004ced0ab4db8;hpb=72696d3f6e95ef773af9727e9c3459b9038b0fc2 diff --git a/lib/prune/plugins/dovecot.rb b/lib/prune/plugins/dovecot.rb index bf96420..9fbeb58 100644 --- a/lib/prune/plugins/dovecot.rb +++ b/lib/prune/plugins/dovecot.rb @@ -1,26 +1,11 @@ require 'prune/prune_plugin' require 'rm/plugins/dovecot' +# Handle the pruning of Dovecot users from its database. This class +# doesn't need to do anything; by inheriting from {DovecotRm}, we get +# its {DovecotRm#remove_user} method and that's all we need to prune. +# class DovecotPrune < DovecotRm - + # Needed for the magic includers run() method. include PrunePlugin - - - def get_leftover_domains(db_domains) - # Get the list of domains according to the filesystem. - fs_domains = self.list_domains() - - # Return the list of domains on the filesystem that aren't in the DB. - return (fs_domains - db_domains) - end - - def get_leftover_users(db_users) - # Get the list of users according to the filesystem. - fs_domains = self.list_domains() - fs_users = self.list_domains_users(fs_domains) - - # And return the users on the filesystem that aren't in the DB. - return (fs_users - db_users) - end - end