configure postfix as mta
This commit is contained in:
parent
37486a5824
commit
c8c5b386a4
2 changed files with 14 additions and 1 deletions
9
tasks/configure_postfix_mta.yml
Normal file
9
tasks/configure_postfix_mta.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: Add transport for configured domains
|
||||
community.mysql.mysql_query:
|
||||
login_db: "{{ dbmail_db_name }}"
|
||||
query: "INSERT INTO transport (domain, transport) VALUES ('{{ item }}', 'dbmail-lmtp:localhost:{{ dbmail_configuration['LMTP']['port'] }}')"
|
||||
single_transaction: yes
|
||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||
ignore_errors: true
|
||||
loop: "{{ dbmail_domains }}"
|
|
@ -20,4 +20,8 @@
|
|||
when: dbmail_configuration['POP']['tls_port'] > 0 or dbmail_configuration['IMAP']['tls_port'] > 0 or dbmail_configuration['SIEVE']['tls_port'] > 0
|
||||
|
||||
- name: Ensure user's are configured in dbmail
|
||||
include_tasks: configure_dbmail_users.yml
|
||||
include_tasks: configure_dbmail_users.yml
|
||||
|
||||
- name: Configure MTA service - postfix
|
||||
include_tasks: configure_postfix_mta.yml
|
||||
when: mta_service == postfix
|
Loading…
Reference in a new issue