Start a conversation

Spam not being delivered to sub-folder / Autodiscover Issues

Answer

PROBLEM

Spam is not being delivered to the designated sub-folder in Outlook.

The following errors may also be present in these logs:

MailEssentials (QAS.MTEF.txt)
  • ERROR: AutoDiscover.CertificateValidationCallBack() returns false!
  • ERROR: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
  • INFO: The remote server returned an error: (500) Internal Server Error.
  • Trying GET redirect URL on non-SSL URL ...
  • ERROR: The remote server returned an error: (403) Forbidden.

ENVIRONMENT

  • GFI MailEssentials
  • Exchange 2010 and 2013 only

SOLUTION

Testing the Autodiscovery Service Exchange 2010:

Open the Exchange Management Shell and enter the following: Test-OutlookWebServices | FL

If a test account has not been set up, you will receive the following message:

WARNING: An unexpected error has occurred and a Watson dump is being generated:
Failed to find the mailbox. Mailbox = ‘extest_acddf2d5e4954@my.domain.com’.

To resolve this, you will need to create a test account:
  1. Open an Exchange Management Shell on the Exchange Server.
  2. Change Directory to: ..\Program Files\Microsoft\Exchange Server\V14\Scripts.
  3. Run: .\new-TestCasConnectivityUser.ps1
  4. When asked, type a strong password (Exchange 2010 changes this password automatically at a later time).
  5. You can run the command with a valid email address as well if the above script is not successful:
    • For example, test-outlookwebservices user@domain.com | fl
If the test successfully executes, you should see a long list of test results.

Any resulting in 'Error' need to be resolved before the product is able to locate and access any sub-folder.

Autodiscovery Test Result Examples:

Id : 1019
Type : Information
Message : A valid Autodiscover service connection point was found. The Autodiscover URL on this object is https://domain.com/autodiscover/autodiscover.xml.
RunspaceId : c75d09f1-fe7d-4572-8a8b-798c3ea1ada9

Type : Success
Message : Autodiscover was tested successfully.
RunspaceId : c75d09f1-fe7d-4572-8a8b-798c3ea1ada9

Id : 1104
Type : Error
Message : The certificate for the URL https://domain.com/autodiscover/autodiscover.xml is incorrect.
For SSL to work, the certificate needs to have a subject of domain1.com, instead the subject found is domain2.com.
Consider correcting service discovery, or installing a correct SSL certificate.

Each error result produced must be resolved on a case by case basis.

Below are some articles that may assist with the resolution of these issues:
Testing the Autodiscovery Service Exchange 2013:

You will be prompted for credentials when running the following commands for the user listed in the get-credential domain\alias field


Open the Exchange Management Shell and enter the following:

Test-OutlookWebServices user@domain.com -MailboxCredential (get-credential domain\alias) | fl
result,error


For example for the administrator account:

Test-OutlookWebServices administrator@domain.com -MailboxCredential (get-credential domain\administrator) | fl
result,error


You should see multiple instances of the following:

Result : Success
Error  :

To see the Verbose output run:

Test-OutlookWebServices user@domain.com -MailboxCredential (get-credential domain\alias) | fl 

or pipe it to a text file with

Test-OutlookWebServices user@domain.com -MailboxCredential (get-credential domain\alias) | fl  >auto.txt

To run the command with format table instead of format list run:

Test-OutlookWebServices -identity:user@domain.com -MailboxCredential (get-credential domain\alias) | ft -AutoSize -Wrap MonitoringEventId,Scenario,Result,Error

Sample output:

MonitoringEventId                    Scenario  Result Error
-----------------                    --------  ------ -----
             5001 AutoDiscoverOutlookProvider Success
             5002         ExchangeWebServices Success
             5003         AvailabilityService Success
             5004          OfflineAddressBook Success

For further information on Exchange autodiscover or to troubleshoot errors please visit the following websites:

CAUSE

When the spam filter determines that a message is spam and must be sent to a sub-folder, the following events occur:
  1. The product queries Active Directory for an Exchange Service Connection Point (SCP)
  2. Autodiscover is queried using either the path provided by SCP, or, if that failed, the default Autodiscover path of '/Autodiscover/Autodiscover.xml'
  3. The product then uses the path returned by Autodiscover to connect to the Client Access Server (CSE) via Exchange Web Services (EWS)
  4. The user is impersonated by the service account created during the product install, and the mailbox is accessed. The end result is spam being quarantined.
Spam may not be delivered to the designated sub-folder if any break in this process occurs.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments