# -*- ruby -*-

security.privilege_mode = true

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