Page 1 of 1

hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 17:40
by rob2k2
Hello - Love hmailserver.. longtime user of it.

I started to have issues though back in 2014 or 2015 probably.. before that it was extremely stable.. I was on 5.4 for along time.. don't remember which build.. Every now and then I would get a hang on smtp delivery.. (both incoming and outgoing). This would happen like twice a year maybe.. i have configured alerts for this so i would be notified.. i would either reboot the server - or restart the service (usually trying to restart hmailservice wouldn't work.. it would just hang i think). Anyway that was awhile ago.. No big deal.

Since then.. about the last 6 -8 months if i recall correctly - I upgraded the way i scan emails. The clam av route (using clamwin updates) instead of clamwin regular install as cpu usage was just too high and the server would get busy at times... i think i was using 2 delivery threads.. back then.. so it didn't matter too too much.... Anyway i finally am happy with the clamav route i'm using now.. this process took awhile as i had tried a few different methods with different results. I'm happy with the way it is working and it has reduced cpu usage considerably. Going back to clamwin scanning isn't really an option.. we just have too many messages to process and trying to run other stuff on the server is impossible when clamwin is hogging all the CPU..

Since this change I believe - I've been plagued with this new issue for sometime.. The delivery service just stops working with no errors in log.. I'll give some examples below.. then SMTP queue fills up.. the incoming smtp never stops working though / pop & Imap continue as normal as well. Usually I get a call from a user asking if something is wrong as they haven't received an email. when i check sure enough.. delivery queue is stopped again. This is a problem for me as i never know when it stops working; hours could go by .. (until someone notices) .. and currently i have no way of notifying myself. I usually reboot the server i've never tried restating the service.. probably should be doing that. I do get a mindump crash.. not when the deliverytask goes away.. only when i reboot the server..

It happens randomly.. every 15 - 30 days. My guess was the delivery threads were not exiting..and slowly i would loose a thread.. So i increased delivery threads to see if it would make the server stay up longer.. but it didn't.. I'm not sure how to confirm if this is happening but i'd like too..(have to look into this).. I'm not sure this is the case.. i've already doubled my delivery threads.. and the problem has happened.. in a shorter period of time then the last time it happened.. This isn't really conclusive though.. i have it up now to 10 from 8 from 4 now.. see how long it lasts now.. i guess..

Here are some things i've tried to work on to resolve the issue on my own before posting here:

i've tweaked mysql.. gave it more buffer.. and various other tweaks.. I've also updated my mysql database 5.5.62 (not major revision - mysql) Also Dozens of windows updates i'm sure. I'm on server 2k12 / (vm environment). I've also like ran the usual table cleanups.. or whatever maintenance from workbench.. I've played with some newer versions on a test vm.. and experimented with upgrading.. but my control panel breaks if try to go to a newer version of mysql.. unfortunately.. so i'm unable to upgrade to anything higher at this time (mysql for now)

I've upgraded hmail to 5.6.7-B2425 / Adjusted performance settings.. cache is enabled.. threading (command/delivery/async) is was set to 10 / 4 / 4.. Tried 10 / 8 / 4 .. now i'm on 15 / 10 / 15.. (worker thread is normal). I tried message indexing on and off.. We only handle a 1000 messages a day max.. and maybe 100 imap connections or so.. 10 pop.. I may try going back to lower settings.. My fear is if an account is compromised its just giong to send out more spam.. if i set these higher.. i have vbscripts to help notify me if sent message exceed a threshold.. which has worked for me in the past with some success.. then its just more blacklists to try and get removed off of later if these settings are higher.. and more spam is sent (not idea).. Since autoban.. and better password management i'm happy this doesn't happen much or not at all in a couple years.. ; If i do keep this number higher though.. should give me more time between reboots if i'm loosing delivery threads though.. i guess.. maybe..

Some more detail: Hyper-v environment - I've allocated more memory to my vm.. its sits around 60 -70% usage.. Using dynamic memory allocation.. 2.5 min 9k max - currently its using 4.5k (i've just increased the memory buffer to 60% originally at 50% then to 55%). I find with some VM's this helps with performance (with large fluctuating memory requirements).. i've been thinking about ditching dynamic memory.. but i run other vms so it helps to have it on dynamic and its more efficient. Memory weight is high.. more then 2/3 the way ; I don't think it has anything to do with memory usage or how its assigned though personally..

Whats going on with Ports?
Lets talk about ports for a second.. I've had some really weird issue with port usage in the past.. on this vm server in particular.. in the past like on hmail 5.4 - number of open sessions was out of wack all the time.. like smtp would always show like way more open sessions same with pop and imap.. It's like they weren't closing.. until you restarted the service or server.. restarting the service would usually just hang in the past.. server reboots were chosen usually because they were faster to resolve the issue.. Since the upgrade to 5.6.7 i can honestly say this issue seems resolved. The open sessions reported seem to be accurate.. all the time now which is great..
If i run like TCP view it matches what hmailserver is reporting..

Onto the logs:
okay in my error log.. i get this about 5 - 10 times a day.. not likely related.. but haven't really investigated.. i think it's' one of my vbscripts.. which are working for the most part.. but this error is in there all the time everyday..
"ERROR" 2212 "2019-05-03 00:37:30.247" "Script Error: Source: Microsoft VBScript runtime error - Error: 800A0005 - Description: Invalid procedure call or argument: 'Mid' - Line: 95 Column: 2 - Code: (null)"
I dont' think its related - the delivery queue only goes away once or twice a month. Other then that there is nothing useful in the error log.. i do get a bunch of this after I get the delivery queue stops working error.. and the server restarts :
"ERROR" 2228 "2019-05-03 08:35:00.362" "Severity: 3 (Medium), Code: HM5406, Source: ClamAVVirusScanner::Scan, Description: Unable to connect to ClamAV server at 127.0.0.1:3310."
But this is because the clamav service hasn't started yet server just rebooted.. and hmail is already working through the queue..

I also get a mindump file created - but this is when the server restarts.. not when the problem happens.. so don't' think it will be useful. but i could send it.. if you want to take a look..

anyway onto the daily logs.. i've been thinking about turning off my logging.. i run a daily log.. and i run a script that deletes them after a month or so.. but the logs are huge.. i had to turn off imap logging because they were over 100 mbs a day.. maybe this will help if i do this..

honestly there is nothing useful in the logs that i can see..

on the last message before the smtp delivery service stops working.. or (runs out of threads? or whatever is happening here)..
i see nothing unusual:

"DEBUG" 2340 "2019-05-03 07:01:48.089" "TCP connection started for session 467846"
"DEBUG" 2340 "2019-05-03 07:01:48.089" "Sending message to SpamAssassin. Session 467846, File: c:\zpanel\bin\hmailserver\Data\{76216D00-7E9E-4BD5-BFBF-D8DFAF46FE4D}.eml"

"TCPIP" 2364 "2019-05-03 07:01:48.370" "TCP - x.x.x.151 connected to x.x.x.16:993."
"DEBUG" 2364 "2019-05-03 07:01:48.370" "TCP connection started for session 467786"
"DEBUG" 2364 "2019-05-03 07:01:48.370" "Performing SSL/TLS handshake for session 467786. Verify certificate: False"
"TCPIP" 2368 "2019-05-03 07:01:48.479" "TCPConnection - TLS/SSL handshake completed. Session Id: 467786, Remote IP: x.x.x.151, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"DEBUG" 2348 "2019-05-03 07:01:49.308" "Parsing response from SpamAssassin. Session 467846"
"DEBUG" 2348 "2019-05-03 07:01:49.354" "SA - Copy+Delete used"
"DEBUG" 2348 "2019-05-03 07:01:49.354" "Ending session 467846"
"DEBUG" 2208 "2019-05-03 07:01:49.354" "Spam test: SpamTestSpamAssassin, Score: 0"
"DEBUG" 2208 "2019-05-03 07:01:49.354" "Total spam score: 0"
"DEBUG" 2208 "2019-05-03 07:01:49.354" "Executing event OnAcceptMessage"
"DEBUG" 2208 "2019-05-03 07:01:49.354" "Event completed"
"DEBUG" 2208 "2019-05-03 07:01:49.354" "Saving message: {76216D00-7E9E-4BD5-BFBF-D8DFAF46FE4D}.eml"
"DEBUG" 2208 "2019-05-03 07:01:49.386" "Requesting SMTPDeliveryManager to start message delivery"
"DEBUG" 2224 "2019-05-03 07:01:49.386" "Adding task DeliveryTask to work queue SMTP delivery queue"
"DEBUG" 2248 "2019-05-03 07:01:49.386" "Executing task DeliveryTask in work queue SMTP delivery queue"
"DEBUG" 2248 "2019-05-03 07:01:49.386" "Delivering message..."
"APPLICATION" 2248 "2019-05-03 07:01:49.386" "SMTPDeliverer - Message 2445212: Delivering message from --------@---.com to ----------@---------.com. File: c:\zpanel\bin\hmailserver\Data\{76216D00-7E9E-4BD5-BFBF-D8DFAF46FE4D}.eml"
"DEBUG" 2248 "2019-05-03 07:01:49.386" "Connecting to ClamAV virus scanner..."
"DEBUG" 2348 "2019-05-03 07:01:52.011" "The read operation failed. Bytes transferred: 0 Remote IP: x.x.x.151, Session: 467786, Code: 2, Message: End of file"
"DEBUG" 2348 "2019-05-03 07:01:52.011" "Ending session 467786"

then i just see other messages.. and instead of executing smtpdeliverymanager i see below (it just adds to queue):

"DEBUG" 2208 "2019-05-03 07:02:59.542" "Requesting SMTPDeliveryManager to start message delivery"
"DEBUG" 2224 "2019-05-03 07:02:59.542" "Adding task DeliveryTask to work queue SMTP delivery queue"

i don't' see anymore "Executing task DeliveryTask in work queue SMTP delivery queue" - until i reboot the server.. and the queue is cleared.

Anyone have any ideas??? there is no crash no hard fail.. It just stops executing task deliverytask in work queue smtp delivery queue.. with no real explanation.

Also any idea how to alert me when this happens.. As i have no way of knowing when this happens.. no emails can get sent out.. i've been trying to think of some script that uses another mail server to email another email account maybe.. i dunno..

For now for lack of any better options.. i'm disabling the clamav scanning.. because i do get that weird the read operation failed.. but i think its just generic debug message.. or part of it.. I get that on every session i think with different reasons.. so i don't think it has to do with the breaking the delivery task queue er whatever. It does say end of file.. so i'm guessing it makes it to the end of file? i dunno..

So i've changed the following settings:
performance from 10 / 8 / 4 .. now i'm on 15 / 10 / 15
turned off av scanning
changed dynamic memory buffer to 60% from 55% (more buffer for memory fluxuations) incase there is any..

I'll report back with the next delivery task failure.. if it goes away again.. or if i think it fixes it.. may take a month or so.. let me know in the meantime if anyone has any ideas.. last failure was about 23 days ago.. If it does seemed to be resolved i'll try turning on av scanning.. and process of elimination... I'm not optimistic though at this point anything is going to change.. i could go back to the old av scanning method with clamwin.. but it wasn't ideal.. it did seem more stable though.. i think anyway.. (although at this point it could have nothing to do with av scanning).

If anyone has any ideas at all please reply.. thanks everyone..

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 18:11
by palinka
Sorry i can't help with much of that, but you could try this for alerts.

https://www.hmailserver.com/forum/viewt ... 20&t=33645

It checks telnet for connectivity. So if you get a hang, you'll know within the period you set task scheduler to check again.

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 18:14
by rob2k2
palinka wrote:
2019-05-03 18:11
Sorry i can't help with much of that, but you could try this for alerts.

https://www.hmailserver.com/forum/viewt ... 20&t=33645

It checks telnet for connectivity. So if you get a hang, you'll know within the period you set task scheduler to check again.
Thanks for the post.. I do use something similar.. there is no hang though.. queue just fills up.. ... connectivity is fine so no alert is thrown..

Only thing i've thought of so far.. was to send a message every hour or 30 mins.. and make sure i get it.. if it don't investigate.. but its too much..

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 18:18
by rob2k2
I'm have the same problem from this post.. but doesn't look to be the same cause:

https://www.hmailserver.com/forum/viewtopic.php?t=27872

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 18:41
by rob2k2
Okay guys i just wanted to post an update to this for now.. I'm still going to check back in next time it stop executing deliverytask (sending out message from queue)..

I've been examining the logs more closely.. and i think i figured out whats wrong..

I should be seeing this with clamav.. and clamav was working up till about 5 mins.. before it gave up or used all the delivery threads.. and just queued up..

"DEBUG" 2240 "2019-05-03 06:55:02.744" "Connecting to ClamAV virus scanner..."
"DEBUG" 2240 "2019-05-03 06:55:02.761" "Connecting to ClamAV stream port..."

I'm fairly confident its clamav..

just before it used up its delivery threads i could see
"DEBUG" 2240 "2019-05-03 06:55:02.744" "Connecting to ClamAV virus scanner..."
then nothing.. So it wasn't connecting..

I guess its back to the drawing board with clamav.. really though i had it nailed.. that or go back to more stable clamwin..?

I'm going to leave av disabled.. and give it a month or so.. or if i have some time to work on this.. i will maybe post an update before then..

I'm going to keep posting here so maybe i can help others.. thanks

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 18:46
by rob2k2
https://www.hmailserver.com/forum/viewt ... 21&t=26829

Just for reference i believe i used this post.. (may have been another post) above to setup clamav.. originally i had set it up a differn't way..and it wasn't stable only lasted a day.. and didn't like the way it did updates..

Now i'm using clamav but installed clamwin to do the updates.. (not useing clamwin to scan)..

anyone have any stable clamav setup.. with instructions??? i can't get it to be stable for more then a couple weeks to a month..

Thanks

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 19:33
by rob2k2
I was able to work on this a little more today..

i'm using clamd (not clamav sorry for confusion) with clamwin updates..

I'm getting this error after a few weeks .. i can see in the clamd log.. i get this near the bottom.. here is a snip of it..
...
SelfCheck: Database status OK.
ERROR: pthread_create failed
ERROR: pthread_create failed
ERROR: pthread_create failed
ERROR: pthread_create failed
ERROR: pthread_create failed
ERROR: pthread_create failed
ERROR: pthread_create failed
ERROR: pthread_create failed
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
SelfCheck: Database status OK.
--- Stopped at Fri May 03 08:33:47 2019
...

where it said stopped.. is where i rebooted the server.. each selfcheck is 600 seconds.. and each error there shown above.. represents one hmailserver delivery thread.. (i had 8 at the time)..

So at least i pinned it down for sure.. definitely A/V causing the issue.... how come my clamd service can't create a new thread???

I'll googled it quickly.. but not much time to work on this now.. will check back later.. update.. or if anyone has gone though something like this.. please post if they have a fix???

Using - clamd daemon 0.99.4 (OS: win32, ARCH: i386, CPU: i386).. i'll probably post on clamd if they have a forum..

interesting that hmailserver gives up sending though.. think it would time out or give the thread back or something.. maybe a bug here? I had this behaviour prior to 5.6.7 though .. even on 5.4

Thanks

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 19:40
by rob2k2
I looked at my clamd.config file..

TCPSocket 3310
MaxThreads 2

max threads is only 2.. possibly this crashed it.. ? i suppose i should bump that up if i'm running 8 delivery threads? or higher?

whats everyone else running for clamd.config file how many threads?

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 19:59
by rob2k2
rob2k2 wrote:
2019-05-03 19:40
I looked at my clamd.config file..

TCPSocket 3310
MaxThreads 2

max threads is only 2.. possibly this crashed it.. ? i suppose i should bump that up if i'm running 8 delivery threads? or higher?

whats everyone else running for clamd.config file how many threads?
i bumped it up to max 8 threads.. and i've dropped my delivery threads to 2 in hmailserver.. (i only need 1 really.. but 2 just incase i get a few emails at a time.. they process in like 5 seconds.. larger mail do take a tiny bit longer but i can wait).. they just queue them up.. anyway..

I'm going to re-enable it; the clamd service.. I'm wondering if maybe i was running low on memory.. though i'm going to see if i can also allocate more memory to this vm as a whole.. i don't think that's the issue though..

hopefully its this maxthreads thing... but my guess is if can't create more threads.. not enough memory??

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 20:31
by rob2k2
Final update for now.. and i'll try and remember to post back.. (especially if i have the issue again)... I'm really hoping this maybe helps someone else out in similar situation.. Especially in a hyper-v or virtual environment.

Okay i think i may have had a memory allocation problem.. maybe.. dynamic memory can be confusing.. and i'm not sure why i would ever get a thread error not able to open more threads (at least that's the way i've interpreted it as).. gotta be memory related i'm thinking...

If i look in Hyper-v i'm showing assigned memory of around 6 gbs.. to that vm.. but inside the vm is showing a usage of almost 7GB's.. which confused me.. but i guess the vm is including page file maybe.... (and we are talking physical memory on the hyper-v console).

When i run resource manager from the vm..and open the memory tab.. i'm a little confused.. as i was showing 0 free memory.. or 1 or 2MB.. this is concerning.... and is confusing to me..
In use memory shows what in use shows in hyper-v.. around 6GB's.. okay.. with 2 gbs of standby but zero free.. i guess that is the point of dynamic memory.. keep some in standby.. but if the buffer is small your not going to have any free memory (not allocated to standby).

But i have allocated up to 10gb for this vm.. so why wont it take it.. why should i have a memory error.. it is possible at some point i used up my standby memory.. but it should allocate more.. as needed..

Anyways.. i started playing with the buffer.. and i have it up to 90% now... anyways with this configuration.. i'm finally seeing some free memory.. like almost 1 GB.. and 500 lowest.. I still have 2gbs in standby as well..

hopefully this will help.. if its a memory issue.. From experience some services programs dont play nice with dynamic memory.. I may need to do a little work here.. hopefully this resolves the problem..

anyways.. If i forget to post back.. its probably a good thing.. this worked.. or it was memory related.. if not i'll be back..

Love hmailserver.. Rob

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 21:33
by jimimaseye
Long read (great updates and detail) . Short response:

My clamav setup is as standard (as you would have had it from my install guide) and i have no problems of this kind BUT I am a low throughout server.

You should note that the standard definitions of clamav stands at taking about 500+ mb memory. I don't know how that increases with upping the thread count but in any case you will need to be aware in your considerations of memory allocation.

[Entered by mobile. Excuse my spelling.]

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 22:15
by rob2k2
jimimaseye wrote:
2019-05-03 21:33
Long read (great updates and detail) . Short response:

My clamav setup is as standard (as you would have had it from my install guide) and i have no problems of this kind BUT I am a low throughout server.

You should note that the standard definitions of clamav stands at taking about 500+ mb memory. I don't know how that increases with upping the thread count but in any case you will need to be aware in your considerations of memory allocation.

[Entered by mobile. Excuse my spelling.]
sorry for the long read.. its helps me sometimes to write things out as i go.. to figure out things out.. as i have my hands in many things.. and i sometimes forget.. stuff..

Anyways.. i'm sure this will be another too long of a read (sorry for the long post)

Thank you kindly for the install guide.. it was great B.T.W.. i'm not really a high traffic server.. we do less then 1k email a day.. half spam..

the clamd service is running at around 551.6 MB now.... if i look at the service its using 8 threads that i assigned now instead of 2 before.. for some reason it doesn't really effect the memory usage.. (maybe if all threads are in use?) no idea.. i've dropped hmail down to 2 delivery threads.. so in theory.. it should only ever use 2 threads now anyway.. of the 8 i gave it.. if it works that way.. not sure..

I did have an update on my memory usage.. i'll share.. my limited knowledge of how windows uses memory is an understatement.. if i look at my resource manager under memory tab.. free memory is down to like 100mbs again.. or less.. i saw it hit zero once again.. but it is higher then before..

Apparently standby memory isn't exactly what i thought.. its windows trying to use it as a cache.. I think its windows goal to have zero free memory.. From my 5 mins of googling this (need to spend some more time researching this) if a process needs a page that is associated with the process and that page is now in the Standby list, the memory manager immediately returns the page to that process' working set. However, all pages on the Standby list are available for memory allocation requests from any process. When a process requests additional memory and there is not enough memory in the Free list, the memory manager checks the page's priority and will take a page with a low priority from the Standby list, initialize it, and allocate it to that process.

I've checked other servers - not many have much free memory standby takes it all.. It could still be memory related though.. i'm going to try this latest configuration for now.. allocating more standby memory.. and i have scheduled to try and apply more memory to the vm in general (like higher the 10gbs if it needs it).. have to do this off hours though.. but I have a feeling i may not have this one solved just yet.. unfortunately..

It does look to be memory related though.. i can't think why else it would throw the error ERROR: pthread_create failed.. i did google it a bit.. not much though..

Thanks for the feedback and your post on the spamd - jimmimaseye.. my cpu usage use to average at 90% daily.. now i'm down to like 20 - 30% average.. and queues are much quicker as well.. i think i shaved like 10 / 15 watts per hour or more off by using spamd..

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-03 23:56
by jimimaseye
rob2k2 wrote:
2019-05-03 22:15
sorry for the long read.. its helps me sometimes to write things out as i go.. to figure out things out.. as i have my hands in many things.. and i sometimes forget.. stuff..
Don't apologise. Better to have lots of detail and something to work with than nothing. Take a look at the quality of this first post: https://www.hmailserver.com/forum/viewt ... 45#p211545

[Entered by mobile. Excuse my spelling.]

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-25 22:05
by rob2k2
I allocated more memory.. but it didn't help.. seems like i got the same error in spamd.log

SelfCheck: Database status OK.
ERROR: pthread_create failed
ERROR: pthread_create failed

it hung the deliverytask in smtp.. and messages just queued up.. again.. took just under a month to crash again..

I tried to restart the service.. but didn't help.. i ended up just rebooting the server..

I found a few posts about this error.. after googling.. https://clamav-users.clamav.narkive.com ... ew-compile .. but this looks like an older version..

My first instinct is to try and lower the scanning limit.. maybe try throwing some large files though and see if that's crashing it..

Here is my config in my log file; anyone have any suggestions.. i really want to run clamd.. But at some point it's going to crash again.. and hang hmailserver.. ..

Received 0 file descriptor(s) from systemd.
clamd daemon 0.99.4 (OS: win32, ARCH: i386, CPU: i386)
Log file size limited to 1048576 bytes.
Reading databases from C:\ProgramData\.clamwin\db
Not loading PUA signatures.
Bytecode: Security mode set to "TrustSigned".
Loaded 6138218 signatures.
TCP: Bound to []:3310
TCP: Setting connection queue length to 200
TCP: Bound to []:3310
TCP: Setting connection queue length to 200
Limits: Global size limit set to 104857600 bytes.
Limits: File size limit set to 26214400 bytes.
Limits: Recursion level limit set to 16.
Limits: Files limit set to 10000.
Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Limits: MaxScriptNormalize limit set to 5242880 bytes.
Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Limits: MaxPartitions limit set to 50.
Limits: MaxIconsPE limit set to 100.
Limits: MaxRecHWP3 limit set to 16.
Limits: PCREMatchLimit limit set to 10000.
Limits: PCRERecMatchLimit limit set to 5000.
Limits: PCREMaxFileSize limit set to 26214400.
Archive support enabled.
Algorithmic detection enabled.
Portable Executable support enabled.
ELF support enabled.
Mail files support enabled.
OLE2 support enabled.
PDF support enabled.
SWF support enabled.
HTML support enabled.
XMLDOCS support enabled.
HWP3 support enabled.
Self checking every 600 seconds.

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-26 02:15
by mattg
I find ClamAV next to useless without the SaneSecurity updates.

The SaneSecurity Updates are more about malware and trojan detection than virus detection
I get my SpamAssassin to check CLamAV as well and use the results as part of SpamScore.

If a SpamAssassin connection doesn't get picked up and answered quickly, hMailsevrer just continues on it's merry way. This is such an issue for me that I set a default SpamAssassin score if no SpamAssassin headers are found. (I'd rather issue a 4xx - try again later).

Perhaps you could try ClamAV testing in SpamAssassin...

Thinking about this, In times where my AV has been been working but hMailserver has tried to connect, hMailserver just logs a 'failed to connect' and keeps on going. My experience doesn't match your at all it seems.

Are you sure that queuing for ClamAV causes your hmailserver to stop?

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-26 02:21
by mattg
I'll also add that my ClamAV is NOT on the same machine that runs hMailserver
I have a Linux box that runs SpamAssassin and ClamAV (and a few other bits)

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-26 02:43
by rob2k2
mattg wrote:
2019-05-26 02:21
I'll also add that my ClamAV is NOT on the same machine that runs hMailserver
I have a Linux box that runs SpamAssassin and ClamAV (and a few other bits)
mine are on the same box..

and yes they do co-inside....

im just using clamwin updates..

so when you setup clamwin you choose external virus scanner put in the ip and port?

and yours doesnt freeze hmail if it cant connect.. i could try doing this perhaps.. i could install on another box i have running...

thanks for the info.. i didnt think of this...

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-26 06:54
by mattg
Are you using the ClamWin or ClamAV connector in hMailserver?
Note that the external virus scan is different again.

They behave differently, and you should never use the ClamWin Adapter on a busy server

I have previously used the ClamAV adapter, but currently don't connect Clam to hMailserver at all.
ClamAV processing is done by my SpamAssassin
I am using Defender as a external virus scan presently (not that it is very good...it is quite ordinary)

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-26 09:33
by jimimaseye
rob2k2 wrote:
2019-05-26 02:43
mine are on the same box..

and yes they do co-inside....

im just using clamwin updates..

so when you setup clamwin you choose external virus scanner put in the ip and port?

and yours doesnt freeze hmail if it cant connect.. i could try doing this perhaps.. i could install on another box i have running...

thanks for the info.. i didnt think of this...
To be sure are you using the 'Clamav' entry in the hmail admin antivirus setup or the 4th 'external scanner' tab? Did you disable clamwin in the 3rd tab? (did you follow the set up according to my guide? )

[Entered by mobile. Excuse my spelling.]

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-26 12:06
by SorenR
mattg wrote:
2019-05-26 02:21
I'll also add that my ClamAV is NOT on the same machine that runs hMailserver
I have a Linux box that runs SpamAssassin and ClamAV (and a few other bits)
I run hMail, ClamAV and Spamassassin (with ClamAV connection) on the same box. 9/10 times ClamAV under SA find something that ClamAV under hMail do not... :roll:

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-27 15:14
by rob2k2
jimimaseye wrote:
2019-05-26 09:33
rob2k2 wrote:
2019-05-26 02:43
mine are on the same box..

and yes they do co-inside....

im just using clamwin updates..

so when you setup clamwin you choose external virus scanner put in the ip and port?

and yours doesnt freeze hmail if it cant connect.. i could try doing this perhaps.. i could install on another box i have running...

thanks for the info.. i didnt think of this...
To be sure are you using the 'Clamav' entry in the hmail admin antivirus setup or the 4th 'external scanner' tab? Did you disable clamwin in the 3rd tab? (did you follow the set up according to my guide? )

[Entered by mobile. Excuse my spelling.]
I was using the 2nd tab.. ClamAV.. 127.0.0.1 / I see when you set it up on a different box.. you use the same tab.. just change the ip.. (nothing to do with external virus scanner tab).

Yes i was using clamwin.. but unchecked it when i setup clamav.. etc..

Alright i'm going to try this on another box.. at least if it craps out.. it shouldn't stop delivering messages.. hopefully just time out and move onto the next message.. (I hope).

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-27 15:15
by rob2k2
SorenR wrote:
2019-05-26 12:06
mattg wrote:
2019-05-26 02:21
I'll also add that my ClamAV is NOT on the same machine that runs hMailserver
I have a Linux box that runs SpamAssassin and ClamAV (and a few other bits)
I run hMail, ClamAV and Spamassassin (with ClamAV connection) on the same box. 9/10 times ClamAV under SA find something that ClamAV under hMail do not... :roll:
I'm running spamassassin as well on the same box.. but honestly.. i haven't looked at it in like 3 years.. i dont even know if its working anymore..

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-05-27 16:22
by rob2k2
Okay i'm running clamav on another box.. working so far.. but will see in a few weeks what happens i guess.. I'm using 99.4 / since i'm using the calmwin updates for now.. (i couldn't find the build so i had to download it from an old forum link https://www.hmailserver.com/forum/viewt ... 22#p204122 - Thank you jimimaseye) I think i was using that version before too.. hopefully its not a bad compile.. or something.. I will look at the better updates later.. possibly..

I'll mess around with it.. try to stop the service on the other server.. and post back if it hangs again.. When i have more time.. (deliverytask hangs again).. I hoping it just times out (but have not tested yet).. If i don't past back i guess this worked for me.. (putting clamav on another server) as a work around..

Thanks Mattg for giving me this idea.. and everyone for your help and suggestions.. Fingers crossed there isn't some other issue that makes the delivery task hang.. and the clamav is just coincidence..

Re: hmailserver stops Executing task DeliveryTask in work queue SMTP delivery queue

Posted: 2019-07-03 15:14
by rob2k2
Okay just wanted to let everyone know its stable and working.. been a couple months or at least over a month.

If anyone else has this problem - read this post as well; should help. https://www.hmailserver.com/forum/viewt ... ead#unread

Thanks everyone