It's possible to implement custom scripts in hMailServer which are executed when certain actions occrur. This example shows you how to remove all Received-headers from a message before it is accepted.
Sub OnAcceptMessage(oClient, oMessage)
set oHeaders = oMessage.Headers
EventLog.Write("Header count: " + CStr(oHeaders.Count))
For i = oHeaders.Count -1 To 0 Step -1
Set oHeader =oHeaders.Item(i)
EventLog.Write("Header found: " + oHeader.Name)
' Check i this is a header which we should delete.
if LCase(oHeader.Name) = "received" Then
' Save all the changes...