1
Custom headers service issue with orphaned hdr files
Problem reported by echoDreamz - 2/28/2018 at 4:03 PM
Submitted
We had this issue with Declude as well (which we blamed on them), but using the custom headers service, with no changes, simply compile, install the service, start. SM leaves behind at random .hdr files. I let it run for an hour or so and within that time, SM left behind over 1500 .hdr files. It does not clean them up, not sure why it does not remove them.
 
I am wondering if it is something to do with the service moving the files to the drop directory at the same time the SM service is trying to pick up the files. Which either results in SM not seeing the .hdr file or trying to read it while the service that moved the file has not yet released the file.
 
Which makes me wonder if 1. Does SM even read the HDR file? If not, what does that mean for that email? 2. If SM fails to delete, maybe retry?
 
I can make the service delete the stale files, but why... I am assuming it is some timing issue with SM reading the directory and the custom headers service moving the files into the directory, since SM does not leave orphaned .hdr files in the regular spool directories.

4 Replies

Reply to Thread
0
echoDreamz Replied
So after almost 24 hours of running, there are almost 18000 orphaned .hdr files in the drop directory. I do not believe this is related to the SM custom headers service directly, even if I move an email manually (using copy paste in explorer) or through command line, it still happens. It seems like 1 out of every 3 emails or so leaves behind an orphaned .hdr file.
0
echoDreamz Replied
So another 48 hours and we are nearly at 50,000 orphaned .hdr files. SmarterMail really needs some work with this. After a week, I am sure there would be half a million files, easily. After a month, probably 2 million files...
0
echoDreamz Replied
So after some further checking, it appears that every single one of the orphaned .hdr files first line is "Failed". Not sure what this means exactly.

I disabled the spool proc service, let it run for ~3 minutes to generate some new .hdr files in the proc directory and I see some hdr files being written with "failed" as the first line. So it doesnt seem to be related to the headers service.
0
Matt Petty Replied
Employee Post
Seeing failed in the top line of an HDR file means that there was an issue with the session in SMTP. Either it took too long, was prematurely disconnected, or was rejected by the server for some reason. We have a process that runs through and cleans these up. These not clearing out may have something to do with the spool issues you were having. It would be interesting to know if it is still stacking up or if our cleanup process, which is part of the spool processing loop, is acting up.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com

Reply to Thread