version: 1
rule_groups:
- name: Sample
  rules:
  - priority: 100
    name: すべてのファイルがパスワード保護されていた場合は 10 分保留
    action:
      type: suspend
      attribute:
        auto_release: true
        duration: 10m
    predicate: and
    predicates:
    - target: attachment
      predicate: all-password-protected-data
      pattern: ""
      count: 0
  - priority: 110
    name: いずれかのファイルがパスワード保護されていた場合は削除
    action:
      type: delete
      attribute: {}
      notifies:
      - type: notify_sender
    predicate: and
    predicates:
    - target: attachment
      predicate: has-password-protected-data
      pattern: ""
      count: 0
  - priority: 120
    name: ZIP が添付されていた場合は削除
    action:
      type: delete
      attribute: {}
      notifies:
      - type: notify_sender
    predicate: and
    predicates:
    - target: attachment
      predicate: filename-match
      pattern: \.zip$
      count: 1
  - priority: 130
    name: メール件名に【ZIP】がある場合は ZIP 暗号化して 10 分保留
    action:
      type: suspend
      attribute:
        auto_release: true
        duration: 10m
      encrypt: true
    predicate: and
    predicates:
    - target: header:subject
      predicate: match
      pattern: 【ZIP】
      count: 1
  - priority: 140
    name: メール件名に【HSD】がある場合は HENNGE Secure Download で URL 化して 10 分保留
    action:
      type: suspend
      attribute:
        auto_release: true
        duration: 10m
      secure_transfer: true
    predicate: and
    predicates:
    - target: header:subject
      predicate: match
      pattern: 【HSD】
      count: 1
  - priority: 150
    name: HENNGE Secure Download for Box で URL 化して 10 分保留
    action:
      type: suspend
      attribute:
        auto_release: true
        duration: 10m
      box_upload: true
    predicate: all