You will need to edit the "rimpublic.property" file in
C:\Program Files\Research In Motion\Blackberry Enterprise Server\MDS\Servers\INSTANCENAME\config\
on your BES server where "INSTANCENAME" is the name of your BES server instance (i.e. BESSERVER), and add the following lines at the bottom.
(i pulled these straight from the configuration file in the MDS simulator):
# signs indicate comment lines in that configuration file.
The 3rd line allows you to filter the domains you send the PIN or email headers to, by means of a regular expression. Just remove the #, change "rim" and "net" to read "yourdomain" and "com", respectively, if your domain is "yourdomain.com" and the device will only send these headers when the domain matches, and it will work for all subdomains. handy!
Note: If you have BES server 3.7, you will only be able to enter "pin" OR "email" as the header. BES 4.0 supports both pin AND email simultaneously.
Then on the BES server, once you've saved and closed the file, open Start->Run and run "services.msc", and then restart the Mobile Data Server service for your BES installation.
Once you follow these steps, these headers should be present in HTTP requests your server's attached devices send in browser requests.
The headers will appear as HTTP_RIM_DEVICE_ID and HTTP_RIM_DEVICE_EMAIL.
There is a knowledgebase article on the blackberry site about this configuration, it's Article #DB-00435
Curiously, I had trouble getting this to work until I realized that I was using the "Internet Browser" on my device instead of the "Blackberry Browser". I didn't realize there was a difference but there is, and here it's crucial - Internet Browser sends your HTTP requests through a RIM proxy MDS, while the Blackberry Browser sends the requests directly through your BES server's MDS, which is the desired behavior here. just something to keep in mind.