Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG:EXOTransportConfig :System.InvalidOperationException|Before you create a journal rule #5606

Open
CovidtheDog2024 opened this issue Jan 7, 2025 · 6 comments · May be fixed by #5851
Open

Comments

@CovidtheDog2024
Copy link

Description of the issue

Hi MVP,
Please review this error and assist with the resolution. Thank you!

WorkLoad : Exchange
Resource : System.InvalidOperationException|Before you create a journal rule
Error : The error occurred during export.

Microsoft 365 DSC Version

1.24.1218.1

Which workloads are affected

Exchange Online

The DSC configuration

EXOTransportConfig "EXOTransportConfig"
        {
            AddressBookPolicyRoutingEnabled         = $False;
            AllowLegacyTLSClients                   = $False;
            ClearCategories                         = $True;
            ConvertDisclaimerWrapperToEml           = $False;
            Credential                              = $Credscredential;
            DSNConversionMode                       = "PreserveDSNBody";
            ExternalDelayDsnEnabled                 = $True;
            ExternalDsnLanguageDetectionEnabled     = $True;
            ExternalDsnSendHtml                     = $True;
            HeaderPromotionModeSetting              = "NoCreate";
            InternalDelayDsnEnabled                 = $True;
            InternalDsnLanguageDetectionEnabled     = $True;
            InternalDsnSendHtml                     = $True;
            IsSingleInstance                        = "Yes";
            JournalingReportNdrTo                   = "<>";
            JournalMessageExpirationDays            = 0;
            MaxRecipientEnvelopeLimit               = "Unlimited";
            ReplyAllStormBlockDurationHours         = 6;
            ReplyAllStormDetectionMinimumRecipients = 2500;
            ReplyAllStormDetectionMinimumReplies    = 10;
            ReplyAllStormProtectionEnabled          = $True;
            Rfc2231EncodingEnabled                  = $False;
            SmtpClientAuthenticationDisabled        = $True;
        }

Verbose logs showing the problem

System.InvalidOperationException|Before you create a journal rule, you must specify an email account to receive        journal reports that can't be delivered to the journal destination. To do this, click OK. On the Journal rules page,    select an email address to send undeliverable journal reports to. Browse to select a mailbox in your organization or    an external contact to receive the undeliverable reports.

Environment Information + PowerShell Version

Get-ComputerInfo -Property @(
'OsName',
'OsOperatingSystemSKU',
'OSArchitecture',
'WindowsVersion',
'WindowsBuildLabEx',
'OsLanguage',
'OsMuiLanguages')

$PSVersionTable


OsName               : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.22621.4391
Name  : PSVersion

Key   : PSEdition
Value : Desktop
Name  : PSEdition

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name  : PSCompatibleVersions

Key   : BuildVersion
Value : 10.0.22621.4391
Name  : BuildVersion

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion
@FabienTschanz
Copy link
Collaborator

@CovidtheDog2024 I can't reproduce the issue if I export a EXOTransportConfig resource. Do you still receive the error?

@ricmestre
Copy link
Contributor

This problem is common when you try to create or update the policy, it actually took me ages trying to figure out how to fix it, but it's definitely not an issue doing the export as far as I recall.

@FabienTschanz
Copy link
Collaborator

@ricmestre By any chance, do you remember how to fix it or why the error message appears? I‘m not very familiar with Exchange.

@ricmestre
Copy link
Contributor

I must have found some article to do it via the admin portal and that's how I fixed it, but probably it's just a matter of using M365DSC to define JournalingReportNdrTo, as seen in the config provided it's empty <>, this other article I just found [0] explains this in detail.

[0] https://support.microsoft.com/en-us/topic/transport-and-mailbox-rules-in-exchange-online-or-on-premises-exchange-server-don-t-work-as-expected-8729e935-4b04-f849-5998-0a5074d594e8

@FabienTschanz
Copy link
Collaborator

@CovidtheDog2024 After further review, the error message is pretty clear. You have to set an email address in the JournalingReportNdrTo property so that journal rules can be created. This can be done in the Microsoft Purview portal under Solutions --> Data Lifecycle Management --> Exchange (legacy) --> Settings.

Image

Image

@CovidtheDog2024
Copy link
Author

Hi @FabienTschanz ,

Thank you!
Its working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants