<commit_before>---
- name: install postfix
  apt: pkg={{ item }} state=latest
  with_items: ossec_postfix_dependencies

- name: ensure postfix /etc/aliases is present and configured for ossec
  copy:
    src: aliases
    dest: /etc/aliases
  notify: update aliases

- name: configure sasl password for smtp relay
  template:
    src: sasl_passwd
    dest: /etc/postfix/sasl_passwd
    mode: 0400
  notify: update sasl_passwd db

- name: ensure header_checks regex to strip smtp headers is present
  copy:
    src: header_checks
    dest: /etc/postfix/header_checks
  notify: postmap_header_checks

- name: configure postfix main.cf
  template:
    src: main.cf
    dest: /etc/postfix/main.cf
  notify: restart postfix

# TODO - name: configure postfix proxy
<commit_msg>adds tags "apt", "postfix", "permissions", and "hardening" to postfix setup tasks<commit_after>---
- name: install postfix
  apt: pkg={{ item }} state=latest
  with_items: ossec_postfix_dependencies
  tags:
    - apt
    - postfix

- name: ensure postfix /etc/aliases is present and configured for ossec
  copy:
    src: aliases
    dest: /etc/aliases
  notify: update aliases
  tags:
    - postfix

- name: configure sasl password for smtp relay
  template:
    src: sasl_passwd
    dest: /etc/postfix/sasl_passwd
    mode: 0400
  notify: update sasl_passwd db
  tags:
    - postfix
    - permissions

- name: ensure header_checks regex to strip smtp headers is present
  copy:
    src: header_checks
    dest: /etc/postfix/header_checks
  notify: postmap_header_checks
  tags:
    - postfix
    - hardening

- name: configure postfix main.cf
  template:
    src: main.cf
    dest: /etc/postfix/main.cf
  notify: restart postfix
  tags:
    - postfix

# TODO - name: configure postfix proxy

{'fraction_non_alphanumeric': 0.08172531214528944, 'fraction_numerical': 0.004540295119182747, 'mean_word_length': 3.1, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2655935', 'n_tokens_mistral': 606, 'n_tokens_neox': 589, 'n_words': 183}