I recently moved hMailServer to a new server. I'm running 5.6.7 - Build 2425, on Win Server 2019, with SQL Express 2019. The hMail service is running as the Local System account.
I've been running it for many years, without a problem, on an old server. Now that I've moved it to the new server, I'm getting an odd error:
"ERROR" 8336 "2020-04-13 09:10:08.425" "Severity: 2 (High), Code: HM4208, Source: ExceptionHandler::Run, Description: An error occured while executing 'Task-DeliveryTask'"
This error gets written to the logs on a regular basis while email is being sent out. It also creates a dump file:
"ERROR" 8348 "2020-04-13 06:05:17.287" "Severity: 1 (Critical), Code: HM5519, Source: StackLogger::Log, Description: An error has been detected. A mini dump has been written to D:\hMailServer\Logs\minidump_2020-04-13 060517_{AFF7BEE5-EF53-495D-9620-54D1DB51BF1B}.dmp"
The messages that cause the error then get added to the Delivery Queue, with a "Next try" time of ASAP. They then never go out. If I try to manually send one, it sets a "Next try" time of that moment, and then never sends. Most likely because the referenced .eml file doesn't actually exist on the server...
I copied my config over from the older, much slower server, where it ran fine for years. I have AV scanning disabled on hMail's Data and Temp folders, but also tried disabling AV altogether. It didn't help. One thing I haven't tried yet is completely uninstalling AV. Note that I don't have AV enabled within hMailServer.
I tried lowering the performance threading settings. Running 10, 10, 15 right now. I believe I had it at 25, 75, 15 before. No difference.
I took a look at one of the dump files, but didn't get much from it, other than that a memory pointer could not be read. It looks like the error may be related to ntdll!NtWaitForSingleObject.
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
I'll run a memory diagnostic the next time I can take the server down, but I had run one before setting this server up, so I don't think that is the issue.
I enabled DEBUG logging, and see this, which makes me think it's a DKIM issue. Many emails get signed just fine, though...
Code: Select all
"DEBUG" 8252 "2020-04-13 09:55:47.952" "Executing task DeliveryTask in work queue SMTP delivery queue"
"DEBUG" 8252 "2020-04-13 09:55:47.952" "Delivering message..."
"DEBUG" 8252 "2020-04-13 09:55:47.953" "Applying rules"
"DEBUG" 8252 "2020-04-13 09:55:47.953" "Performing local delivery"
"DEBUG" 8252 "2020-04-13 09:55:47.954" "Local delivery completed"
"DEBUG" 8252 "2020-04-13 09:55:47.954" "Signing message using DKIM..."
"ERROR" 8252 "2020-04-13 09:55:47.993" "Severity: 2 (High), Code: HM4208, Source: ExceptionHandler::Run, Description: An error occured while executing 'Task-DeliveryTask'"
"DEBUG" 8252 "2020-04-13 09:55:47.993" "Logging exception.."
"DEBUG" 8252 "2020-04-13 09:55:47.994" "Minidump creation aborted. The max count (10) is reached and no log is older than 4 hours."
"DEBUG" 8252 "2020-04-13 09:55:47.994" "Completed logging of exception..."
Thanks!