# -*- ruby -*-

security.privilege_mode = true

candidates = [
              ["milter-greylist",
               ["Sendmail Compatible", "Stress Notify", "Trust",
                "Remote Network", "S25R", "Unauthenticated"]
              ],
              ["clamav-milter", []],
              ["enma",
               ["Remote Network", "Unauthenticated", "No Stress"]],
              ["spamass-milter",
               ["Remote Network", "Unauthenticated", "No Stress"]],
              ["amavisd", []],
              ["opendkim", []],
             ]
candidates.each do |candidate, conditions, spec_detector|
  detector = RedHatDetector.new(configuration, candidate, &spec_detector)
  detector.detect
  detector.apply(self) do |milter|
    milter.applicable_conditions = conditions
  end
end
