An email is so much more than just the body that gets read by a recipient. The message headers that are not typically visible to readers can contain valuable information about routing and security. MailOps engineers know all too well how critical these can be for managing message flow. KumoMTA just made it much easier to manage those header values.
Well, by "just", I mean the 12 May 2026 release. Yes, I am a little behind on feature discussions. But if you are in our Forum, or get our newsletter, you already saw the notice. In this post, I want to discuss how this can specifically save you processing power and increase send speed.
Some background
First, let's talk about what headers are and why they are important. If you are a seasoned veteran, feel free to skip to the next section.
Email headers are a set of data transmitted with every email, but not natively displayed in your email reader. Most email readers will allow you to view them if you know where to look - it's not a secret, but for most people, it is just unnecessary noise. If you use Gmail, click the three dots in the top-right corner of any email, then click "Show original". If you use Outlook or Hotmail, you can do the same by selecting "view message source". Yahoo Mail has a similar tool, but click on "view raw message". There you will find a glorious pile of seemingly unrelated characters that may be completely meaningless to you, which is exactly why it is hidden.
| GMAIL | OUTLOOK | YAHOO |
![]() |
|
|
For email specialists, however, this stuff is critical to ensuring mail is valid and routed correctly. Authentication headers reporting on SPF, DKIM, and DMARC help ensure you are receiving valid, wanted mail. Other headers, such as Reply-To and Return-Path, are used internally to ensure messages reach the right place during certain actions.

There are also X-headers that carry arbitrary data specific to the sender, which can be used for account control, abuse mitigation and other internal measures. You might see an X-Campaign-ID, X-Account, or X-Feedback-ID in your email headers. These are used by the email ecosystem to manage routing, cadence, and spam complaint handling. Probably irrelevant to you, but very important to how mail is handled for you.
Often, X-Headers are used within the generation and sending engine for routing control and are then deleted before sending, so the receiver never sees them. An X-Egress-Pool or X-Tenant header can be used to select the outbound IP address. An X-Generator-Source might be used to identify the content tool that created the message. These can be important to the MailOps engineer for IP routing and account management, and then are deleted before sending.
What we did
While KumoMTA has always been able to import headers into metadata for processing with the import_x_headers function, it can take a few steps to get all the headers formatted as desired. This new function (import_headers) makes life easier, reduces resource requirements, and speeds up code execution by consolidating a few common processes into a single step.
For example, let's say we want to import X-Tenant, X-Campaign, Subject, and From headers and set the variables to MyTenantID, MyCampaignID, subject, and from. At the same time, we want to remove the X-Tenant header from the outbound message, since it is used only for internal routing. Sounds complicated, but we see this type of thing often.
In prior releases, this required multiple calls: importing the variables, changing the variable name, and removing the X-Tenant header before sending. The new function allows flexible processing to take all of that into account, so you can do it all in one instruction.
Old way (4 lines of code) :
msg:import_x_headers { 'x-tenant', x-campaign, subject, from }
msg:remove_x_headers { 'x-tenant'} -- remove this header before sending
-- rename these specific meta variables
msg:set_meta( 'MyTenantID', msg:get_meta( 'x_tenant' ))
msg:set_meta( 'MyCampaignID', msg:get_meta( 'x_campaign' ))
New way (1 line of code ) :
msg:import_headers {
{ name = 'x-campaign', target = 'MyCampaignID' },
{ name = 'x-tenant', target = 'MyTenantID', remove = true },
{ name = 'subject' },
{ name = 'from' },
}
The value here is in saving instruction time and resources. I have seen this save a few milliseconds per message in the field, which may not seem like much, but when you are sending millions of messages per hour, it adds up quickly.
This is where the KumoMTA team spends time - hunting for those little things that can become big problems at scale, where MailOps engineers really need the help.
If you have a chance to try it out, we'd love to hear your feedback.
- - - - - - - - -
KumoMTA is the first open-source MTA designed from the ground up for the world's largest commercial senders. We are fueled by Professional Services and Sponsorship revenue.
Join the Forum | Review the Docs | Read the Blog | Grab the Code | SWAG Shop


