Browse Source

ability to specify mailname

master
parent
commit
bef4b6b2b0
3 changed files with 9 additions and 2 deletions
  1. +2
    -0
      defaults/main.yml
  2. +6
    -0
      tasks/main.yml
  3. +1
    -2
      templates/main.cf.j2

+ 2
- 0
defaults/main.yml View File

@@ -1,2 +1,4 @@
mailname: "{{inventory_hostname}}"

postfix_postfixadmin_mysql_database: postfixadmin postfix_postfixadmin_mysql_database: postfixadmin
postfix_postfixadmin_mysql_username: postfix postfix_postfixadmin_mysql_username: postfix

+ 6
- 0
tasks/main.yml View File

@@ -13,6 +13,12 @@
dest: /etc/postfix/main.cf dest: /etc/postfix/main.cf
notify: reload postfix notify: reload postfix


- name: mailname
copy:
content: "{{mailname}}"
dest: /etc/mailname
notify: reload postfix

- include: postfixadmin.yml - include: postfixadmin.yml


- name: configuration pull directory - name: configuration pull directory


+ 1
- 2
templates/main.cf.j2 View File

@@ -1,10 +1,9 @@
# See /usr/share/postfix/main.cf.dist for a commented, more complete version # See /usr/share/postfix/main.cf.dist for a commented, more complete version



# Debian specific: Specifying a file name will cause the first # Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default # line of that file to be used as the name. The Debian default
# is /etc/mailname. # is /etc/mailname.
#myorigin = /etc/mailname
myorigin = /etc/mailname


smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no biff = no


Loading…
Cancel
Save