Browse Source

Set postfix origin to correctly deliver mail for local users

(such as root's cron errors)
Luke Cyca 11 years ago
parent
commit
5497f31fb9

+ 1
- 5
roles/mailserver/templates/etc_postfix_main.cf.j2 View File

1
 # See /usr/share/postfix/main.cf.dist for a commented, more complete version
1
 # See /usr/share/postfix/main.cf.dist for a commented, more complete version
2
 # Modified as per http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/
2
 # Modified as per http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/
3
  
3
  
4
-# Debian specific:  Specifying a file name will cause the first
5
-# line of that file to be used as the name.  The Debian default
6
-# is /etc/mailname.
7
-#myorigin = /etc/mailname
8
- 
9
 smtpd_banner = $myhostname ESMTP $mail_name
4
 smtpd_banner = $myhostname ESMTP $mail_name
10
 biff = no
5
 biff = no
11
  
6
  
80
 # information on enabling SSL in the smtp client.
75
 # information on enabling SSL in the smtp client.
81
  
76
  
82
 myhostname = {{ mail_server_hostname }}
77
 myhostname = {{ mail_server_hostname }}
78
+myorigin = $mydomain
83
 alias_maps = hash:/etc/aliases
79
 alias_maps = hash:/etc/aliases
84
 alias_database = hash:/etc/aliases
80
 alias_database = hash:/etc/aliases
85
 mydestination = localhost
81
 mydestination = localhost

+ 3
- 0
roles/mailserver/vars/main.yml View File

18
     password_hash: TODO@TODO.com
18
     password_hash: TODO@TODO.com
19
     domain_pk_id: 2
19
     domain_pk_id: 2
20
 mail_virtual_aliases:
20
 mail_virtual_aliases:
21
+  - source: root@TODO.com
22
+    destination: TODO@TODO.com
23
+    domain_pk_id: 1
21
   - source: postmaster@TODO.com
24
   - source: postmaster@TODO.com
22
     destination: TODO@TODO.com
25
     destination: TODO@TODO.com
23
     domain_pk_id: 1
26
     domain_pk_id: 1

Loading…
Cancel
Save