This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-warehost/mailserver/tasks/postfix.yml

26 lines
787 B
YAML

---
- name: Configure postfix
template: src=postfix_{{item}} dest=/etc/postfix/{{item}} owner=root group=root mode=640
with_items:
- master.cf
- main.cf
notify: reload postfix
- name: Configure postfix-dbconnection
template: src=postfix_{{item}} dest=/etc/postfix/{{item}} owner=root group=postfix mode=640
with_items:
- virtual_mailbox_domains.cf
- virtual_mailbox_maps.cf
- virtual_alias_maps.cf
- virtual_sender_login_maps.cf
notify: reload postfix
- name: Generate default aliases postfix
command: postalias /etc/postfix/aliases creates=/etc/postfix/aliases.db
- name: Generate default transport postfix
command: postmap /etc/postfix/transport creates=/etc/postfix/transport.db
- name: Enable postfix
service: name=postfix state=started enabled=yes