Subscribe to our Newsletter. The latest news and articles delivered to your Inbox!
Alexander Zammit has been developing server applications for over 15 years. Most of his works involve Exchange integrated applications, including a FAX server, a mail security product and anti-spam products.
The Exchange 2000/2003 Pickup directory in Exchange 2007 evolved into the Pickup and Replay directory pair. Today we see how these provide an improved interface for submitting emails through disk.
The marriage between Exchange and IIS dates back to Exchange 2000. It allowed Exchange to embrace various internet standards and adopt SMTP as its core transport protocol. With the introduction of its own SMTP implementation, Exchange 2007 Edge and Hub transport servers have undone many of the IIS ties. Even so, some of its functionality lives on.
The IIS SMTP provided a simple method for administrators and applications to send emails. An email file with EML extension would be dropped into the Pickup directory. This would then be automatically injected into the SMTP transport. This functionality was used both by Microsoft and Third Party vendors. Some examples include the various IMF Archive management tools and the SBS POP3 connector.
In Exchange 2000/2003 the Pickup for the first SMTP virtual server, used to be located under:
<Exchange Server>\Mailroot\vsi 1\PickUp
In Exchange 2007 Edge and Hub transport servers this is now replaced by two directories typically located under:
Both Exchange 2007 Pickup and Replay directories allow for submitting emails through the file system. However they work differently as we shall see later.
In previous Exchange versions the Pickup functionality was implemented by IIS. Thus configuration settings could be accessed through the IIS Metabase editor. In Exchange 2007 the command shell is the place to go for Pickup/Replay related settings. We can quickly list all relevant properties using this cmdlet:
Get-TransportServer <Identity> | List Pickup*, Replay*
PickupDirectoryPath and ReplayDirectoryPath of course identify the paths for the two directories.
PickupDirectoryMaxMessagesPerMinute applies to both Pickup and Replay. It allows for limiting the number of emails processed per minute. Thus we are able to control the load on the transport system from this interface.
PickupDirectoryMaxRecipientsPerMessage and PickupDirectoryMaxHeaderSize apply to emails dropped into the Pickup but not the Replay directory. This is due to the different usage scenarios where the directories are meant to be employed. We will discuss this further shortly. For the moment just note how these properties limit the number of recipients per message and the maximum allowable size of the email header area.
Using the Set-TransportServer cmdlet we can edit all of these properties. For example:
Change the Pickup directory path for Server1
Set-TransportServer Server1 -PickupDirectoryPath d:\Transport\Pickup
Disable Pickup directory functionality
Set-TransportServer Server1 -PickupDirectoryPath $null
I suggest to be careful from changing these paths and even more from disabling them altogether. Changing the path soon after the Exchange Edge/Hub transport is installed should be safe. However if other applications that make use of this functionality are already installed, changes could block them directory access. Keep in mind that apart for the path change itself, there could be access right settings that are necessary for the other applications to work.
The last point that needs clarification relates to the differences between Pickup and Replay. Let's identify the two usage scenarios:
Pickup - Submitting a newly generated email.
Replay - Resubmit an email that was removed (for quarantine or whatever reason) from the transport.
Earlier Exchange versions provided a single directory that had to satisfy the needs of both scenarios. On the other hand, Exchange 2007 allows us to manage the two independently. To begin, we can enable and secure the two directories separately. Furthermore we can better cater for the different characteristics of the emails involved. In case of Pickup we are generating a new email. So the person or application that drops the file into Pickup is effectively the sender. This is not the case for the Replay directory. Here we are resubmitting an email that was taken out of the transport. The sender here is the one who originally submitted the email.
In this discussion you should not interpret the term "sender" to be simply the email From address. Here we are more talking of who generated the email.
To cut a long story short, Replayed emails must preserve additional information that was available to the SMTP Protocol at the time when the email was originally submitted. This is done through a set of custom headers. Amongst others these include the X-Sender and X-Receiver headers that identify the SMTP sender and the complete recipient address list (including BCCs).
Getting back to the Exchange 2007 Pickup directory, files dropped here are not concerned with the custom headers required for Replayed emails. Thus email files have less stringent requirements. Indeed Pickup will be happy to process emails that are RFC compliant. For complete details on the requirements that Pickup and Replay emails must satisfy please refer to the References section.
Exchange 2007 will poll the Pickup and Replay directories every 5 seconds. Files are expected to have the ".eml" extension. This will change to ".tmp" during processing and on successful completion the file is deleted. In case of failure the file is retained with the ".bad" extension.
On restarting the transport if Exchange finds any ".tmp" files, these will be renamed to ".eml" and reprocessed. Thus if a successfully processed email fails deletion, the same email would be processed and delivered for a second time.
Today we saw how Exchange 2007 retained the Pickup directory functionality inherited from earlier releases. In the process the interface was improved so as to provide better control and to cater for different usage scenarios.
How to Configure the Pickup Directory
Managing the Pickup Directory
How to Configure the Replay Directory
Managing the Replay Directory
Add New Comment...