暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

postfix.yml 1.3KB

123456789101112131415161718192021222324252627
  1. - name: Install Postfix and related packages
  2. apt: pkg=$item state=installed
  3. with_items:
  4. - postfix
  5. - mysql-server
  6. - postfix-mysql
  7. - python-mysqldb
  8. - libsasl2-modules
  9. - sasl2-bin
  10. - postgrey
  11. - name: Create database user for mail server
  12. mysql_user: user={{ mail_mysql_username }} password={{ mail_mysql_password }} state=present priv="mailserver.*:ALL"
  13. - name: Create database for mail server
  14. mysql_db: name={{ mail_mysql_database }} state=present
  15. # i don't know why this import is failing but it is, so did this manually
  16. # mysql_db: name={{ mail_mysql_database }} state=import target=templates/mailserver.sql.j2
  17. - name: Copy Postfix config files into place
  18. template: src=etc_postfix_main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root
  19. - copy: src=etc_postfix_master.cf dest=/etc/postfix/master.cf owner=root group=root
  20. - template: src=etc_postfix_mysql-virtual-mailbox-domains.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-domains.cf owner=root group=root
  21. - template: src=etc_postfix_mysql-virtual-mailbox-maps.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-maps.cf owner=root group=root
  22. - template: src=etc_postfix_mysql-virtual-alias-maps.cf.j2 dest=/etc/postfix/mysql-virtual-alias-maps.cf owner=root group=root
  23. notify: restart postfix