forked from evolix/ansible-roles
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
|
---
|
||
|
|
||
|
- name: slow transport is defined in master.cf
|
||
|
lineinfile:
|
||
|
dest: /etc/postfix/master.cf
|
||
|
regexp: "^slow "
|
||
|
line: "slow unix - - n - - smtp"
|
||
|
notify: reload postfix
|
||
|
tags:
|
||
|
- postfix
|
||
|
|
||
|
- name: list of providers for slow transport
|
||
|
lineinfile:
|
||
|
dest: /etc/postfix/transport
|
||
|
line: "{{ item }}"
|
||
|
create: yes
|
||
|
with_items:
|
||
|
- "orange.fr slow:"
|
||
|
- "wanadoo.fr slow:"
|
||
|
- "voila.fr slow:"
|
||
|
- "laposte slow:"
|
||
|
- "yahoo.fr slow:"
|
||
|
- "yahoo.com slow:"
|
||
|
- "hotmail.fr slow:"
|
||
|
- "hotmail.com slow:"
|
||
|
notify:
|
||
|
- postmap transport
|
||
|
- reload postfix
|
||
|
tags:
|
||
|
- postfix
|
||
|
|
||
|
# - name: main.cf is configured for slow transports
|
||
|
# lineinfile:
|
||
|
# dest: /etc/postfix/main.cf
|
||
|
# regexp: "^{{ item.key }} ="
|
||
|
# line: "{{ item.key }} = {{ item.value }}"
|
||
|
# with_items:
|
||
|
# - { key: "minimal_backoff_time", value: "2h" }
|
||
|
# - { key: "maximal_backoff_time", value: "6h" }
|
||
|
# - { key: "maximal_queue_lifetime", value: "4d" }
|
||
|
# - { key: "queue_run_delay", value: "100s" }
|
||
|
# - { key: "bounce_queue_lifetime", value: "1d" }
|
||
|
# - { key: "initial_destination_concurrency", value: "5" }
|
||
|
# - { key: "default_destination_concurrency_limit", value: "20" }
|
||
|
# - { key: "slow_destination_rate_delay", value: "0" }
|
||
|
# - { key: "slow_destination_concurrency_limit", value: "1" }
|
||
|
# - { key: "slow_destination_concurrency_failed_cohort_limit", value: "100" }
|
||
|
# - { key: "slow_destination_recipient_limit", value: "25" }
|
||
|
# - { key: "transport_maps", value: "hash:$config_directory/transport" }
|
||
|
# notify: reload postfix
|
||
|
|
||
|
- name: main.cf is configured for slow transports
|
||
|
blockinfile:
|
||
|
dest: /etc/postfix/main.cf
|
||
|
marker: "# {mark} Slow transports configuration (managed by Ansible)"
|
||
|
block: |
|
||
|
minimal_backoff_time = 2h
|
||
|
maximal_backoff_time = 6h
|
||
|
maximal_queue_lifetime = 4d
|
||
|
queue_run_delay = 100s
|
||
|
bounce_queue_lifetime = 1d
|
||
|
initial_destination_concurrency = 5
|
||
|
default_destination_concurrency_limit = 20
|
||
|
slow_destination_rate_delay = 0
|
||
|
slow_destination_concurrency_limit = 1
|
||
|
slow_destination_concurrency_failed_cohort_limit = 100
|
||
|
slow_destination_recipient_limit = 25
|
||
|
transport_maps = hash:$config_directory/transport
|
||
|
notify: reload postfix
|