SpamAssassinClient

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

SpamAssassinClient

Post by mns17 » 2011-05-26 04:49

Hi, All.

•hMailServer 5.3.3 - Build 1879

In ERROR_hmailserver_2011-05-26.log

Code: Select all

"ERROR"	5636	"2011-05-26 07:49:15.713"	"Severity: 3 (Medium), Code: HM5157, Source: SpamAssassinClient::OnReadError, Description: There was a communication error with SpamAssassin. hMailServer tried to retrieve data from SpamAssassin but the connection to SpamAssassin was lost. The WinSock error code is 995. Enable debug logging to retrieve more information regarding this problem. The problem could be that SpamAssassin is malfunctioning."
In LOG_SpamD.txt

Code: Select all

Thu May 26 07:28:10 2011 [1352] info: prefork: child states: II
Thu May 26 07:48:45 2011 [-8060] info: spamd: connection from mail.is.local [127.0.0.1] at port 63894
Thu May 26 07:49:15 2011 [-8060] info: spamd: processing message <E1QPOF5-00043k-Ba@bilby.cbr.hosting-server.com.au> for (unknown):0
Thu May 26 07:49:15 2011 [-8060] info: spamd: identified spam (8.2/6.3) for (unknown):0 in 30.0 seconds, 1103 bytes.
Whether probably to increase a waiting time of the answer from spamd?
If check to last more than 30 seconds hmail doesn't wait the answer from spamd and considers it as an error

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: SpamAssassinClient

Post by Bill48105 » 2011-05-26 06:04

Hey mns17,
This is a known issue with hmailserver prior to 5.4 due to fact that the timeout is hard-coded to 30 seconds. (Well in actuality most timeouts are calculated based on server load but in essence odds are it is 30 seconds) It's not really a bug in hmailserver, just a strict hard-set timeout that usually works fine but sometimes bites you as you've seen.

To address these concerns I added INI settings for many of the hard-coded timeouts to 5.4 including the SA client part to help get around issues like this. (Some might say upgrade your server hardware or adjust your settings in SA server but IMO it is always a good idea to be able to adjust these sort of things & why I spent the time on it. But because they are 'super-advanced' they are not in the GUI but might be at some point if they prove useful enough to people.)

In your case mns17 (assuming you opt to try out 5.4 alpha) you'd want to specifically look at the SA keys but please read the notes/cautions below before using..

Code: Select all

[Settings]
SAMinTimeout=45
; 30 seconds is default
SAMaxTimeout=90
; 90 seconds is default
I might as well post up all the advanced INI settings I added to 5.4 although I have not verified they are all indeed in the official releases! (Understand that most of the changes I've made to 5.4 are to fix particular issues I've run into or my specific needs. As such my local copy is almost always out of sync with the official code especially if my changes are specific enough to my own needs to not warrant including in the official releases. Plus in the end martin has the final say in which changes I submit get included although he's been very lenient because I try to make things default to current way so my changes should not effect people unless they intentionally choose to activate & use.)

NOTE/CAUTION:
- These settings are only available in hmailserver 5.4 EXCEPT the initial alpha release. (Odds are you want the latest 5.4 anyway as not much reason to run an old alpha & initial alpha has many known issues)
- None of these settings are required to use hmailserver. They are available as optional aids to help work around some ADVANCED problems or tweak the way some things work.
- The values shown are not necessarily the same as the defaults when the values are not set but defaults for most are shown as comments (after ; semicolon) for reference along with a brief explanation of what each is for although for most the key name itself is likely self explanatory in most cases.
- Although the values/settings shown are not likely defaults (if they are not defined) they should be safe although some of the keys are commented out here intentionally to ensure they are not enabled by accident by someone blindly copying & pasting them.
- hmailsever service must be restarted after making changes to the INI file.
- All of the Min timeouts are what are normally used & UP TO the Max ones are used when hmailserver is under heavy load based on calculation martin developed, I just made it so admins can set those values to suit their needs.

hmailserver.ini

Code: Select all

[Settings]
;SepSvcLogs=1
;Split logs so 1 per sevice (pop, smtp, imap)
; Default is to have all services logged together in 1 file.
;LogLevel=9
;1=lowest/least 9=highest/most
;MaxLogLineLen=300
;QuickRetries=5
;QuickRetriesMinutes=7
; Defines # of minutes to delay for each retry if QuickRetries is enabled otherwise normal delivery schedule
; is used
; Defaults to 6 if QuickRetries is enabled otherwise ignored
;QueueRandomnessMinutes=3
;MXTriesFactor=2
;ArchiveDir=C:\MailArchive
; Folder where copies of every email get stored. Default or undefined disables archiving
;ArchiveHardLinks=1
; Enables use of NTFS Hardlinks. (NOT FAT/FAT32!) Default or 0 disables & forces normal Copy
POP3DMinTimeout=30
; 10 seconds is default which becomes 15 internally
POP3DMaxTimeout=90
; 600 seconds is default
SMTPDMinTimeout=90
; 10 seconds is default which becomes 15 internally
SMTPDMaxTimeout=300
; 1800 seconds is default
POP3CMinTimeout=30
; 30 seconds is default
POP3CMaxTimeout=90
; 900 seconds is default
SMTPCMinTimeout=90
; 30 seconds is default
SMTPCMaxTimeout=300
; 600 seconds is default
SAMinTimeout=45
; 30 seconds is default
SAMaxTimeout=90
; 90 seconds is default
ClamMinTimeout=45
; 15 seconds is default
ClamMaxTimeout=90
; 90 seconds is default
;SAMoveVsCopy=1
; Tells hmail to use move vs copy+delete. Defaults to 0 which means use "copy"
;AuthUserReplacementIP=127.0.0.1
; Tells hmail to replace AUTH'd sender's IP with this value (to help when sender IP is on public blacklist). 
; X-header is added instead. 
; Default is blank or use sender's real IP
***PLEASE READ NOTE/CAUTIONS ABOVE BEFORE USING THESE***

Hope these prove helpful to someone.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

Re: SpamAssassinClient

Post by mns17 » 2011-05-26 06:38

Thanks, Bill

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: SpamAssassinClient

Post by Bill48105 » 2013-03-05 18:03

FYI I incorrectly states ini setting. It is SMTPDMaxTimeout not SMTP3DMaxTimeout.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply