none
Copying all inbound/outbound emails from exchange server. RRS feed

  • Question

  • Few Questions

    1. How Can I (Programitically or ByConfiguration) save a copy of any inbound/outbound email on Harddisk?

    2. or Can i retrieve entire email file (.eml or .msg) and send it to some kind of custom service.

    Basically I want to write some kind of plugin that would sit on exchange server and give me control over inbound/outbound mails.

    Any alternate directions/suggestions?

    Regards
    Jiya Desai.

    Friday, December 9, 2011 10:24 AM

All replies

  • Hi,

    you are able to enable pipelinetracing. in this case all Mailtraffic is stored in the recipient mailbox and a local harddisk.

    In order to enable pipelinetracing do the following:

    Set-TransportServer Server1 -PipelineTracingPath "C:\Pipeline Tracing Logs"
    


    You have to execute this command an each transportserver.

     


    regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
    Friday, December 9, 2011 11:16 AM
  • Hi Thomas,

    Sorry, I should have given little background.  I am a C# programmer and not an Administrator, so i know nothing about

    exchange server from admin prospective. 

    We only have one exchange server 2007 in our office and all outlook clients are configured to read mails from it.

     

    Essentially what i want to achieve is to able to read realtime inbound/outbound traffic on exchange server. and I should be able to access entire email contents, not necessary in object format, even if we receive email content in .eml format or .msg format , it will do for us.

    Regards
    Jiya.

     



    • Edited by JiyaDesai Friday, December 9, 2011 1:44 PM
    Friday, December 9, 2011 1:32 PM
  • Hi Thomas,

    Sorry, I should have given little background.  I am a C# programmer and not an Administrator, so i know nothing about

    exchange server from admin prospective. 

    We only have one exchange server 2007 in our office and all outlook clients are configured to read mails from it.

     

    Essentially what i want to achieve is to able to read realtime inbound/outbound traffic on exchange server. and I should be able to access entire email contents, not necessary in object format, even if we receive email content in .eml format or .msg format , it will do for us.

    Regards
    Jiya.

     



    Hi,

    You can write an Exchange Transport Agent, which can sit on either Exchange Hub Transport Server or Exchange Edge Transport server, depending upon your need. All inbound and outboud emails are processed by Edge transport server, and internal emails (sent from internal user to internal recipient) doesnt pass through Edge server.

    You can write an ETA using Exchange Transport Agent SDK:

    http://www.microsoft.com/download/en/details.aspx?id=13156

    which also contains Sample ETA projects to start your task.

    Regards,


    Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
    Friday, December 9, 2011 3:00 PM
  • Hi Jiya,

    thats great, but why reinvent the wheel a second time. Try using the remote Powershell feature from your C# code.

    If you need further information the article on the Exchange Team Blog may help: http://blogs.technet.com/b/exchange/archive/2009/11/02/3408653.aspx

     

     


    regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
    Friday, December 9, 2011 10:14 PM
  • Using a transport agent is clearly the logical choice.

    Pipeline tracing is good for troubleshooting but it generates too much data (multiple copies of each message), each email is dropped into a new subdirectory and you need to specify the (singular) sender address. It's also a potential security risk esp if you're using it on an Edge server.

    Using an agent you can handle the emails however you like, extract only the ones you want (from / to whatever addressed you want), extract to disk or log them to a SQL database, you could even stream them over a named pipe - whatever you need to do to get the data to your custom service (which doesn't need to even be on the same server then). You can even grab specific data from the email for your custom service (like perhaps just the attachments ... or only the message body) so that you're not logging the whole email to a drive.

    Cheers,

    Scott Quinn

     

    • Proposed as answer by Scott Quinn Saturday, March 24, 2012 5:48 AM
    Saturday, December 10, 2011 2:26 AM