private bool ShouldProcessRuleInTransport(StoreDriverDeliveryEventArgsImpl deliveryEventArguments) { MailboxSession mailboxSession = deliveryEventArguments.MailboxSession; IExchangePrincipal mailboxOwner = mailboxSession.MailboxOwner; int serverVersion = mailboxOwner.MailboxInfo.Location.ServerVersion; if (serverVersion < Server.E14MinVersion) { this.evaluationContext.TraceDebug <int>("Will not process rules in transport for old server with version number {0}.", serverVersion); return(false); } if (string.IsNullOrEmpty(mailboxOwner.MailboxInfo.Location.ServerFqdn)) { this.evaluationContext.TraceError("Server Fqdn is empty."); return(false); } DeliverableMailItem mailItem = deliveryEventArguments.MailItem; Header header = mailItem.Message.MimeDocument.RootPart.Headers.FindFirst("X-MS-Exchange-Organization-Unjournal-Processed"); Header header2 = mailItem.Message.MimeDocument.RootPart.Headers.FindFirst("X-MS-Exchange-Organization-Unjournal-ProcessedNdr"); if (header != null || header2 != null) { this.evaluationContext.TraceError("This is an unwrapped message from legacy archive journals {0},{1}."); return(false); } if (MailboxRulesAgent.IsJournalNdrWithSkipRulesStamped(mailItem)) { this.evaluationContext.TraceError("Message is destined to journal ndr mailbox. We dont journal messages to journal ndr mailbox as there is a potential of a loop PS 685340, skipping."); return(false); } return(true); }
private void SetCalculatedProperties(MessageItem replayItem) { string text = replayItem[StoreObjectSchema.ItemClass] as string; if (string.IsNullOrEmpty(text)) { return; } bool flag = MailboxRulesAgent.IsSigned(text); replayItem[MessageItemSchema.IsSigned] = flag; bool flag2 = MailboxRulesAgent.IsReadReceipt(text); replayItem[MessageItemSchema.IsReadReceipt] = flag2; }