1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/postfix/tasks/main.yml
Kristian Klausen d054afa9c6
postfix: Remove obsolete "Remove old files" task
This was added more than 7 years ago[1] and has not been relevant for a
long time.

[1] d32ce421 ("postfix: Remove compat_maps")
2024-12-25 19:06:45 +01:00

56 lines
1.6 KiB
YAML

- name: Install postfix
pacman: name=postfix,postfix-pcre state=present
- name: Install template configs
template: src={{ item }}.j2 dest=/etc/postfix/{{ item }} owner=root group=root mode=0644
loop:
- main.cf
- master.cf
- transport.pcre
- aliases
notify:
- Restart postfix
- Postmap additional files
- Update aliases db
- name: Install additional files
copy: src={{ item }} dest=/etc/postfix/{{ item }} owner=root group=root mode=0644
loop:
- domains
- msa_header_checks
notify:
- Postmap additional files
- name: Create ssl cert
include_role:
name: certificate
vars:
domains: ["{{ mail_domain }}"]
- name: Install postfix cert renewal hook
template: src=letsencrypt.hook.d.j2 dest=/etc/letsencrypt/hook.d/postfix owner=root group=root mode=0755
- name: Install bouncehandler config
template: src=wiki-bouncehandler.conf.j2 dest={{ postfix_wiki_bounce_config }} owner={{ postfix_wiki_bounce_user }} group=root mode=0600
- name: Install packages for bounce handler
pacman: name=perl-mediawiki-api,perl-config-simple state=present
- name: Install bouncehandler script
copy: src=bouncehandler.pl dest={{ postfix_wiki_bounce_mail_handler }} owner=root group=root mode=0755
- name: Make bouncehandler user
user: name={{ postfix_wiki_bounce_user }} shell=/bin/false skeleton=/var/empty state=present
- name: Start and enable postfix
service: name=postfix enabled=yes state=started
- name: Open firewall holes
ansible.posix.firewalld: service={{ item }} permanent=true state=enabled immediate=yes
loop:
- smtp
- smtps
when: configure_firewall
tags:
- firewall