Problems with Declude
Problem reported by Miguel Enrique - 9/13/2023 at 4:32 AM
I use Declude with SmarterMail.

Since I switched to a new computer and installed the latest version of SmarterMail, almost every day I find an email (one or two), with only the eml extension, in the spool/proc folder. Reviewing the delivery log, I find this with each email:

[2023.09.13] 06:20:21.356 [27799667] Error adding message to spool stat tracker: Could not find file 'D:\SmarterMail\Spool\x27799667.eml'.
[2023.09.13] at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at SmarterMail.Standard.Network. MIME.MimeHelper.OldMime.MimeReader.LoadHeader() at MailService.RelayServer.DeliveryManager.AddToSpoolStatTracker(SpoolMessage spoolMessage)06:20:21.356 [27799667] Exception: System.IO.FileNotFoundException: Could not find file 'D:\SmarterMail\Spool \x27799667.eml'.
[2023.09.13] File name: 'D:\SmarterMail\Spool\x27799667.eml' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileInfo.get_Length() at MailService.RelayServer. SpoolMessage.get_Message() at MailService.RelayServer.DeliveryManager.ViolatesSizeLimit(SpoolMessage spoolMessage) at MailService.RelayServer.DeliveryManager.ProcessMessage(SpoolMessage spoolMessage, Dictionary`2& timings) at MailService.RelayServer.DeliveryManager.DeliverMessages()

Smartermail has found an hdr without eml.

Checking file access with Process Monitor, I see that Declude stores the hdr first and then the eml in the “spool” folder. I thought this might be the problem, but really what happened is that I have the eml file in the spool/proc folder and the hdr has disappeared, so I must think that declude failed when moving the file from spool/proc to spool. There is no declude exception (File C:\DECLUDE.GP1) nor is there anything in the declude logs that indicates a problem with that email.

Declude does not have its antivirus activated, and Windows Defender is configured with the exclusions from the document that I indicate below, changing the folder to D:\SmarterMail\Domains and adding the eml extension. I haven't seen Windows Defender access hdr or eml files with Process Monitor.

Should I remove the eml extension from Windows Defender exclusions?

SmarterMail must have deleted the hdr as the eml does not exist. I'm currently manually creating the hdr file for the email to process, but it's a pain.

Is it safe to send the eml file by moving it to the Spool\Drop folder?

Should I forget about using Declude with the latest versions of SmarterMail?

Thank you.
Miguel Enrique.
Mon Mariola, S.L.

5 Replies

Reply to Thread
Miguel Enrique Replied

I stated the problem poorly.

Today I have unsent files again and the same error in the delivery log.
What I have is the orphaned eml file (without hdr) left in the "\SmarterMail\Spool" folder.
Declude successfully moves the eml file from the "\SmarterMail\Spool\proc" folder to the "\SmarterMail\Spool" folder.
So the problem is that SmarterMail processes the hdr before Declude has saved the eml in the "spool" folder and shows the error.

I know that the problem is with Declude since it saves the hdr before the eml. This can be seen in the Process Monitor screen dump I sent in the previous message.

There may be several reasons that cause this problem that did not occur previously:

- On modern computers SmarterMail processes the hdr before Declude has saved the eml, due to the higher speed of the processors.

- In some SmarterMail update, the spool processing system was changed. Currently the hdr is verified and if the eml does not exist, the eml is deleted. This verification may not have been performed previously.

Whatever the reason, SmarterTools can take this issue into account and add a solution. I'm sure the team can find a simple solution.

Miguel Enrique
Mon Mariola, S.L.
YS Tech Replied
I had to turn Declude off today as it had stopped delivering all messages to the spool.
It had been running fine until today.

I also ran the hijack/release tool just in case that was the issue and tried to restart Declude, to which Declude never stopped.

I've moved all the emails into the spool now, and they've been delivered.
My last Declude log entry was:
09/21/2023 01:00:47.172 17704490 (Error 5 at 77d82cd5 v4.12.11)
09/21/2023 01:00:47.188 17704490 (log part 2 saved as *:\declude.gp2)
09/21/2023 01:00:47.188 17704490 (log part 1 saved as *:\declude.gp1)

And looking at those logs I get this:

09/21/2023 01:00:47.188    
(Error 5 at 77d82cd5 v4.12.11)
(attempt to write at 24)
(77D82CD5 012B5F00 (00000020 0043B460) *:\****\*****\ntdll.dll)
(0043E3E5 012B5F18 (00000000 00000000) *:\*****\decludeproc.exe)
17704490 Processing .RAR file *:\****\Spool\proc\work\17704490.vir\0.rar

I can't find any info on these errors, so no idea what the issue is, maybe something to do with its anti-virus?
Kyle Kerst Replied
Employee Post
I did a quick test of our latest public release against Declude in-house, but wasn't able to replicate issues involving processing of the HDR, or the exceptions you're seeing that are hanging up your spool. I recommend getting a ticket submitting with MBF/Declude on this to see if they can narrow down where the problem might be coming from. As always please don't hesitate to reach out here if we can help as well!
Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
YS Tech Replied
I've updated SM to the latest release (I was 2 behind), hashed out "ALLOWVULNERABILITY" settings in virus.cfg.
Restarted the server completely and it's all running ok now with declude enabled again.
Keeping an eye on it now though.
Kyle Kerst Replied
Employee Post
That is great to hear!
Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com

Reply to Thread