Exchange 2016: TransportRoles\data\Temp\UnifiedContent directory clutters up the hard disk

An interesting problem was pointed out to me today. A reader reported the directory "TransportRoles\data\Temp\UnifiedContent" within the Exchange installation directory, which contains a lot of data and keeps filling up the hard disk.

I then had a look at my private installation and was also able to find some very old data in the relevant directory. Here is a screenshot of the "TransportRoles\data\Temp\UnifiedContent" directory:

UnifiedContent

The directory can be found under the path "$exinstall\TransportRoles\data\Temp\UnifiedContent"

cd $exinstall\TransportRoles\data\Temp\UnifiedContent

In my case, only a few hundred MB were stored there, but in the reader's case it was around 60 GB. The question "Can this go away?" is justified, especially if you are a little short of storage space.

The "Malware Agent" transport agent is responsible for the directory:

UnifiedContent

The agent is part of Exchange's built-in malware scanner and it stores a copy of every scanned mail in the directory mentioned. In principle, every mail with an attachment ends up in the directory.

Unfortunately, Exchange does not seem to clean this up, or the limits are very high. However, the directory can also be cleaned up manually. So if you find a lot of files here, you can delete the contents of the directory to create space again.

To the question "Can it go away?": Yes, it can go away and the malware agent with it...

In my opinion, the built-in Exchange AntiMalware Agent is not very effective. If an upstream SPAM filter is already scanning for viruses and malware, then the probability of the Exchange Malware Agent recognizing a malicious mail that has slipped through the SPAM filter is almost zero. Here I once had a simple test carried out.

Switching off the malware agent can be done with the following commands, here the transport service is also restarted, therefore no mails can be received for the period of the restart (normally not critical, as the service restarts quickly and mails end up in queues accordingly):

cd $exscripts
.\Disable-Antimalwarescanning.ps1
Restart service MSExchangeTransport

UnifiedContent

For the sake of completeness, the Malware Agent can also be reactivated:

cd $exscripts
.\Enable-Antimalwarescanning.ps1
Restart service MSExchangeTransport

10 thoughts on “Exchange 2016: Verzeichnis TransportRoles\data\Temp\UnifiedContent müllt Festplatte zu”

  1. In our environment, the malware agent is disabled, but still the files keep generating.

    Our Environment Exchange 2016 (CU6) with Hybrid configured
    I have code two exchange rules installed on the on-prem servers. Tried disabling the CodeTwo agent, but no help
    Tried disabling the AV, no help

    Reply
  2. Hallo,

    kann es sein dass bis CU18 (jedenfalls bei mir) die Temporären Dateien nicht im Ordner …TransportRoles\data\Temp\UnifiedContent sondern nur im Ordner …TransportRoles\data\Temp abgelegt werden? Dort habe ich 1.500 Dateien liegen mit dem Datum Installation ExchangeSP1 bis Datum Update CU18. Mit CU18 wurde der Ordner …\UnifiedContent erstellt. Dort sind nur paar aktuelle Dateien drin.
    Kann ich also bedenkenlos die Dateien im Ordner …\Temp löschen? Oder sind die in irgendeiner Datenbank vermerkt?

    Danke und viele Grüße

    Reply
  3. Hallo, ich habe auch jede Menge Files in TransportRoles\data\Temp\UnifiedContent, aber Disable Antimalwarescanning bringt keine Reduzierung der Files….

    Reply
  4. Hallo, ich habe auch jede Menge Files in TransportRoles\data\Temp\UnifiedContent, aber Disable Antimalwarescanning bringt Reduzierung der Files….

    Reply
  5. …der Ordner ist bei mir vollkommen leer. Vllt, weil ich bei der Installation schon den Antimaleware abgewählt habe?

    Reply
  6. Hallo und Danke für den Hinweis.
    Bei uns hat das in einem Jahr nur zu 3 Dateien und ca. 10 MB gereicht?!
    Irgendwie scheint das Konfigurationsabhängig zu sein…
    Oder wird es bei der Sicherung mit göscht?
    Aber gut zu wissen,
    Danke, Gruß Thomas

    Reply

Leave a Comment