Ejemplo n.º 1
0
        protected override void InternalProcessRecord()
        {
            ForeignConnector dataObject = this.DataObject;

            if (dataObject.IsScopedConnector)
            {
                ManageSendConnectors.AdjustAddressSpaces(dataObject);
            }
            base.InternalProcessRecord();
            ManageSendConnectors.UpdateGwartLastModified((ITopologyConfigurationSession)base.DataSession, this.DataObject.SourceRoutingGroup, new ManageSendConnectors.ThrowTerminatingErrorDelegate(base.WriteError));
        }
Ejemplo n.º 2
0
        protected override void InternalProcessRecord()
        {
            DeliveryAgentConnector dataObject = this.DataObject;

            if (this.currentlyEnabled && !dataObject.Enabled && !this.force && !base.ShouldContinue(Strings.ConfirmationMessageDisableSendConnector))
            {
                return;
            }
            ManageSendConnectors.AdjustAddressSpaces(dataObject);
            base.InternalProcessRecord();
            ManageSendConnectors.UpdateGwartLastModified((ITopologyConfigurationSession)base.DataSession, this.DataObject.SourceRoutingGroup, new ManageSendConnectors.ThrowTerminatingErrorDelegate(base.WriteError));
        }
Ejemplo n.º 3
0
        protected override void InternalProcessRecord()
        {
            base.InternalProcessRecord();
            Server server = null;

            try
            {
                server = ((ITopologyConfigurationSession)base.DataSession).FindLocalServer();
            }
            catch (ComputerNameNotCurrentlyAvailableException)
            {
            }
            catch (LocalServerNotFoundException)
            {
            }
            if (server == null || !server.IsEdgeServer)
            {
                ManageSendConnectors.UpdateGwartLastModified((ITopologyConfigurationSession)base.DataSession, base.DataObject.SourceRoutingGroup, new ManageSendConnectors.ThrowTerminatingErrorDelegate(base.ThrowTerminatingError));
            }
        }
Ejemplo n.º 4
0
        protected override void InternalProcessRecord()
        {
            if (this.dashDashConnector && (this.DataObject.IsChanged(MailGatewaySchema.AddressSpaces) || this.DataObject.IsChanged(SmtpSendConnectorConfigSchema.SmartHostsString)) && !this.force && !base.ShouldContinue(Strings.ConfirmationMessageSetEdgeSyncSendConnectorAddressSpaceOrSmartHosts))
            {
                return;
            }
            Exception ex = null;

            if (this.DataObject.DNSRoutingEnabled)
            {
                ex = NewSendConnector.CheckDNSAndSmartHostParameters(this.DataObject);
                if (ex == null)
                {
                    ex = NewSendConnector.CheckDNSAndSmartHostAuthMechanismParameters(this.DataObject);
                }
            }
            if (ex == null)
            {
                ex = NewSendConnector.CheckTLSParameters(this.DataObject);
            }
            if (this.DataObject.TlsCertificateName != null)
            {
                ex = this.ValidateCertificateForSmtp(this.DataObject);
            }
            if (ex != null)
            {
                base.WriteError(ex, ErrorCategory.InvalidOperation, this.DataObject.Identity);
                return;
            }
            NewSendConnector.ClearSmartHostsListIfNecessary(this.DataObject);
            NewSendConnector.SetSmartHostAuthMechanismIfNecessary(this.DataObject);
            ManageSendConnectors.AdjustAddressSpaces(this.DataObject);
            base.InternalProcessRecord();
            if (!TopologyProvider.IsAdamTopology())
            {
                ManageSendConnectors.UpdateGwartLastModified((ITopologyConfigurationSession)base.DataSession, this.DataObject.SourceRoutingGroup, new ManageSendConnectors.ThrowTerminatingErrorDelegate(base.ThrowTerminatingError));
            }
        }
Ejemplo n.º 5
0
 protected override void InternalProcessRecord()
 {
     base.InternalProcessRecord();
     ManageSendConnectors.UpdateGwartLastModified((ITopologyConfigurationSession)base.DataSession, base.DataObject.SourceRoutingGroup, new ManageSendConnectors.ThrowTerminatingErrorDelegate(base.WriteError));
 }
Ejemplo n.º 6
0
        protected override void InternalProcessRecord()
        {
            SmtpSendConnectorConfig dataObject = this.DataObject;

            if (!TopologyProvider.IsAdamTopology() && !dataObject.Enabled && !this.force && !base.ShouldContinue(Strings.ConfirmationMessageDisableSendConnector))
            {
                return;
            }
            Exception ex = null;

            if (dataObject.DNSRoutingEnabled)
            {
                ex = NewSendConnector.CheckDNSAndSmartHostParameters(this.DataObject);
                if (ex == null)
                {
                    ex = NewSendConnector.CheckDNSAndSmartHostAuthMechanismParameters(this.DataObject);
                }
            }
            if (ex == null)
            {
                ex = NewSendConnector.CheckTLSParameters(this.DataObject);
            }
            if (ex != null)
            {
                base.WriteError(ex, ErrorCategory.InvalidOperation, this.DataObject.Identity);
                return;
            }
            NewSendConnector.ClearSmartHostsListIfNecessary(this.DataObject);
            NewSendConnector.SetSmartHostAuthMechanismIfNecessary(this.DataObject);
            if (dataObject.IsScopedConnector)
            {
                ManageSendConnectors.AdjustAddressSpaces(dataObject);
            }
            base.InternalProcessRecord();
            ITopologyConfigurationSession topologyConfigurationSession = (ITopologyConfigurationSession)base.DataSession;
            SmtpSendConnectorConfig       smtpSendConnectorConfig      = null;

            try
            {
                smtpSendConnectorConfig = topologyConfigurationSession.Read <SmtpSendConnectorConfig>(this.DataObject.OriginalId);
            }
            catch (LocalizedException exception)
            {
                base.WriteError(exception, ErrorCategory.ReadError, this.DataObject);
                return;
            }
            RawSecurityDescriptor originalSecurityDescriptor = smtpSendConnectorConfig.ReadSecurityDescriptor();
            RawSecurityDescriptor rawSecurityDescriptor      = null;

            try
            {
                rawSecurityDescriptor = this.ConfigureDefaultSecurityDescriptor(originalSecurityDescriptor);
            }
            catch (LocalizedException exception2)
            {
                base.WriteError(exception2, ErrorCategory.InvalidOperation, this.DataObject);
                return;
            }
            if (rawSecurityDescriptor != null)
            {
                topologyConfigurationSession.SaveSecurityDescriptor(this.DataObject.OriginalId, rawSecurityDescriptor);
            }
            if (!TopologyProvider.IsAdamTopology())
            {
                ManageSendConnectors.UpdateGwartLastModified(topologyConfigurationSession, this.DataObject.SourceRoutingGroup, new ManageSendConnectors.ThrowTerminatingErrorDelegate(base.ThrowTerminatingError));
            }
        }