Office 365 and Transport Agents

On an Exchange 2013 server I can create an smtpReceiveAgent transport agent to perform the task shown on this page, which is this c# code (VB code is also available on the webpage): -

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Exchange.Data.Transport;
using Microsoft.Exchange.Data.Transport.Smtp;

namespace MyAgents
{
    public sealed class MyAgentFactory : SmtpReceiveAgentFactory
    {
        public override SmtpReceiveAgent CreateAgent(SmtpServer server)
        {
            return new MyAgent();
        }
    }
    public class MyAgent : SmtpReceiveAgent
    {
        public MyAgent()
        {
            this.OnEndOfData += new EndOfDataEventHandler(MyEndOfDataHandler);
        }
        private void MyEndOfDataHandler (ReceiveMessageEventSource source, EndOfDataEventArgs e)

        {
            // The following line appends text to the subject of the message that caused the event.
            e.MailItem.Message.Subject += " - this text appended by MyAgent";
        }
    }
}

How can I do something similar on my Office 365 Exchange implementation?

Thanks, Paul.

September 3rd, 2015 6:34am

Answered: Transport agents in Exchange 2013: "Transport agents are available in versions of Exchange starting with Exchange 2007. Transport agents are not supported in Office 365 or Exchange Online."

Here's what I actually want to do: - If an outgoing email 'To' address matches a pattern, block the email and immediately inform the sender.

I am unable to use Transport Rules/DLP because of a customer issue.

Thanks,

Paul.

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 7:03am

You can't do anything on the Office365 servers outside of Transport Rules and DLP which is the best way to solve the problem your talking about.  How third parties are implementing solutions is though Connectors https://technet.microsoft.com/en-us/library/ms.exch.eac.connectorselection(v=exchg.150).aspx  eg https://www.exclaimer.com.au/exclaimer-cloud/signatures-for-office-365/technical . (but this then requires you have your own servers to the process the messages).

Cheers
Glen

September 4th, 2015 1:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics