Просмотр исходного кода

Merge pull request #580 from ChristianLempa/554-enhance-and-harden-wazuh-compose-template

fix for 554
Christoph Schug 1 год назад
Родитель
Сommit
65bcc116fc

+ 1 - 1
docker-compose/wazuh/compose.yaml

@@ -136,7 +136,7 @@ services:
   #     - POSTFIX_myhostname=postfix
   #   volumes:
   #     - ./config/postfix-relay/main.cf:/etc/postfix/main.cf:ro
-  #     - ./config/postfix-relay/sasl_passwd:/etc/postfix/sasl_passwd:rw
+  #     - ./config/postfix-relay/sasl_passwd:/etc/postfix/sasl_passwd:rw  # <-- (Optional) Remove when using inline credentials
   #     - postfix_data:/etc/postfix
   #   networks:
   #     - backend

+ 7 - 4
docker-compose/wazuh/config/postfix-relay/main.cf

@@ -1,12 +1,15 @@
-relayhost = [your-smtp-server-url]:587  ; Replace [your-smtp-server-url] with your SMTP server URL
+relayhost = [your-smtp-server-addr]:587  ; Replace [your-smtp-server-addr] with your SMTP server address
 smtp_sasl_auth_enable = yes
-smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
 smtp_sasl_security_options = noanonymous
 smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
 smtp_use_tls = yes
-smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
+smtpd_relay_restrictions = permit_mynetworks
 mydestination = localhost
 myhostname = postfix
-mynetworks = 0.0.0.0/0
+mynetworks = 127.0.0.0/8, 172.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, [::1]/128
 smtp_tls_security_level = may
 smtpd_tls_security_level = none
+smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd  # <-- (Optional) Remove when using inline credentials
+# --> (Optional) When using inline credentials, uncomment the following line and replace the placeholders with your SMTP server address and credentials
+# smtp_sasl_password_maps = inline:{ [your-smtp-server-addr]:587=username:password }  # <-- Replace [your-smtp-server-addr] with your SMTP server address, and username:password with your SMTP server credentials
+# <--

+ 1 - 1
docker-compose/wazuh/config/postfix-relay/sasl_passwd

@@ -1 +1 @@
-[your-smtp-server-url]:587  username:password  ; Replace [your-smtp-server-url] with your SMTP server URL, and username:password with your SMTP server credentials
+[your-smtp-server-addr]:587  username:password  ; Replace [your-smtp-server-addr] with your SMTP server address, and username:password with your SMTP server credentials