Overview
After upgrading from GFI MailEssentials 2012 to 2015, all emails go to the FailedMails folder (...\MailEssentials\EmailSecurity\FailedMails).
The GfiAvRoutingAgent log records the following error:
"error ","GfiAvRoutingAgent","error Initializing Scan Engine...EXCEPTION: System.InvalidCastException: Unable to cast COM object of type 'GFISCANLib.ScanEngineClass' to interface type 'GFISCANLib.IScanEngine'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{BF1F2D3D-97EB-4495-83F4-3D63A86E3BA7}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155). ; at GFISCANLib.ScanEngineClass.Init(IPropertyBag pBag, UInt32& pContext) ; at MEC.ExchangeAgents.ItemSourceContext.__initScanEngine(IScanEngine& ppScanEngine, UInt32& pulScanEngineContext, UInt32& pulScanEngineUsn)" "error ","GfiAvRoutingAgent","error ItemSourceContext::initScanEngine,__initScanEngine...FAILED: 80040205" "error ","GfiAvRoutingAgent","error Restarting Scan Engine...FAILED: 80040205" "error ","GfiAvRoutingAgent","error: Failed to scan mail: 80040205"
Environment
GFI MailEssentials 2012 to 2015 upgrade.
Root Cause
When upgrading to GFI MailEssentials 2015, a registry key is left behind that causes the above errors in the GfiAvRoutingAgent logs. This may also be caused by a bad registration of the GFI AV Scan Engine service in the Windows Registry.
Resolution
- Stop mail flow by:
- Stopping the SMTP/Exchange Transport service.
- Disabling and stopping the GFI MailEssentials Attendant service (All GFI Services should then stop).
- Open the registry editor and search for the following key:
{BF1F2D3D-97EB-4495-83F4-3D63A86E3BA7}
- Export the key (to back it up as a precaution) and then Delete it.
- Set the GFI Attendant Service to Automatic and start all GFI MailEssentials Services that were stopped in step 1. Start the SMTP/Exchange Transport service.
- Use the following article to re-process the failed emails:
If this does not resolve the issue, follow these steps to remove and re-add the GFI AV Scan Engine:
- Launch a Command Prompt and browse to the following folder ..\GFI\MailEssentials\EmailSecurity
- Run the command:
GFIScanM.exe /UnregServer
- Run the command:
GFIScanM.exe /Service
- Confirm the service is present in Services.msc.
If the issue is still not resolved, please contact GFI Customer Support for assistance.