void ProcessMessage(IncomingMessage message) { if (message.Sender == null) { throw new AgentException(AgentError.NoSender); } if (!message.HasRecipients) { throw new AgentException(AgentError.NoRecipients); } message.EnsureRecipientsCategorizedByDomain(m_managedDomains); if (!message.HasDomainRecipients) { throw new AgentException(AgentError.NoDomainRecipients); } // // Map each address to its certificates/trust settings // this.BindAddresses(message); // // Decrypt the message, extract the signature and original content // this.DecryptSignedContent(message); // // The standard requires that the original message be wrapped to protect headers // message.Message = this.UnwrapMessage(message.Message); this.ValidateRoutingHeaders(message); // // Enforce trust requirements, including checking signatures // m_trustModel.Enforce(message); // // Remove any untrusted recipients... // if (message.HasDomainRecipients) { message.CategorizeRecipientsByTrust(m_minTrustRequirement); } if (!message.HasDomainRecipients) { throw new AgentException(AgentError.NoTrustedRecipients); } // // Some recipients may not trust this message. Remove them from the To list to prevent accidental message delivery // message.UpdateRoutingHeaders(); }
void ProcessMessage(IncomingMessage message) { if (message.Sender == null) { throw new AgentException(AgentError.NoSender); } if (!message.HasRecipients) { throw new AgentException(AgentError.NoRecipients); } message.EnsureRecipientsCategorizedByDomain(m_managedDomains); if (!message.HasDomainRecipients) { throw new AgentException(AgentError.NoDomainRecipients); } // // Map each address to its certificates/trust settings // this.BindAddresses(message); // // Decrypt the message, extract the signature and original content // this.DecryptSignedContent(message); // // The standard requires that the original message be wrapped to protect headers // message.Message = this.UnwrapMessage(message.Message); this.ValidateRoutingHeaders(message); // // Enforce trust requirements, including checking signatures // m_trustModel.Enforce(message); // // Remove any untrusted recipients... // if (message.HasDomainRecipients) { message.CategorizeRecipientsByTrust(m_minTrustRequirement); } if (!message.HasDomainRecipients) { throw new AgentException(AgentError.NoTrustedRecipients); } // // Some recipients may not trust this message. Remove them from the To list to prevent accidental message delivery // message.UpdateRoutingHeaders(); }