# -*- ruby -*-

security.privilege_mode = true

candidates = [
  [
    "milter-greylist",
    [
      "Sendmail Compatible",
      "Stress Notify",
      "Trust",
      "Remote Network",
      "S25R",
      "Unauthenticated",
    ],
  ],
  ["mimedefang", []],
  [
    "enma",
    [
      "Remote Network",
      "Unauthenticated",
      "No Stress",
    ],
  ],
  ["dk-milter", []],
  ["dkim-filter", []],
  [
    "spamass-milter",
    [
      "Remote Network",
      "Unauthenticated",
      "No Stress",
    ],
  ],
  ["amavismilter", []],
  [
    "milter-regex",
    [
      "Remote Network",
      "Unauthenticated",
      "No Stress",
    ],
  ],
]
candidates.each do |candidate, conditions, spec_detector|
  detector = PkgsrcRCDetector.new(configuration, candidate, &spec_detector)
  detector.detect
  detector.apply(self) do |milter|
    milter.applicable_conditions = conditions
  end
end
