Hi dear wazuh community,
I have configured SMTP server using postfix as relay. My configuration and logs files are give below.
Configuration in
/etc/postfix/main.cf`myhostname = d-svr-waz-wm
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, wazuh.cluster, localhost, localhost.localdomain, localhost
relayhost =
smtp.mxthunder.net:587smpt_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`
Step 3: Configure the email address and password:
But second step in step no. 3 is as follows.
postmap /etc/postfix/sasl_passwd # This shows error as bash: postmap: command not found
Configuration in /var/ossec/etc/ossec.conf
<ossec_config>
<global>
<jsonout_output>yes</jsonout_output>
<alerts_log>yes</alerts_log>
<logall>no</logall>
<logall_json>no</logall_json>
<email_notification>yes</email_notification>
<smtp_server>localhost</smtp_server>
<email_from>
hafiznas...@gmail.com</email_from>
<email_to>
hafiznas...@gmail.com</email_to>
<email_maxperhour>12</email_maxperhour>
<email_log_source>alerts.log</email_log_source>
<agents_disconnection_time>10m</agents_disconnection_time>
<agents_disconnection_alert_time>0</agents_disconnection_alert_time>
</global>
Apr 28 08:50:52 d-svr-waz-wm postfix/cleanup[16661]: 359E4441068: message-id=<20220428155052.359E4441068@d-svr-waz-wm>
Apr 28 08:50:52 d-svr-waz-wm postfix/qmgr[12121]: 359E4441068: from=<
hafiznas...@gmail.com>, size=371, nrcpt=1 (queue active)
Apr 28 08:50:52 d-svr-waz-wm postfix/smtp[16663]: 359E4441068: to=<
hafiznas...@gmail.com>, relay=
smtp.mxthunder.net[108.60.195.205]:587, delay=0.61, delays=0.03/0.02/0.5/0.05, dsn=5.7.1, status=bounced (host
smtp.mxthunder.net[108.60.195.205] said: 530 5.7.1 Authentication required (in reply to MAIL FROM command))
Apr 28 08:50:52 d-svr-waz-wm postfix/cleanup[16661]: D6877441069: message-id=<20220428155052.D6877441069@d-svr-waz-wm>
Apr 28 08:50:52 d-svr-waz-wm postfix/bounce[16664]: 359E4441068: sender non-delivery notification: D6877441069
Apr 28 08:50:52 d-svr-waz-wm postfix/qmgr[12121]: D6877441069: from=<>, size=2393, nrcpt=1 (queue active)
Apr 28 08:50:52 d-svr-waz-wm postfix/qmgr[12121]: 359E4441068: removed
Apr 28 08:50:53 d-svr-waz-wm postfix/smtp[16663]: D6877441069: to=<
hafiznas...@gmail.com>, relay=
smtp.mxthunder.net[108.60.195.205]:587, delay=0.57, delays=0/0/0.51/0.05, dsn=5.7.1, status=bounced (host
smtp.mxthunder.net[108.60.195.205] said: 530 5.7.1 Authentication required (in reply to MAIL FROM command))
Apr 28 08:50:53 d-svr-waz-wm postfix/qmgr[12121]: D6877441069: removed`
Logs in /var/log/mail.log
Apr 28 08:50:52 d-svr-waz-wm postfix/cleanup[16661]: 359E4441068: message-id=<20220428155052.359E4441068@d-svr-waz-wm>
Apr 28 08:50:52 d-svr-waz-wm postfix/qmgr[12121]: 359E4441068: from=<
hafiznas...@gmail.com>, size=371, nrcpt=1 (queue active)
Apr 28 08:50:52 d-svr-waz-wm postfix/smtp[16663]: 359E4441068: to=<
hafiznas...@gmail.com>, relay=
smtp.mxthunder.net[108.60.195.205]:587, delay=0.61, delays=0.03/0.02/0.5/0.05, dsn=5.7.1, status=bounced (host
smtp.mxthunder.net[108.60.195.205] said: 530 5.7.1 Authentication required (in reply to MAIL FROM command))
Apr 28 08:50:52 d-svr-waz-wm postfix/cleanup[16661]: D6877441069: message-id=<20220428155052.D6877441069@d-svr-waz-wm>
Apr 28 08:50:52 d-svr-waz-wm postfix/bounce[16664]: 359E4441068: sender non-delivery notification: D6877441069
Apr 28 08:50:52 d-svr-waz-wm postfix/qmgr[12121]: D6877441069: from=<>, size=2393, nrcpt=1 (queue active)
Apr 28 08:50:52 d-svr-waz-wm postfix/qmgr[12121]: 359E4441068: removed
Apr 28 08:50:53 d-svr-waz-wm postfix/smtp[16663]: D6877441069: to=<
hafiznas...@gmail.com>, relay=
smtp.mxthunder.net[108.60.195.205]:587, delay=0.57, delays=0/0/0.51/0.05, dsn=5.7.1, status=bounced (host
smtp.mxthunder.net[108.60.195.205] said: 530 5.7.1 Authentication required (in reply to MAIL FROM command))
Apr 28 08:50:53 d-svr-waz-wm postfix/qmgr[12121]: D6877441069: removed
`
Please let me know of you want anything else from my side. Thanks!