Compare commits
1 Commits
e75db369f2
...
ed61026b45
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ed61026b45 |
6
roles/global_smtp_relay/handlers/main.yml
Normal file
6
roles/global_smtp_relay/handlers/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Restart postfix
|
||||
ansible.bultin.service:
|
||||
name: postfix
|
||||
state: restarted
|
||||
enable: true
|
15
roles/global_smtp_relay/tasks/main.yml
Normal file
15
roles/global_smtp_relay/tasks/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
|
||||
- name: Install postfix
|
||||
ansible.builtin.package:
|
||||
name: postfix
|
||||
state: present
|
||||
|
||||
- name: Put configuration
|
||||
ansible.builtin.template:
|
||||
src: main.cf.j2
|
||||
dest: /etc/postfix/main.cf.j2
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0o640"
|
||||
notify: Restart postfix
|
43
roles/global_smtp_relay/templates/main.cf.j2
Normal file
43
roles/global_smtp_relay/templates/main.cf.j2
Normal file
@@ -0,0 +1,43 @@
|
||||
compatibility_level = 2
|
||||
queue_directory = /var/spool/postfix
|
||||
command_directory = /usr/bin
|
||||
daemon_directory = /usr/lib/postfix/bin
|
||||
data_directory = /var/lib/postfix
|
||||
mail_owner = postfix
|
||||
myhostname = mail-relay.mateu.be
|
||||
myorigin = $myhostname
|
||||
mydestination = $myhostname, localhost.$mydomain, localhost
|
||||
unknown_local_recipient_reject_code = 550
|
||||
mynetworks = 127.0.0.0/8, [::1]/128, 82.66.135.228, 80.67.179.200
|
||||
debugger_command =
|
||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
||||
sendmail_path = /usr/bin/sendmail
|
||||
newaliases_path = /usr/bin/newaliases
|
||||
mailq_path = /usr/bin/mailq
|
||||
setgid_group = postdrop
|
||||
html_directory = no
|
||||
mailbox_size_limit = 104857600
|
||||
message_size_limit = 104857600
|
||||
manpage_directory = /usr/share/man
|
||||
sample_directory = /etc/postfix
|
||||
readme_directory = /usr/share/doc/postfix
|
||||
inet_protocols = ipv4
|
||||
meta_directory = /etc/postfix
|
||||
shlib_directory = /usr/lib/postfix
|
||||
## Référence de chiffrement TLS
|
||||
# serveur SMTP
|
||||
smtpd_tls_cert_file = /etc/x509/mail-relay.mateu.be/fullchain.cer
|
||||
smtpd_tls_key_file = /etc/x509/mail-relay.mateu.be/mail-relay.mateu.be.key
|
||||
smtpd_use_tls = yes
|
||||
smtpd_tls_auth_only = yes
|
||||
smtpd_tls_protocols = !SSLv2,!SSLv3
|
||||
smtpd_tls_loglevel = 1
|
||||
# client SMTP
|
||||
smtp_tls_CApath = /etc/ssl/certs
|
||||
smtp_tls_cert_file = /etc/x509/mail-relay.mateu.be/fullchain.cer
|
||||
smtp_tls_key_file = /etc/x509/mail-relay.mateu.be/mail-relay.mateu.be.key
|
||||
smtp_use_tls = yes
|
||||
smtp_tls_protocols = !SSLv2,!SSLv3
|
||||
smtp_tls_security_level = may
|
||||
smtp_tls_loglevel = 1
|
Reference in New Issue
Block a user