Install postfix on mailman3 vm

certbot_on_virtu
Alexandre Iooss 2020-07-12 23:15:52 +02:00
parent ed40b871dc
commit e48a440b7e
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
5 changed files with 44 additions and 1 deletions

View File

@ -6,7 +6,7 @@
# All other servers uses nullmailer to send local mail to Crans SMTP.
# Redirect local mail to mailserver
- hosts: crans_server,!redisdead.adm.crans.org,!soyouz.adm.crans.org,!titanic.adm.crans.org,!boeing.adm.crans.org,!sputnik.adm.crans.org,!zamok.adm.crans.org
- hosts: crans_server,!redisdead.adm.crans.org,!soyouz.adm.crans.org,!titanic.adm.crans.org,!boeing.adm.crans.org,!sputnik.adm.crans.org,!zamok.adm.crans.org,!mailman.adm.crans.org
vars:
mail_root: root@crans.org
mail_snmp_server: smtp.adm.crans.org

View File

@ -35,3 +35,4 @@
web_domain: "mailman.crans.org"
roles:
- mailman3
- postfix-mailman3

View File

@ -0,0 +1,5 @@
---
- name: Restart postfix
service:
name: postfix
state: restarted

View File

@ -0,0 +1,34 @@
---
- name: Install postfix
apt:
update_cache: true
name:
- postfix
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Deploy postfix configuration
template:
src: "postfix/{{ item }}.j2"
dest: "/etc/postfix/{{ item }}"
mode: 0644
owner: root
group: root
loop: []
# - main.cf
# - master.cf
# - transport
# - mime_header_checks
# - recipient_access
# - sender_login_maps
# - postscreen_access.cidr
# - sasl/smtpd.conf
# - client_checks
notify: Restart postfix
- name: Indicate role in motd
template:
src: update-motd.d/05-postfix-mailman.j2
dest: /etc/update-motd.d/05-postfix-mailman
mode: 0755

View File

@ -0,0 +1,3 @@
#!/usr/bin/tail +14
{{ ansible_header | comment }}
> Postfix pour Mailman3 a été déployé sur cette machine. Voir /etc/postfix/.