summaryrefslogtreecommitdiffstats
path: root/vagrant_support/email.yml
blob: a988e240b03e40b4840a97c0b102329d11e2c2c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---

- name: install mail packages
  yum: name={{item}} state=present
  with_items: ["mutt", "postfix", "dovecot"]

- name: configure postfix
  copy:
    src: postfix/main.cf
    dest: /etc/postfix/main.cf

- name: redirect all email to vagrant user
  copy:
    src: postfix/virtual
    dest: /etc/postfix/virtual

- name: enable postfix
  service: name=postfix enabled=yes

- name: restart postfix
  service: name=postfix state=restarted

- name: configure dovecot
  template:
    src: dovecot.j2
    dest: /etc/dovecot/dovecot.conf

- name: enable dovecot
  service: name=dovecot enabled=yes

- name: restart dovecot
  service: name=dovecot state=restarted