# -*- ruby -*-

define_applicable_condition("Authenticated") do |condition|
  condition.description = "Apply a milter only when sender is authorized"

  condition.define_envelope_from_stopper do |context, from|
    not context.authenticated?
  end
end

define_applicable_condition("Unauthenticated") do |condition|
  condition.description = "Apply a milter only when sender is not authorized"

  condition.define_envelope_from_stopper do |context, from|
    context.authenticated?
  end
end
