# -*- ruby -*-

security.privilege_mode = true

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