File tree Expand file tree Collapse file tree 10 files changed +34
-11
lines changed Expand file tree Collapse file tree 10 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 18
18
* ` postfix_relayport ` [ default: 587] : Relay port (on postfix_relayhost, if set)
19
19
* ` postfix_relaytls ` [ default: ` false ` ] : Use TLS when sending with a relay host
20
20
* ` postfix_sasl_user ` [ default: ` postmaster@{{ ansible_domain }} ` ] : SASL relay username
21
- * ` postfix_sasl_password ` [ default: ` k8+haga4@#pR ` ] : SASL relay password
21
+ * ` postfix_sasl_password ` [ default: ` k8+haga4@#pR ` ] : SASL relay password ** Make sure to change! **
22
22
23
23
## Dependencies
24
24
Original file line number Diff line number Diff line change 1
- ---
2
1
# defaults file for postfix
2
+ ---
3
3
postfix_install :
4
4
- postfix
5
5
- mailutils
Original file line number Diff line number Diff line change 1
- ---
2
1
# handlers file for postfix
2
+ ---
3
3
- name : restart postfix
4
4
service :
5
5
name : postfix
6
6
state : restarted
7
+
7
8
- name : new aliases
8
9
command : newaliases
10
+
11
+ - name : postmap sasl_passwd
12
+ command : postmap hash:/etc/postfix/sasl_passwd
Original file line number Diff line number Diff line change 1
- ---
2
1
# meta file for postfix
2
+ ---
3
3
galaxy_info :
4
4
author : Mischa ter Smitten
5
5
company : Oefenweb.nl B.V.
@@ -9,10 +9,13 @@ galaxy_info:
9
9
platforms :
10
10
- name : Ubuntu
11
11
versions :
12
- - all
12
+ - lucid
13
+ - precise
14
+ - trusty
13
15
- name : Debian
14
16
versions :
15
- - all
17
+ - squeeze
18
+ - wheezy
16
19
categories :
17
20
- system
18
21
- web
Original file line number Diff line number Diff line change 1
- ---
2
1
# tasks file for postfix
2
+ ---
3
3
- name : configure debconf
4
4
debconf :
5
5
name : " {{ item.name }}"
37
37
notify : restart postfix
38
38
tags : [configuration, postfix, postfix-configuration]
39
39
40
+ - name : configure sasl username/password
41
+ template :
42
+ src : etc/postfix/sasl_passwd.j2
43
+ dest : /etc/postfix/sasl_passwd
44
+ owner : root
45
+ group : root
46
+ mode : 0600
47
+ when : postfix_relayhost != false
48
+ notify :
49
+ - postmap sasl_passwd
50
+ - restart postfix
51
+ tags : [configuration, postfix, postfix-sasl-passwd]
52
+
40
53
- name : configure aliases
41
54
lineinfile :
42
55
dest : /etc/aliases
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ inet_protocols = ipv4
41
41
{% if postfix_relayhost %}
42
42
relayhost = [{{ postfix_relayhost }}]:{{ postfix_relayhost_port }}
43
43
smtp_sasl_auth_enable = yes
44
- smtp_sasl_password_maps = static:{{ postfix_sasl_user }}:{{ postfix_sasl_password }}
44
+ smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
45
45
smtp_sasl_security_options = noanonymous
46
46
{% if postfix_relaytls %}
47
47
smtp_use_tls = yes
Original file line number Diff line number Diff line change
1
+ # {{ ansible_managed }}
2
+
3
+ [{{ postfix_relayhost }}]:{{ postfix_relayhost_port }} {{ postfix_sasl_user }}:{{ postfix_sasl_password }}
Original file line number Diff line number Diff line change 1
- ---
2
1
# test file for postfix
2
+ ---
3
3
- hosts : localhost
4
4
remote_user : root
5
5
roles :
Original file line number Diff line number Diff line change 1
- ---
2
1
# test file for postfix
2
+ ---
3
3
- hosts : all
4
4
remote_user : vagrant
5
5
sudo : true
Original file line number Diff line number Diff line change 1
- ---
2
1
# vars file for postfix
2
+ ---
3
3
postfix_debconf_selections :
4
4
- name : postfix
5
5
question : postfix/main_mailer_type
You can’t perform that action at this time.
0 commit comments