136 CHAPTER 4 UNDERSTANDING EXCHANGE 2003 DATA STORAGE

136 CHAPTER 4 UNDERSTANDING EXCHANGE 2003 DATA STORAGE Dbid is a sequentially unique number given to each database in the storage group. Log Signature is the creation time and a random number that is used to uniquely identify the transactions in the transaction logs that are intended for this database. However, if the database is consistent, it can be attached to a new set of transaction logs such as in a disaster recovery situation or such as if you have deleted all of the logs to reset the log file generation number. OS Version is quite obviously the version of Windows on which this database is found. Yes, the ESE database knows the version of Windows on which it was previously running. During a disaster recovery, never store an Exchange database to a version of Windows (including the service pack) that it was not running on originally. Problems may occur if the Unicode tables have been changed between versions. The database can be mounted, but you have to rebuild the secondary indexes (ESEUTIL /D will do this). Content Conversion Message content may be stored in either MAPI format or native format, depending on which client sent (or stored) the message. If a MAPI client retrieves a message that was sent from the Internet, the Microsoft Exchange Information Store service will convert the content on demand. The content is not actually converted in the store database files but rather in memory. The information store runs a process called IMAIL, which is responsible for all content conversion. Content conversion is transparent to the user. On-demand content conversion occurs in the following situations: . A MAPI client retrieves a message that was sent by an SMTP or HTTP client. . A POP3, IMAP4, NNTP, or HTTP client retrieves a message that was sent by an Outlook (MAPI) client. If a MAPI client retrieves and modifies a message that was sent from an Internet client, the message is then saved to the rich-text store. You might surmise that since all routing in Exchange 2003 is based on SMTP, even messages that originate in Outlook might be transferred to other servers and then stored in the STM database files. In reality, Exchange is smarter than that. If a message being sent to another server is stored in the EDB file, it contains a Microsoft Transport Neutral Encapsulation Format (MS-TNEF) body part. (This encoding is also called Application/ms-tnef, or it can be found in the winmaildat file if the message was sent via UUENCODE.) In this case, the message body is not converted to the default outgoing message type, such as S/MIME; instead, the message is transmitted in compressed TNEF format, meaning there are no non-TNEF body parts. When received by the destination Exchange 2003 server, the message is immediately recognized as being a MAPI message and is stored in the EDB file. NOTE In Exchange 5.5, any time a POP3, IMAP4, HTTP, or NNTP client retrieved a message, the IMAIL process converted the message. Microsoft developers estimate that by not converting inbound Internet e-mail content to MAPI, performance would be improved, especially as more and more customers begin to depend on Internet-type clients and less on MAPI clients. Even if you have mostly MAPI clients, this architecture prevents inbound messages from being converted until necessary.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

EXCHANGE 2003 EVENT SINKS 357 Blat has many

EXCHANGE 2003 EVENT SINKS 359 Types of Store Events Three types of store events exist: synchronous, asynchronous, and system. An application that uses a synchronous event can modify the item before it s saved to the store, prevent it from being saved to the store, or, in the case of a delete event, prevent it from being deleted from the store. Because the application is called before the item is saved, the application has an opportunity to modify the item before any client can access it or is even aware that it is there. Generally, synchronous events are not available to scripting languages; because synchronous events block threads in the store service, great care must be taken when implementing them. Code that executes within a synchronous event must complete before the item can be saved to the store, so it is important to ensure that synchronous event sink code does not delay the saving of the item more than is necessary. One application that might be useful for synchronous events is content inspection. These are two of the synchronous event sink methods: . OnSyncSave events execute when a message is saved to the store, but they execute before the message is actually committed. . OnSyncDelete events execute when a message is deleted from the store, but they execute before the message is actually deleted. Asynchronous event sinks fire after the item has been saved to the store. They should be used as a notification or when it is not necessary to modify the item before it is saved. Asynchronous event sinks are not guaranteed to fire in a particular order, and they are not certain to have access to the item that caused the event to fire. Useful applications of asynchronous events include automated processing of messages such as messages delivering data to another application. These are two asynchronous event sink methods: . OnSave events are called when a message is saved to the store, but only after the message is completed is it committed to the store. . OnDelete events are called when a message is deleted from the store but only after the message has been deleted. The system events available are not related to operations on message items in the store but rather to the operation of the Exchange server and the store itself. Useful applications for system events include running scripts when a specific store is mounted or dismounted (which, of course, includes when the server is shut down) and running a script based on a clock timer. Here are three system event sink methods: . OnTimer events are called based on a schedule or a time interval. For example, an OnTimer event might be used to check the aging time of items in a folder used for problem submissions and then to send an escalation e-mail to a manager for each item more than an hour old. . OnMDBStartUp events are called when an Information Store is mounted. These events might be used to restore share folders within the web store when a store is restarted. . OnMDBShutdown events are called when an Information Store is dismounted. These events might be used to save information that needs to be used when a store restarts, such as saving shared folder information within the web store. NOTE For more information on store (or web storage system) events, download the Exchange 2003 SDK from http://msdn.microsoft.com/exchange. You can find documentation for the Exchange 2003 SDK and web storage system events at http://msdn.microsoft.com/ library/default.asp.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

EXCHANGE 2003 EVENT SINKS 357 Blat has many

358 CHAPTER 8 KEEPING AN EYE ON EXCHANGE 2003 USAGE Don t confuse event sinks with the Event Service that originated with Exchange 5.5 (and continues to be supported for backward compatibility in Exchange 2003). Exchange 5.5 Event Service scripts are registered for a single folder, whereas Exchange 2003 event sinks can be registered for the entire Information Store or the entire message transport. Event sinks can run either asynchronously or synchronously depending on the particular event; this means they can react to events not only after they occur but before they are finished. All Exchange 5.5 events ran as asynchronous events. Essentially, the developers have given us a way to alter the behavior of Exchange to better suit a specific business model. Event sinks can be broken down into three categories: . Store events take place in the Information Store. You will see these events referred to as web storage system events in the Microsoft Exchange software development kit (SDK). Store events allow you to manipulate messages in the store when they are saved, deleted, or changed or at a specific time. The store also has events that are triggered by the startup or shutdown of a store; while these are messaging related, they may be useful for administrative tasks. . Transport events take place within the SMTP Message Transport system. They allow you to change the behavior of messages that are processed in the Advanced Queuing Engine. . Protocol events allow you to change the behavior of the SMTP or NNTP protocols. For example, you could change the behavior of the SMTP Mail From command verb so that it immediately checks to see whether the recipient is valid in Active Directory and rejects the message if it is not. WARNING Any event sink you implement in Exchange 2003 should be tested carefully before being put into production. An improperly implemented event sink or an event sink that fires on every message the Exchange server processes can quickly destroy server performance. Real-World Scenarios: Processing Forms Using an Event Sink Company FGH has salespeople all over the world. They needed a method whereby their remote salespeople could enter sales statistics and orders. Creating a web page seemed to be the ideal way to do this, but a pilot project indicated that this method didn t work as well as everyone thought it would because of the amount of time it took to enter the data. This was compounded by the fact that many times throughout the remote salesperson s day, they were not near a telephone line. To solve the problem, a custom form was developed using Outlook 2000 that allowed the remote salespeople to enter their sales data directly into a mail message. This data could be saved and edited until they were ready to transmit it at the end of the day. The messages using the custom forms were all sent to a specific mailbox on the Exchange server; when the message arrived, an event sink script fired, opened the message, extracted the data, and imported it into an SQL database. This solution worked great for Company FGH because the salespeople could enter data periodically throughout the day but remain offline. The solution was not only easy to use, but it saved a substantial amount of money in long-distance phone charges.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

EXCHANGE 2003 EVENT SINKS 357 Blat has many

EXCHANGE 2003 EVENT SINKS 357 Blat has many options you can use from the command line; refer to the readme.txt file that accompanies the download for more information. Here are some of the basic options: . indicates the filename to be used for the message body. . -to indicates the recipients (multiple recipients must be separated by commas). . -subject provides the message subject line. . -f overrides the default sender name stored in the Registry. . -cc is the Cc recipient list. . -body allows you to specify the body of the message. . -r requests a return receipt. . -server allows you to override the default SMTP server stored in the Registry. . -uuencode says to send the message using uuencode. . -html says to send the message as an HTML message. . -attach specifies a binary file attachment. . -attacht specifies a text file attachment. The following example sends a text file called BackupRpt.txt to user dbratcher@Somorita.net with the subject Backup Report : Blat backuprpt.txt -subject Backup Report -to dbratcher@Somorita.net NOTE Blat creator Tim Charron has created a utility called GetMail for Windows. This is a command-line tool that allows you to retrieve messages from a POP3 server and extract attachments. This may be useful for automatically processing mail. This program is shareware and free for noncommercial use. If you use it in your business, be nice and send him a registration fee to encourage him to keep the software up-to-date. You can download it at www.interlog.com/ ~tcharron/getmail.html. Exchange 2003 Event Sinks A fascinating improvement to Exchange 2000 and Exchange 2003 is the addition of event sinks. An event sink is nothing more than a bit of script or compiled code that is called when a specified event occurs. Events are fired when the message is saved to the Information Store or when it is submitted to the SMTP routing engine. Even if you are programmatically impaired (such as I am), it s easy to recognize the enormous potential of event sinks to automate or monitor some types of operations that occur within Exchange. Although I want to avoid mentioning programming too much in this book, all Exchange administrators should be aware the event sink capability. Microsoft even incorporates the use of store and transport event sinks into the day-to-day operations of Exchange 2003. Content indexing, workflow, unified messaging, and message routing all use event sinks to accomplish their particular tasks. Even Active Directory can use SMTP event sinks when using SMTP-based directory replication between sites.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Low Cost Web Hosting services

570 CHAPTER 14 SMTP AND MESSAGE ROUTING Figure

572 CHAPTER 14 SMTP AND MESSAGE ROUTING Domain Mapping Table (DMT) The DMT resolves domain names to the destination message queues, which are associated with specific final destinations for the messages. A single destination queue may exist for a gateway such as the Microsoft Mail connector. Domain Configuration Table (DCT) The DCT maps a domain to a specification configuration for that domain. This information helps to determine whether another domain uses ETRN, requires authentication, and so on. This information is derived from SMTP Connector configurations and the Internet Message Formats; setting up different Internet Message Formats is discussed later in this chapter. Destination message queue (DestMsgQueue) The destination message queues are associated with logical remote destinations. They are also used for delivering messages based on size and are used for delay notifications of currently queued messages. Destination Message Queues are then grouped into link message queues. Link message queue (LinkMsgQueue) One of these queues may contain several destination message queues, which are associated with link queues based on routing information. Link queues represent the next hop for the messages in the queue. They are created and used by the Connection Manager to create SMTP connection objects. Local delivery queue This queue is used for messages that are to be delivered to a local mailbox or public folder store. Messages may queue in the local delivery queue if the destination store is dismounted or if there is an I/O bottleneck and the AQE cannot deliver messages to the destination server or store. Connection Manager The Connection Manager determines which link queues should be used to satisfy a connection request. It makes this decision based on message size, message priority, connector schedule, and the number of messages. SMTP The business end of the message transport, SMTP is used to deliver messages that have been placed in the link queues. DSN Generator The DSN (delivery status notification) Generator is used each time an IMsg object is acknowledged as being delivered. The DSN Generator is responsible for sending delivery receipts, non-delivery receipts, and delay notifications. NOTE The SMTP virtual server queues are documented in Chapter 13, Server Troubleshooting. SMTP Virtual Servers By default, each Exchange 2003 server has a single SMTP virtual server instance; this should be sufficient for most organizations. On each Exchange 2003 server you can configure additional SMTP virtual servers, but in only a few situations would you actually need them. Because IIS and the SMTP components are multithreaded, additional SMTP virtual servers will not improve performance or increase the number of messages the server can handle. You may want to create additional SMTP virtual servers in these cases: . You need to implement different SMTP virtual servers with different configurations, such as one that requires authentication and encryption and another that does not. . You have an application that requires the use of an SMTP server and requires a specific configuration.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

570 CHAPTER 14 SMTP AND MESSAGE ROUTING Figure

EXCHANGE 2003 MESSAGE ROUTING ARCHITECTURE 571 Figure 14.6 Exchange 2003 message transport components Message Categorizer The Message Categorizer is responsible for querying a Global Catalog server to do mail-enabled group expansion, check limits, and check restrictions on mail-enabled objects. It determines whether the recipient is local, remote within the routing group, remote in another routing group, or outside of the organization. The Message Categorizer may also bifurcate the message if it determines that different recipients need to receive the message in different formats. Bifurcation is the process of breaking the message into two uniquely formatted messages (for example, a plain-text version and a MIME version). This occurs when a message has multiple recipients, and each of which requires different formats. Windows Server 2000 and 2003 IIS has a basic Message Categorizer (cat.dll), but it is not enabled by default. When Exchange 2003 is installed, a new Message Categorizer (phatcat.dll) is installed and enabled, which has the additional capabilities that the AQE requires to work with Exchange 2003. Messages Waiting to Be Routed queue Also known as the Categorized Message Queue (CatMsgQueue) or the Pre-Routing queue, this queue serves as an interface between the categorizer and the routing system. In Exchange System Manager, it is referred to as the Messages Waiting to Be Routed queue. Routing Engine In conjunction with routing event sinks, the Routing Engine determines the best next hop for each message and places the messages into the appropriate destination message queues. The Routing Engine also consults the domain mapping tables and the domain configuration tables. INETINFO Process Boundary Pre-Routing Queue Local Delivery Queue Link Queue DestMsg Queue DestMsg Queue DestMsg Queue PreCat Queue NTFS Queue Link Queue Link Queue Exchange 2003 Message Transfer Agent Exchange 2003 Information Store Exchange Store Driver Exchange 2003 Information Store Exchange Store Driver SMTP Service SMTP Service Active Directory Global Catalog Server Message Categorizer (PHATCAT.DLL) Domain Mapping Table Domain Configuration Table Routing Engine and Routing Events MTA MTS In MTS Out

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

570 CHAPTER 14 SMTP AND MESSAGE ROUTING Figure

570 CHAPTER 14 SMTP AND MESSAGE ROUTING Figure 14.5 Network Monitor trace of an entire message Exchange 2003 Message Routing Architecture Collectively, the Exchange 2003 message transport operates as a series of processes running under the IIS Admin Service ( INETINFO.EXE ). These components process all messages transported by Exchange 2003. Though this was discussed in Chapter 2, Windows Dependencies and Platform, in some detail, this section explores more deeply the components that make up the message transport system. The major components are the Advanced Queuing Engine (AQE), the Routing Engine, and the SMTP Service. Figure 14.6 shows the components and the queues that are found within the message transport and the path that a message flows through when it is processed by the AQE. NOTE Stopping the SMTP Service stops all message processing. When a message is passed through the message transport, a small memory object called an IMsg (a.k.a. MailMsg or IMailMsg ) is all that is really moved. The body of the message and the message attachments remain in their originally stored location (a mailbox store or the SMTP NTFS queue). Here are some of the components that are involved in moving a message through the queue: Advanced Queuing Engine The AQE manages all messages submitted to the Exchange 2003 message transport. The AQE is passed the IMsg object from the Exchange Store driver or the NTFS driver. AQE supervises the flow of messages through all of the queues and all of the message transport components. Exchange Store driver The Exchange Store driver serves as an interface between the IIS message transport and the Exchange 2003 Information Store. This allows messages to be read from and written to the Information Store. Messages Awaiting Directory Lookup queue This component is known by several names. The SMTP Queue Manager in Exchange System Manager refers to it as Messages Awaiting Directory Lookup, but you may see it referred to as the inbound queue . I prefer Pre-Cat queue because this is the queue messages wait in until the Message Categorizer can process them.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

802 CHAPTER 21 DEPLOYING OUTLOOK WEB ACCESS Figure

804 CHAPTER 21 DEPLOYING OUTLOOK WEB ACCESS NOTE WebDAV (a.k.a. HTTP-DAV, or just DAV) is described in RFC 2518, and you can find more information at www.webdav.org . OWA s developers take further advantage of XML and Dynamic HTML to improve performance, offload some rendering tasks to the client, and provide enhanced client features. Where Exchange 5.5 OWA had ASP web pages and JavaScript, Exchange 2003 OWA has a compiled DLL that handles communication between the IIS server and the Exchange server. On a back-end server, this DLL is the DAVEx.DLL ; on a front-end server, the EXProx.DLL is responsible for passing requests back to the DAVEx.DLL on the appropriate back-end server. The DAVEx.DLL is responsible for handling all GET and POST requests as well as providing a rendering engine, a template renderer, and a template cache. Figure 21.2 shows the basics of the Exchange 2003 OWA architecture. Client requests are received by the IIS web server process and are passed to the DAVEx.DLL ISAPI application. DAVEx then passes the requests through the ExIPC (Exchange Interprocess Communication) layer to the Exchange Information Store, where they are handled by the ExOLEDB (Exchange Object Linking and Embedding Database) layer. Figure 21.2 Exchange 2003 OWA architecture Responses are passed back from the Information Store to ExOLEDB, then back through the ExIPC layer, and finally on to DAVEx . DAVEx renders the responses into either DHTML or HTML, depending on the client type, and passes the data back to IIS; then IIS sends the data back to the browser client. Virtual Directories By default, when Exchange 2003 is installed, four virtual directories are created on the default website in IIS. Here are some examples of directories that are created on a server whose domain name is somorita.net : Exchange is mapped to \.BackOfficeStorage somorita.netmbx and provides access to mailboxes. This is part of the Exchange Installable File System (ExIFS). Exchweb is mapped to the exchsrvrexchweb directory to provide access to XML style sheets, graphics, language files, and controls. Public is mapped to the \.BackOfficeStoragesomorita.netPublic Folders directory and provides access to the default public folder tree. This access is also provided through ExIFS. AD Data Browser Client Exchange 2003 OWA Server Active Directory Domain Controller DHTML/XML (Rich Clients) HTML (Reach Clients) Web Server Authentication Exchange Authentication Internet Information Server 6 Exchange Information Store Store Data W3 Svc DAVEx ExIPC layer ExOLEDB

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Discount Web Hosting services

802 CHAPTER 21 DEPLOYING OUTLOOK WEB ACCESS Figure

UNDERSTANDING OWA 2003 803 . It allows access to the Out of Office Assistant. . It offers advanced search capabilities. . It offers a spell checker. . It supports Contact Distribution List. . It supports front-end and back-end configurations. . It allows the restriction of certain features such as public folders, the Calendar, Contacts, and so on. Understanding what Outlook Web Access cannot do is also important, because you need to keep user expectations in check. The following is a partial list of OWA 2003 s limitations: . There is no offline support either to work offline or to access PST files. . Users cannot open up other users mailbox folders. . When initially connecting to an OWA server, the browser client will download more than 250KB of content, controls, and graphics. This can be very slow for clients connecting to the OWA server through dial-up, but enabling compression can improve performance. . The Exchange 2003-based OWA supports S/MIME, as well as digital signatures and encryption. You must have the S/MIME control installed for IE, and you must have a digital ID assigned by the system. . You cannot browse the global address list. . It does not support advanced group-scheduling features such as side-by-side displays, appointment list views, track acceptance, task lists, or task management. . It cannot access Exchange 5.5 mailboxes or public folders, only other Exchange 2000 or Exchange 2003-based mailboxes. When using an Exchange 2003 OWA server against an Exchange 2000 mailbox server, the older mailbox interface is displayed, not the OWA 2003 interface. . Any customized Outlook forms must also have web form equivalents. OWA 2003 Architecture To fully understand how much more efficient OWA 2003 actually is, you have to appreciate how Exchange 5.5 OWA worked (inefficiently). It used a combination of Active Server Pages (ASP), JavaScript, and Collaborative Data Objects (CDO) to make MAPI function calls to the Exchange Information Store and directory service. This meant that for each simultaneous OWA 5.5 session, there had to be a MAPI session between the IIS server and the Exchange 5.5 server. This limited the scalability of a single IIS server running OWA to no more than a few hundred OWA clients. When the new OWA interface was designed, Microsoft s engineers realized they would have to follow a whole new design paradigm to improve the performance and scalability of OWA 2003. Rather than try to improve the existing design, they started from scratch and used WebDAV rather than standard HTML. WebDAV is a standard set of extensions to HTTP 1.1 that allow additional methods (HTTP commands) for document management, file locking, document property access, folder creation, and more. The new methods included Copy , Mkcol , Propfind , Proppatch , Search , Unlock , Move , and Lock .

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Discount Web Hosting services

802 CHAPTER 21 DEPLOYING OUTLOOK WEB ACCESS Figure

802 CHAPTER 21 DEPLOYING OUTLOOK WEB ACCESS Figure 21.1 Outlook Web Access 2003 The following are the major features and capabilities of Outlook Web Access 2003: . It provides access to all mailbox folders. It can display e-mail messages, contact items, and appointment items. Public folders that have contact items or calendar items can be viewed. . It provides a multimedia control for viewing and recording multimedia messages. . It provides access to mail items using friendly URLs. . It provides an enhanced interface for Internet Explorer 5.01 or later but still supports older web browsers. . Internet Explorer 5.01 and later clients support drag and drop between folders in the mailbox but not between mailbox folders and public folders. . It provides a Logoff button. . It supports messages that have embedded items, such as contact items. . It provides for HTML message formatting. . It includes an optional, customizable logon page (forms-based authentication). . It allows users to change their passwords remotely if enabled through IIS. This is not enabled by default. . It gives new mail notifications and calendar reminders when using Internet Explorer 5.01 or later. . It includes a control for S/MIME messages. . It includes junk mail protection. . It allows for the recovery of deleted items. . It provides a preview pane and folder views.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Discount Web Hosting services