]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/rm_dummy_runner.rb
Way too many changes to mention. The 'rm' mode works now.
[mailshears.git] / lib / rm / rm_dummy_runner.rb
index c79e0467984198e903eef70ae296fae91dc17c60..9bdd13f5f47fb2dc1b71e7c012545c47c08e7e4a 100644 (file)
@@ -1,16 +1,22 @@
+require 'common/runner'
+
 class RmDummyRunner
   include Runner
 
 class RmDummyRunner
   include Runner
 
-  def run(plugin, targets)
+  def run(plugin, *targets)
     targets.each do |target|
       if target.include?('@') then
         puts "Would remove account: #{target}"
     targets.each do |target|
       if target.include?('@') then
         puts "Would remove account: #{target}"
+        # TODO: remove from postfixadmin as well.
       else
       else
+        usernames = plugin.get_domain_usernames(target)
+        usernames.each { |u| run(plugin, u) }
+
         puts "Would remove domain: #{target}"
         puts "Would remove domain: #{target}"
+        # TODO: remove from postfixadmin as well.
       end
     end
 
       end
     end
 
-    # TODO: remove from postfixadmin as well.
   end
 
 end
   end
 
 end