Fixes
This commit is contained in:
parent
4e098544be
commit
f32891c328
5 changed files with 11 additions and 6 deletions
|
@ -29,7 +29,7 @@
|
||||||
tags: tls-helper
|
tags: tls-helper
|
||||||
|
|
||||||
- name: MTA-STS
|
- name: MTA-STS
|
||||||
ansible.builtin.import_tasks: mta-sts.yml
|
ansible.builtin.include_tasks: mta-sts.yml
|
||||||
tags: mta-sts
|
tags: mta-sts
|
||||||
loop: "{{ postfix_domains }}"
|
loop: "{{ postfix_domains }}"
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,16 @@
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/dehydrated/domains.txt
|
path: /etc/dehydrated/domains.txt
|
||||||
line: "mta-sts.{{ item.name }}"
|
line: "mta-sts.{{ item.name }}"
|
||||||
when: "'dehydrated' in ansible_facts.packages and item.mta-sts is defined and item.mta-sts"
|
when: "'dehydrated' in ansible_facts.packages and item.mta_sts is defined and item.mta_sts"
|
||||||
loop: "{{ postfix_domains }}"
|
loop: "{{ postfix_domains }}"
|
||||||
notify: Get certificate
|
notify: Get certificate
|
||||||
|
|
||||||
- name: "MTA-STS | Copy Nginx configuration"
|
- name: "MTA-STS | Copy Nginx configuration"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: nginx/nginx-mta-sts.j2
|
src: nginx/mta-sts.j2
|
||||||
dest: "/etc/nginx/sites-available/mta-sts.{{ item.name }}"
|
dest: "/etc/nginx/sites-available/mta-sts.{{ item.name }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when: item.mta-sts is defined and item.mta-sts
|
when: item.mta_sts is defined and item.mta_sts
|
||||||
loop: "{{ postfix_domains }}"
|
loop: "{{ postfix_domains }}"
|
||||||
|
|
||||||
- name: "MTA-STS | Enable Nginx configuration"
|
- name: "MTA-STS | Enable Nginx configuration"
|
||||||
|
@ -26,6 +26,6 @@
|
||||||
src: "/etc/nginx/sites-available/mta-sts.{{ item.name }}"
|
src: "/etc/nginx/sites-available/mta-sts.{{ item.name }}"
|
||||||
dest: "/etc/nginx/sites-enabled/mta-sts.{{ item.name }}"
|
dest: "/etc/nginx/sites-enabled/mta-sts.{{ item.name }}"
|
||||||
state: link
|
state: link
|
||||||
when: item.mta-sts is defined and item.mta-sts
|
when: item.mta_sts is defined and item.mta_sts
|
||||||
loop: "{{ postfix_domains }}"
|
loop: "{{ postfix_domains }}"
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "postmap {{ postfix_default_db_type }}:{{ tls_helper_domains_file }}"
|
cmd: "postmap {{ postfix_default_db_type }}:{{ tls_helper_domains_file }}"
|
||||||
chdir: "{{ tls_helper_postfix_dir }}"
|
chdir: "{{ tls_helper_postfix_dir }}"
|
||||||
|
creates: "{{ tls_helper_postfix_dir }}/{{ tls_helper_domains_file }}.{{ postfix_default_db_type }}"
|
||||||
|
|
||||||
- name: "TLS-helper | Link files"
|
- name: "TLS-helper | Link files"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
{% if domain.comment is defined %}
|
{% if domain.comment is defined %}
|
||||||
# {{ domain.comment }}
|
# {{ domain.comment }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if domain.relay_host is defined %}
|
||||||
{{ "%-50s %s" | format(domain.name, domain.relay_host) }}
|
{{ "%-50s %s" | format(domain.name, domain.relay_host) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -135,7 +135,7 @@ smtp_sasl_security_options = noanonymous
|
||||||
#### Postscreen
|
#### Postscreen
|
||||||
postscreen_access_list =
|
postscreen_access_list =
|
||||||
permit_mynetworks
|
permit_mynetworks
|
||||||
cidr:{{ postfix_conf_dir }}/postscreen_access.cidr
|
cidr:{{ postfix_conf_dir }}/postscreen_access
|
||||||
postscreen_blacklist_action = drop
|
postscreen_blacklist_action = drop
|
||||||
|
|
||||||
# Pregreeting
|
# Pregreeting
|
||||||
|
@ -240,7 +240,9 @@ smtpd_data_restrictions =
|
||||||
|
|
||||||
### Connection limits
|
### Connection limits
|
||||||
smtpd_client_connection_rate_limit = 100
|
smtpd_client_connection_rate_limit = 100
|
||||||
|
{% if postfix_smtpd_client_event_limit_exceptions is defined %}
|
||||||
smtpd_client_event_limit_exceptions = {{ postfix_smtpd_client_event_limit_exceptions | join(', ') }}
|
smtpd_client_event_limit_exceptions = {{ postfix_smtpd_client_event_limit_exceptions | join(', ') }}
|
||||||
|
{% endif %}
|
||||||
smtpd_client_message_rate_limit = 25
|
smtpd_client_message_rate_limit = 25
|
||||||
smtpd_client_new_tls_session_rate_limit = 100
|
smtpd_client_new_tls_session_rate_limit = 100
|
||||||
smtpd_client_auth_rate_limit = 100
|
smtpd_client_auth_rate_limit = 100
|
||||||
|
|
Loading…
Reference in a new issue