Logging Headers before Discarding them

Hi,
Im currently trying to add a Header that i set further downstream to KumoMTA to the Logging output but i would also like Kumo to discard said header before the message is sent out.
The header is the IP of the original client that sent the mail. Think ISP Email platform.
The header logs out fine when not using the smtp_server_message_received event to delete the header.
so my assumption is smtp_server_message_received is processed before the logging of a received message

Just wondering if i have missed something some where that would allow this to work or is it simply not possible

Hey there @thoughtful-seal, thanks for posting. Please read the “Troubleshooting” and “How to Ask for Help” buttons below. If you would like a 1:1 support session from the KumoMTA team, details are at the “Book a Support Session” button below.

Use set_meta to store the header contents to the message metadata, log the meta data instead. Then you can delete the header knowing the data will still get logged but not be present in the outgoing message.

Awesome thanks