Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
- ---
- - name: define Postfix virtual mailbox domain mapping
- template:
- src: "{{item}}.j2"
- dest: "/etc/postfix/{{item}}"
- mode: 0640
- notify: restart postfix
- with_items:
- - mysql-virtual-mailbox-domains.cf
- - mysql-virtual-mailbox-maps.cf
- - mysql-virtual-alias-maps.cf
- - mysql-email2email.cf
-
- - name: copy master.cf to enable submission service
- copy:
- src: master.cf
- dest: /etc/postfix/master.cf
- mode: 0644
- notify: restart postfix
-
- - name: tell Postfix to use the virtual mailbox domain mapping
- command: postconf virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
-
- - name: define Postfix virtual mailbox mapping
- template: src=mysql-virtual-mailbox-maps.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-maps.cf
- notify: restart postfix
- - name: tell Postfix to use the virtual mailbox mapping
- command: postconf virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
-
- - name: define Postfix virtual alias mapping
- template: src=mysql-virtual-alias-maps.cf.j2 dest=/etc/postfix/mysql-virtual-alias-maps.cf
- notify: restart postfix
- - name: tell Postfix to use the virtual alias mapping
- command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf
-
- - name: define Postfix email-to-email mapping (required for catchall domains)
- template: src=mysql-email2email.cf.j2 dest=/etc/postfix/mysql-email2email.cf
- notify: restart postfix
- - name: tell Postfix to use the email-to-email mapping
- command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
-
- - name: Restricting access to database mapping files that contain a password
- file: path=/etc/postfix/mysql-{{item}}.cf mode=0640
- with_items:
- - virtual-mailbox-domains
- - virtual-mailbox-maps
- - virtual-alias-maps
-
- - name: Make Postfix use LMTP to send emails to Dovecot
- command: postconf virtual_transport=lmtp:unix:private/dovecot-lmtp
-
- - name: Setting SMTP authentication type to dovecot
- command: postconf smtpd_sasl_type=dovecot
-
- - name: Setting SMTP authentication path/socket
- command: postconf smtpd_sasl_path=private/auth
-
- - name: Enabling SMTP authentication
- command: postconf smtpd_sasl_auth_enable=yes
-
- - name: Setting SMTP encryption security level
- command: postconf smtpd_tls_security_level=may
-
- - name: Setting SMTP encryption security level
- command: postconf smtpd_tls_security_level=may
-
- - name: Enforce SMTP encryption
- command: postconf smtpd_tls_auth_only=yes
-
- - name: Set TLS encryption certificate
- command: postconf smtpd_tls_cert_file=/etc/ssl/certs/mailserver.pem
-
- - name: Set TLS encryption key
- command: postconf smtpd_tls_key_file=/etc/ssl/private/mailserver.pem
-
- - name: Allow emails up to 40 MB large
- command: postconf message_size_limit=41943040
-
- - name: Make Postfix listen on all interfaces
- command: postconf inet_interfaces=all
-
- - name: Enable user quota checking
- command: "postconf 'smtpd_recipient_restrictions = reject_unauth_destination check_policy_service unix:private/quota-status'"
|