
<group name="syslog,postfix,">
<rule id="3300" level="4" overwrite="yes">
<decoded_as>postfix-reject</decoded_as>
<description>Grouping of the postfix reject rules.</description>
</rule>
</group>
Check this doc on how to change existing rules.
You can address the issue by modifying the existing decoders.
To do this, SSH to your Wazuh Manager's server.
Copy the default decoder file to the custom decoder folder
cp /var/ossec/ruleset/decoders/0220-postfix_decoders.xml /var/ossec/etc/decoders/local_postfix_decoders.xml
Open the file with the text editor
/var/ossec/etc/decoders/local_postfix_decoders.xml
Update this postfix-reject decoder
<decoder name="postfix-reject">
—--------
</decoder>
With this.
<decoder name="postfix-reject">
<use_own_name>true</use_own_name>
<parent>postfix</parent>
<prematch>^NOQUEUE: reject: \w\w\w\w from </prematch>
<regex offset="after_prematch">[(\S+)]: (\d+) \.+: (\.+); from=(\.*) to=(\.*) |[(\S+)]:\d+: (\d+) \.+: (\.+); from=(\.*) to=(\.*) </regex>
<order>srcip,id,status,from,to</order>
</decoder>
Change file permission.
chmod 660 /var/ossec/etc/decoders/local_postfix_decoders.xml
chown wazuh:wazuh /var/ossec/etc/decoders/local_postfix_decoders.xml
Go to the manager’s ossec.conf
/var/ossec/etc/ossec.conf
Under the
<ruleset>
Add this line
<decoder_exclude>ruleset/decoders/0220-postfix_decoders.xml</decoder_exclude>
Now restart the Wazuh manager.
systemctl restart wazuh-manager
Check the screenshot of the test result.
Check this document to learn more about modifying default decoders.
Check these documents to learn more about decoder syntax and regex.
Decoders Syntax
Regular Expression Syntax
Let me know if this works for you.