Category Archives: ORF

ORF-related posts.

Exchange 2007 Pickup Folder

Ok, I may be missing some important point, but… can anyone explain why Exchange 2007 ignores the X-Sender and X-Receiver headers for Pickup folder submissions and why not for Replay folder submissions?

For those not familiar with the concept, IIS/Exchange supports submitting emails in a couple of ways. The primary way is SMTP, but emails may be submitted e.g. using the Store Driver or using the Pickup folder. This latter is a file system directory—put any legitimate email there and it will be picked up by IIS/Exchange for delivery. In pre-2007 versions, emails placed in the Pickup folder could have extra X-Sender and X-Receiver header fields to specify the envelope (P1) sender and the recipient list. When these headers were present, the MIME (P2) sender and recipients were ignored. This worked pretty much like SMTP, where the P1 sender/recipient could have been different than the P2 sender/recipient.

Exchange 2007 splits the previous Pickup folder functionality into a Pickup folder and a Replay folder. According to the documentation, the “Pickup directory is used by […] applications that must create and submit their own messages” and the Replay folder “receives messages from foreign gateway servers and resubmits messages that administrators export from the queues of Exchange 2007 servers”. Again, I may be missing the point, but the above just does not explain me why the Pickup folder lacks the X-Sender and X-Receiver support when the Replay folder has it. The ability to specify different P1 and P2 address information is a quite legitimate requirement by any software that creates new messages, but with the above limitation, the software developer has to abuse the Replay folder.

How to Waste 2 Hours?

Write this…

Install-TransportAgent -Name “Vamsoft Test Agent” -AssemblyPath “E:\ORF\testagent\TestAgent.dll” -TransportAgentFactory=”Vamsoft.ORF.TestAgent.TestAgentFactory”

…instead of this…

Install-TransportAgent -Name “Vamsoft Test Agent” -AssemblyPath “E:\ORF\testagent\TestAgent.dll” -TransportAgentFactory “Vamsoft.ORF.TestAgent.TestAgentFactory”

…and lament on why PowerShell is giving you a prompt instead of an error message or something. Experiment with replacing -Name with -Identity. Boot your other virtual server where once this stuff worked and check why it worked there. Watch your computer running out of free memory with two virtual servers concurrently running. Shut down the other virtual server and wait while all running apps are mapped back to the live memory from the system swap. Get upset and pause both virtual machines as a desperate attempt. Realize that you’re just making the situation worse. Get a coffee, start with fresh mind. Look clueless. Then, finally, find the needless equals sign :)

A Little PowerShell Fun

Did you know that you can query the ORF statistics counters from the Windows PowerShell? This is how it works for the cumulative On Arrival “Tested Emails” counter:

$ORF = New-Object -com “orfeesvc.EnterpriseService”
$cumulative = “”

$sincestartup = “”

$ORF.GetStatisticsEx([ref] $cumulative, [ref] $sincestartup)

$xmldoc = New-Object -com “MSXML.DomDocument”

$xmldoc.loadXML($cumulative)

$node = $xmldoc.selectSingleNode(“/statistics/onarrival/tested”)

$oatested = $node.nodeTypedValue

That’s because PowerShell can invoke COM objects and what ORF returns via the GetStatisticsEx() method is really just XML that can be loaded into the COM-based MSXML parser, and so on…