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