日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

Wazuh配置电子邮件警报(SMTP)

發(fā)布時(shí)間:2023/12/13 综合教程 31 生活家
生活随笔 收集整理的這篇文章主要介紹了 Wazuh配置电子邮件警报(SMTP) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

6、Wazuh配置電子郵件警報(bào)(SMTP)

6.1、環(huán)境安裝依賴

Ubuntu

apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules

Centos

yum update && yum install postfix mailx cyrus-sasl cyrus-sasl-plain

6.2、配置postfix

在/etc/postfix/main.cf文件中配置Postfix,將以下行添加到文件末尾:

Ubuntu

relayhost = [smtp.gmail.com]:587
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/thawte_Primary_Root_CA.pem
smtp_use_tls = yes

CentOS

relayhost = [mail.qq.com]:587
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-bundle.crt
smtp_use_tls = no

6.3、 配置電子郵件地址和密碼:

echo [smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD > /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
chmod 400 /etc/postfix/sasl_passwd

6.4、 確保數(shù)據(jù)庫密碼:

chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db

6.5、 重新啟動(dòng):

systemctl reload postfix

6.6、 使用以下命令測試配置:

echo "Test mail from postfix" | mail -s "Test Postfix" -r "you@example.com" you@example.com

您應(yīng)該在收到電子郵件you@example.com。

6.7、配置Wazuh

在/var/ossec/etc/ossec.conf如下配置Wazuh :

<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>monitor@qq.com</email_from>
   <email_to>name1@qq.com</email_to>
   <email_to>name2@qq.com</email_to>
   <email_maxperhour>12</email_maxperhour>
   <email_log_source>alerts.log</email_log_source>
 </global>

總結(jié)

以上是生活随笔為你收集整理的Wazuh配置电子邮件警报(SMTP)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。