Hi
Sergio,You need to create custom rules and decoders like:
Add the custom decoder at /var/ossec/etc/decoders/local_decoder.xml, like:
<decoder name="outbound">
<prematch>outbound/smtp</prematch>
</decoder>
<decoder name="outbound_child">
<parent>outbound</parent>
<regex>outbound/smtp: (\d+.\d+.\d+.\d+) (\.+) \d \d (\.+) ENC \d (\.+) (\d+) \d.\d.\d (\S+) [InternalId=(\.+), Hostname=(\.+)] (\d+) bytes in \.+, \.+ KB/sec (\.+)\p+to\p
+(\.+)[(\.+)]:(\.+)</regex>
<order>smtp_client, session_id,msg_action,session_token,SMTP_response_code,message_id,InternalId,host_name,msg_size,info,destination_mail,ip_address,dst_port</order>
</decoder>
You can modify this decoder as your requirement
Then, add the costom rule at /var/ossec/etc/rules/local_rules.xml, like:
<group name="smtp">
<rule id="100406" level="5">
<decoded_as>outbound</decoded_as>
<field name="msg_action">SEND</field>
<description>stmp: $(info)</description>
</rule>
</group>
Test the rule in wazuh-logtest or ruleset test. Once you are satisfied with the results, restart the wazuh-manager to apply the changes.

To know more about custom rules and decoders, please refer to
https://documentation.wazuh.com/current/user-manual/ruleset/index.htmlLet me know if you need any further assistance!