6. 条件を絞ってmilterを当てる条件を絞ってmilterを当てる例)特定のSASLユーザ名のみチェックを掛ける
defile_milter("viruscheck-milter") do |milter|
milter.connection_spec = "inet:8025@localhost" # ウイルスチェック⽤milter
milter.add_applicable_condition("sasl-username-check")
end
define_applicable_condition("sasl-username-check") do |condition|
condition.define_envelope_from_stopper do |context, from|
if context.authenticated? and context["auth_authen"] == "testuser" th
false
else
true
end
end
end
auth名取得のためにpost x側の設定も必要
true/false 返す場合に、milter掛けるほうがfalse であると
ころに注意