ansible-role-mailserver/tasks/postfix.yml

43 lines
897 B
YAML
Raw Normal View History

2020-07-24 12:42:59 +02:00
- name: postfix - install
2020-07-20 09:46:16 +02:00
package:
state: latest
name:
- postfix
2021-10-21 16:13:08 +02:00
- postfix-pcre
2020-07-24 12:42:59 +02:00
- name: postfix - generate DH
notify: reload postfix
openssl_dhparam:
path: /etc/postfix/dh.pem
size: 4096
- name: postfix - create sql folder
notify: reload postfix
file:
path: /etc/postfix/sql
state: directory
- name: postfix - config
notify: reload postfix
template:
src: "postfix/{{ item }}"
dest: "/etc/postfix/{{ item }}"
with_items:
- main.cf
- master.cf
2021-10-21 16:13:08 +02:00
- smtp_header_checks
2020-07-24 12:42:59 +02:00
- sql/smtpd-sender-login-maps.cf
- sql/tls-policy.cf
- sql/virtual-sender-maps.cf
- sql/virtual-alias-domains.cf
- sql/virtual-alias-domains-maps.cf
- sql/virtual-alias-maps.cf
- sql/virtual-mailbox-domains.cf
- sql/virtual-mailbox-maps.cf
- name: postfix - start and enable on boot
systemd:
name: postfix
enabled: yes
state: started