I would like to share this information here in case anyone needs it. You can use the existing default decoders for Fortimal by modifying the parent decoder.
To achieve this, copy the existing decoder to a custom decoder file.
cp /var/ossec/ruleset/decoders/0102-fortimail_decoders.xml /var/ossec/etc/decoders/custom-fortimail.xml
Change file permissions.
chmod 660 /var/ossec/etc/decoders/custom-fortimail.xml
chown wazuh:wazuh /var/ossec/etc/decoders/custom-fortimail.xml
Open the file with the text editor
/var/ossec/etc/decoders/custom-fortimail.xml
Now modify the decoders so that they can handle your new logs. Replace the parent decoder(the first decoder in the file) with this one:
<decoder name="fortimail-like">
<prematch>time=\S+ device_id=\.+ log_id=\S+ |time=\S+ devid=\S+ log_id=\S+</prematch>
</decoder>
Now restart the Wazuh manager.
systemctl restart wazuh-manager

Let us know if anyone face any issues with decoding the logs.