X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Frm%2Fplugins%2Fdovecot.rb;h=7babfbeb40d353f212459f0a040da3c9d0d6f8bb;hp=0ced5bec3acf4aca70bbdd7008882112c78ba412;hb=df4e02ebf6a4e28a58abcb298a4442a245ad0b15;hpb=d0bfa37fb4be739b31dd97c493764ca19a160182 diff --git a/lib/rm/plugins/dovecot.rb b/lib/rm/plugins/dovecot.rb index 0ced5be..7babfbe 100644 --- a/lib/rm/plugins/dovecot.rb +++ b/lib/rm/plugins/dovecot.rb @@ -1,16 +1,24 @@ -# Needed for rm_r. require 'fileutils' require 'common/dovecot_plugin' require 'rm/rm_plugin' + +# Handle the removal of users and domains from the Dovecot mailstore +# (the filesystem). +# class DovecotRm include DovecotPlugin include RmPlugin - def delete_domain(domain) + # Remove *domain* from the Dovecot mailstore. This just runs "rm -r" + # on the domain directory if it exists. + # + # @param domain [Domain] the domain to remove. + # + def remove_domain(domain) domain_path = self.get_domain_path(domain) if not File.directory?(domain_path) @@ -20,7 +28,14 @@ class DovecotRm FileUtils.rm_r(domain_path) end - def delete_user(user) + + # Remove *user* from the Dovecot mailstore. This just runs "rm -r" + # on the *user*'s mailbox directory, if it exists. + # + # @param user [User] the user whose mailbox directory we want to + # remove. + # + def remove_user(user) user_path = self.get_user_path(user) if not File.directory?(user_path)