Hi Team,
We are using Wazuh 4.3.10 version with a Elastic Stack basic license version.
A very strange thing is happening, whenever I try to change <email_from> in ossec .conf and restart wazuh manager, the email notification stops working.
And when I change back to the previous <email_from> in ossec.conf and restart wazuh manager, the email notification starts working.
Totally strange!!! do we need to change <email_from> anywhere else apart from ossec.conf?
Cant see any error logs related to mailid...
BR
//Prachi
Hi Stuti,
Thank you for a quick reply.
Yes , have read all these documentation during weekend, we have separate SMTP server so that is perfectly fine..the thing is in ossec.conf , just changing the <email_from> from servername.domain to servername@domain and email notifications have stopped☹
If I change back to servername.domain, the email notification starts coming..
<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>relay server</smtp_server>
<email_from>servername@domain</email_from>
<email_to>abc</email_to>
<email_maxperhour>12</email_maxperhour>
<email_log_source>alerts.log</email_log_source>
</global>
If I do cat /var/ossec/logs/ossec.log | grep -i -E "error|warn"

Also in var/log/ , the maillog is empty

Literally now am I so curious that such a small change of <email_from> have stopped the emails , why!! Is there any process stuck?
BR
//Prachi
--
You received this message because you are subscribed to the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
wazuh+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/wazuh/fcbd2913-fa95-4025-b08b-9168dfb29506n%40googlegroups.com.
Hi Stuti and Team,
Below are my findings, from last 1 week I am literally scratching my head, Please help me Stuti and team☹
If anyone else has any idea in the group , please respond!!!
Name of Wazuh server : wazuh.domainname
Name of SMTP server: mailhost.domainname
We are been using <email_from> from last 3 years as wazuh.domainname and are getting emails with no issues. Since last week I just changed it to wazuh@domainname( just added @)and emails stopped coming. Now if I put anything in <email_from> without @ the emails are fired but as soon as I add @ in <email_from) the emails stop coming. It seems the problem is not with smtp server, the problem is with appending @ in <email_from> and the emails are stopped
relayhost = [mailhost.domainname]:25
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 = yes
echo [mailhost.domainname]:25 wazuh@domainname> /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
chmod 400 /etc/postfix/sasl_passwd
Still not getting emails from Wazuh
,

BR
//Prachi
As you can see the : ERROR: date or location not NULl this error and have found a possible solution. Let’s try modifying the following line in the ossec.conf file:
<email_log_source>alerts.log</email_log_source>to:
<email_log_source>alerts.json</email_log_source>After this change has been made, we will restart:
service wazuh-manager restartIf the error persists after changing the alerts to .json format, try removing that line from the configuration.
This error should be fixed in the latest versions of Wazuh, I hope this solves the problem, otherwise I look forward to your response to further investigate the error knowing the version of Wazuh you use.
More information:
Hi Stuti and team,
Last week only we upgraded Wazuh from 4.3.10 to 4.5.3.
Also have gone through all the links which you have shared in the trail email last week itself and tried out changing alerts.log to alerts .json but nothing worked.
Just now I removed this line from the configuration but still not getting emails if we append @ in <email_from> , and also mailog came into picture when postfix was installed, before that there was no maillog ..it is only mail directory in var/log.
At the moment , I stopped postfix and changed the <email_from> to testmail.com and immediately the email is fired , I am 99% sure its nothing with the postfix or the smtp server otherwise the email would not have come..
Attached the email from testmail.com.
We are using VM ( Centos 8 Stream) and on that Wazuh is installed

Please let me know what logs you need for investigation.
BR
//Prachi
From: 'Stuti Gupta' via Wazuh | Mailing List <wa...@googlegroups.com>
Sent: 20 October 2023 12:13
To: Wazuh | Mailing List <wa...@googlegroups.com>
Subject: Re: <email from> in ossec.conf
Hi Prachi,
Thank you for reaching out to us. We understand that you are experiencing issues with email notifications when changing the <email_from> parameter in the ossec.conf file.
To troubleshoot this issue, we recommend checking the following:
1. Verify that the SMTP server configuration is correct in the ossec.conf file. Ensure that the <smtp_server> parameter is set to the correct relay server.
2. Ensure that the maillog file (/var/log/maillog) is not empty. If it is empty, there might be an issue with the email server or the email delivery process.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/ee3688f0-a994-43c3-a4c6-aac80cae3f11n%40googlegroups.com.
Hi Stuti/Mauro/Sandra,
Sorry to bother you all, but hope you try to understand my problem and as I have worked with Mauro and Sandra so curious to know their insights.
We have Centos 8 Stream VM ,on which we have installed Wazuh with basic elastic search licence 4.5.3 version.
Problem Statement :
Name of Wazuh server : wazuh.domainname
Name of SMTP server: mailhost.domainname
We are been using <email_from> from last 3 years as wazuh.access.domainname and are getting emails with no issues. Since last week I just changed it to wa...@access.domainname( just added @)and emails stopped coming. Now if I give anything in <email_from> without @ the emails are fired but as soon as I add @ in <email_from>the emails stop coming. It seems the problem is with appending @ in <email_from> and the emails are stopped. Both Wazuh and SMTP are in same domain and network as well.
Investigation :
cat alerts.json | grep ‘“mail”:true’ , the event will come but email wont be fired , provided ( <email_from> : wa...@access.domainname)
The email would be fired only if I give <email_from>: wazuh.access.domainname / or anything without @


Oct 23 04:36:53 sekaissecdetection kernel: aex-pluginmanag[107708]: segfault at 8 ip 00007fe1def7d3b1 sp 00007fe1dfcc9470 error 4 in libaps.so.1.0[7fe1deef2000+140000]
Oct 23 04:36:58 sekaissecdetection kernel: aex-pluginmanag[107840]: segfault at 8 ip 00007fe66d9e73b1 sp 00007fe66e733470 error 4 in libaps.so.1.0[7fe66d95c000+140000]
Oct 23 04:37:03 sekaissecdetection kernel: aex-pluginmanag[107852]: segfault at 8 ip 00007fb3e10133b1 sp 00007fb3e1d5f470 error 4 in libaps.so.1.0[7fb3e0f88000+140000]
Oct 23 04:37:08 sekaissecdetection kernel: aex-pluginmanag[107864]: segfault at 8 ip 00007f21d6b663b1 sp 00007f21d78b2470 error 4 in libaps.so.1.0[7f21d6adb000+140000]
Oct 23 04:37:14 sekaissecdetection kernel: aex-pluginmanag[107876]: segfault at 8 ip 00007fa1e3f113b1 sp 00007fa1e4c5d470 error 4 in libaps.so.1.0[7fa1e3e86000+140000]
Oct 23 04:37:19 sekaissecdetection kernel: aex-pluginmanag[107930]: segfault at 8 ip 00007ffa1c7b33b1 sp 00007ffa1d4ff470 error 4 in libaps.so.1.0[7ffa1c728000+140000]
Oct 23 04:37:24 sekaissecdetection kernel: aex-pluginmanag[107943]: segfault at 8 ip 00007f9a467293b1 sp 00007f9a47475470 error 4 in libaps.so.1.0[7f9a4669e000+140000]
Oct 23 04:37:29 sekaissecdetection kernel: aex-pluginmanag[107955]: segfault at 8 ip 00007f81421383b1 sp 00007f8142e84470 error 4 in libaps.so.1.0[7f81420ad000+140000]
Oct 23 04:37:35 sekaissecdetection kernel: aex-pluginmanag[107966]: segfault at 8 ip 00007efc2348c3b1 sp 00007efc241d8470 error 4 in libaps.so.1.0[7efc23401000+140000]
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/556580c2-7a10-4a73-a7ed-ec7ed93b306cn%40googlegroups.com.
Hi Wazuh Team,
Please, its request can someone help me on this? From last 2 weeks I am struggling , did end to end troubleshoot but not able to articulate what is the problem☹
I am not getting any emails if I append @ in <email_from> in ossec.conf meaning if I give <email_from> as testmail.com the emails will be fired irrespective of the fact that postfix is installed or not…but if I change to testmail@com the email wont come..So strange!!
My Wazuh is upgraded to 4.5.3, and also after reading so many links , installed postfix as well.
In my email_log_source its alerts.log , when I do cat alerts.log | grep mail, the alert is generated as mail but is not coming in my email box
Also , if I do var/log/maillog -> nothing is generated in terms of Alerts , I mean it gives normal postfix started /stopped but nothing related to Alert
Also if I do cat /var/ossec/logs/ossec.log | grep ERROR but nothing related to Wazuh-maild

Could see segfault in var/log/messages
Hi Stuti and Team,
Finally able to solve the problem by using the SMTP configuration in Wazuh documentation. Although both Wazuh and mailhost server are in same domain but simply putting the mailhost in <smtp_server> in ossec.conf doesn’t work.
Thank you Stuti, your explanation on the trail email regarding smtp relay is very nice, after reading it with cool mind I understood your point😊
Now with that, just one last question.. on both of Wazuh server and our mailhost server maillog , the status of email is coming as queued for delivery..any pointers??
![]()
Happy Dusshera😊