Browse Source

Set postfix origin to correctly deliver mail for local users

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

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

@@ -1,11 +1,6 @@
1 1
 # See /usr/share/postfix/main.cf.dist for a commented, more complete version
2 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 4
 smtpd_banner = $myhostname ESMTP $mail_name
10 5
 biff = no
11 6
  
@@ -80,6 +75,7 @@ smtpd_recipient_restrictions =
80 75
 # information on enabling SSL in the smtp client.
81 76
  
82 77
 myhostname = {{ mail_server_hostname }}
78
+myorigin = $mydomain
83 79
 alias_maps = hash:/etc/aliases
84 80
 alias_database = hash:/etc/aliases
85 81
 mydestination = localhost

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

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

Loading…
Cancel
Save