hMailServer hangs after about an hour

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
darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-22 23:14

Hello,
I have a personal hMailServer 5.6.6-B2383 running on Windows Server 2012 R2 and since yesterday, it has started hanging after about an hour. That "hanging" is characterised by still accepting connections on all ports, but not sending the "welcome" (like SMTP 220 or IMAP "OK IMAPrev1") and eventually timing out. A restart via net stop hangs, killing the process and starting it again fixes it, but the problem starts again after about an hour. Any ideas what could be the reason?

paultilley100
Normal user
Normal user
Posts: 72
Joined: 2017-01-05 23:48

Re: hMailServer hangs after about an hour

Post by paultilley100 » 2018-02-22 23:58

Anything logged in Event Viewer?

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMailServer hangs after about an hour

Post by mattg » 2018-02-23 01:30

Also check your hMailserver error logs

AND please run this and post the results viewtopic.php?f=20&t=30914
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 02:19

Nothing noteworthy in Event Viewer except for an SChannel error complaining about no supported cipher suites being offered by a client a bit before the error. Logs just show normal mail processing and then nothing, though I didn't try debug logging yet. This is the report:

Code: Select all

2018-02-23   Hmailserver: 5.6.6-B2383

DOMAINS

   "Domain1.com" - dixxxxxxxxx.de                 Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: True    
                   Max message size:        0   Header:   Relaxed  Plus addressing:  True
                   Max size of accounts:    0   Body:     Relaxed  Character:           +
                                                Algorithm: SHA256  Greylisting:     False
                                                Private key: d:\mail\data\Domain1.com\dkim.Domain1.com.key
                                                Selector:    dkim

   "Domain2.com" - j.apxxxxx.jbxxx.eu             Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: False     Catchall: j@Domain1.com
                   Max message size:        0                      Plus addressing: False
                   Max size of accounts:    0                    
                                                                   Greylisting: !! ENABLED BUT NOT ACTIVATED!! 

   "Domain3.com" - jbxxx.eu                       Enabled: True

SIGNATURE         LIMITS                       DKIM               ADVANCED
  Enabled: False   Max size:                0   Enabled: False   
                   Max message size:        0                      Plus addressing: False
                   Max size of accounts:    0                    
                                                                   Greylisting:     False
-----------------------------------------------------------------------------------------------

IP RANGES

IP: 127.0.0.1 - 127.0.0.1     Priority: 15     Name: My computer

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True !! ANTIVIRUS NOT CONFIGURED !!
     IMAP:   True                              SSL/TLS:    False

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       - False
     Local To External    -  True              Local To External    - False
     External To Local    -  True              External To Local    - False
     External To External -  True              External To External -  True


IP: 0.0.0.0 - 255.255.255.255     Priority: 10     Name: Internet

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True !! ANTIVIRUS NOT CONFIGURED !!
     IMAP:   True                              SSL/TLS:    False

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       -  True
     Local To External    -  True              Local To External    -  True
     External To Local    -  True              External To Local    - False
     External To External -  True              External To External -  True


IP: :: - ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff     Priority: 0     Name: IPv6 Internet

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:   True                              Antivirus:   True !! ANTIVIRUS NOT CONFIGURED !!
     IMAP:   True                              SSL/TLS:     True

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       -  True
     Local To External    -  True              Local To External    -  True
     External To Local    -  True              External To Local    - False
     External To External -  True              External To External -  True


------------------------------------------------------
AUTOBANNED Local Addresses:
    No entries

-----------------------------------------------------------------------------------------------

AUTOBAN
  Autoban Enabled: True       Max invalid logon attempts:      3
                              Minutes Before Reset:           30  (0,50 hours, 0,02 days)
                              Minutes to Autoban:             60  (1,00 hours, 0,04 days)

No problems were found in the IP range configuration.
-----------------------------------------------------------------------------------------------

INCOMING RELAYS
   No entries
-----------------------------------------------------------------------------------------------

MIRRORING         Disabled
-----------------------------------------------------------------------------------------------

PROTOCOLS

SMTP
GENERAL             DELIVERY                  RFC COMPLIANCE            ADVANCED
No. Connections:  0  No Retries:  4 Mins: 60   Plain Text:        False  Bind: 81.169.248.28
                     Host: EXTERNAL.TLD        Empty sender:       True  Batch recipients:   100
Max Msg Size:2048000  Relay:-                   Incorrect endings:  True  Use STARTTLS:      True
                     (none entered)            Disc. on invalid:  False  Delivered-To hdr: False
                                                                         Loop limit:           5
                                                                         Recipient hosts:     15
  Routes:
     No routes defined.

POP3
  No. Connections: 0

IMAP
 GENERAL                   PUBLIC FOLDERS                    ADVANCED
  No. Connections:   0      Public folder name: #Public       IMAP sort:  True
                                                              IMAP Quota: True
                                                              IMAP Idle:  True
                                                              IMAP ACL:   True
                                                              Delim: "."
-----------------------------------------------------------------------------------------------

ANTISPAM

GENERAL                              SPAM TESTS              Score   SPAMASSASSIN
  Spam Mark:                  5       Use SPF:            True - 3    Use Spamassassin:    True
  Add X-HmailServer-Spam:     True    Check HELO host:    True - 2    Hostname:       127.0.0.1
  Add X-HmailServer-Reason:   True    Check MX records:   True - 2    Port:                 783
  Add X-HmailServer-Subject:  True    Verify DKIM:        True - 4    Use SA score:        True
              Subject Text: "[SPAM]"
  Spam delete threshold: 200         Maximum message size: 1024

DNSBL ENTRIES:
                  zen.spamhaus.org      Score: 5     Result: 127.0.0.*
                    bl.spamcop.net      Score: 3     Result: 127.0.0.2
               ix.dnsbl.manitu.net      Score: 5     Result: 127.0.0.*

SURBL ENTRIES:
                   multi.surbl.org      Score: 3

GREYLISTING:
  Greylisting:  False

WHITELISTING
   No entries
-----------------------------------------------------------------------------------------------

ANTIVIRUS:  No application configured.

  Block Attachments: False
-----------------------------------------------------------------------------------------------

SSL CERTIFICATES
   SSL
       Certificate: D:\Sicherheit\Domain1.com-Zertifikat\blahut.cert.pem
       Private key: D:\Sicherheit\Domain1.com-Zertifikat\blahut.key
   SSL-LetsEncrypt
       Certificate: C:\Users\JB\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\mail.Domain1.com-chain.pem
       Private key: C:\Users\JB\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\mail.Domain1.com-key.pem
-----------------------------------------------------------------------------------------------

SSL/TLS
             SSL 3.0 :  False
             TLS 1.0 :   True
             TLS 1.1 :   True
             TLS 1.2 :   True                Verify Remote SSL/TLS Certs:   True
SslCipherList  :

ECDHE-RSA-AES128-GCM-SHA256     - ECDHE-ECDSA-AES128-GCM-SHA256   - ECDHE-RSA-AES256-GCM-SHA384     
ECDHE-ECDSA-AES256-GCM-SHA384   - DHE-RSA-AES128-GCM-SHA256       - DHE-DSS-AES128-GCM-SHA256       
kEDH+AESGCM                     - ECDHE-RSA-AES128-SHA256         - ECDHE-ECDSA-AES128-SHA256       
ECDHE-RSA-AES128-SHA            - ECDHE-ECDSA-AES128-SHA          - ECDHE-RSA-AES256-SHA384         
ECDHE-ECDSA-AES256-SHA384       - ECDHE-RSA-AES256-SHA            - ECDHE-ECDSA-AES256-SHA          
DHE-RSA-AES128-SHA256           - DHE-RSA-AES128-SHA              - DHE-DSS-AES128-SHA256           
DHE-RSA-AES256-SHA256           - DHE-DSS-AES256-SHA              - DHE-RSA-AES256-SHA              
AES128-GCM-SHA256               - AES256-GCM-SHA384               - !ECDHE-RSA-RC4-SHA              
ECDHE-ECDSA-RC4-SHA             - AES128                          - AES256                          
!RC4-SHA                        - HIGH                            - !aNULL                          
!eNULL                          - !EXPORT                         - !DES                            
!3DES                           - !MD5                            - !PSK;                           
-----------------------------------------------------------------------------------------------

TCPIP PORTS                                         Connection Sec
               0.0.0.0         / 25    / SMTP   -   StartTLS Optional   Cert: SSL-LetsEncrypt
               0.0.0.0         / 110   / POP3   -   StartTLS Required   Cert: SSL-LetsEncrypt
               0.0.0.0         / 143   / IMAP   -   StartTLS Required   Cert: SSL-LetsEncrypt
               0.0.0.0         / 465   / SMTP   -   SSL/TLS             Cert: SSL-LetsEncrypt
               0.0.0.0         / 587   / SMTP   -   StartTLS Required   Cert: SSL-LetsEncrypt
               0.0.0.0         / 993   / IMAP   -   SSL/TLS             Cert: SSL-LetsEncrypt
               0.0.0.0         / 995   / POP3   -   SSL/TLS             Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 25    / SMTP   -   StartTLS Optional   Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 110   / POP3   -   StartTLS Required   Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 143   / IMAP   -   StartTLS Required   Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 465   / SMTP   -   SSL/TLS             Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 587   / SMTP   -   StartTLS Required   Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 993   / IMAP   -   SSL/TLS             Cert: SSL-LetsEncrypt
               2a01:238:4367:8 / 995   / POP3   -   SSL/TLS             Cert: SSL-LetsEncrypt
-----------------------------------------------------------------------------------------------

LOGGING      Logging Enabled: True

  Paths:-
    Current:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_2018-02-23.log
    Error:    C:\Program Files (x86)\hMailServer\Logs\ERROR_hmailserver_2018-02-23.log
    Event:    C:\Program Files (x86)\hMailServer\Logs\hmailserver_events.log - Last Event: 2017/11/19
    Awstats:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_awstats.log
                        APPLICATION -    True
                        SMTP        -      .
                        POP3        -      .
                        IMAP        -      .
                        TCPIP       -      .
                        DEBUG       -      .
                        AWSTATS     -    True
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MySQL

IPv6 support is available in operating system.

Backup directory D:\Mail-Backup is writable.

Relative message paths are stored in the database for all messages.

-----------------------------------------------------------------------------------------------

HMAILSERVER.INI

[Directories]
Program folder:  C:\Program Files (x86)\hMailServer\
Database folder: 
Data folder:     C:\Program Files (x86)\hMailServer\Data
Log folder:      C:\Program Files (x86)\hMailServer\Logs
Temp folder:     C:\Program Files (x86)\hMailServer\Temp
Event folder:    C:\Program Files (x86)\hMailServer\Events

[Database]
Type=              MYSQL
Username=          hMailServer
PasswordEncryption=1
Port=              6606
Server=            localhost
Internal=          0
-----------------------------------------------------------------------------------------------

[/size]Generated by HMSSettingsDiagnostics v1.91, Hmailserver Forum.

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMailServer hangs after about an hour

Post by mattg » 2018-02-23 05:10

That looks OK

Change the IPV6 internet IP range to a priority of say 9 please (I don't know if a priority of 0 does anything, also higher priority is used, not lower, so a priority of 25 will have more authority than an autoban range with priority of 20 etc)

Also in your TCP Ports setup you have a specific IPV6 address, yet for IPv4 you have the generic 0.0.0.0, perhaps set the IPv6 to a generic ::
And your SMTP settings show a binding to a specific IPv4 address, so perhaps an IPV6 connect is the cause of this stoppage...
I'm only guessing really


debug logging will show more detail about cipher suites, perhaps that is a cause

Also what are your thread settings
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: hMailServer hangs after about an hour

Post by Dravion » 2018-02-23 08:56

SChannel isnt relevant forhMailServer because it doesnt use it at all but Mail User Agents like Microsoft Outlook is depends on it.You should testwise try a Mailprogram like Thunderbird which doesnt use SChannel.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8549
Joined: 2011-09-08 17:48

Re: hMailServer hangs after about an hour

Post by jimimaseye » 2018-02-23 09:28

Not necessarily related to your problem but....

Code: Select all

TCPIP PORTS                                         Connection Sec
               0.0.0.0         / 110   / POP3   -   StartTLS Required   Cert: SSL-LetsEncrypt
               0.0.0.0         / 143   / IMAP   -   StartTLS Required   Cert: SSL-LetsEncrypt
"StartTLS Required" on the standard non-encrypted port is not right - you might have problems if you forget you have set this when you come to setting up new clients. (But if you are sure and happy with the risk then you can leave it, of course).
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 14:51

I don't use Outlook, and definitely not on that machine, that's exclusively a server. The SChannel error presumably comes from something else then, maybe the IIS. StartTLS required is intentional - it's only me and a few others that use this server, and it both prevents an attacker from removing the "StartTLS" from the feature list, causing clients that rely on opportunistic TLS to use plaintext and stops users from accidentally or intentionally turning of TLS entirely. IPv6 has never caused problems since I set it up, although I believe there was a reason I am binding to a specific address. I'll turn on debug logging and see what I find.

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 15:05

I just found this going through a few log files I had missed before:
"ERROR" 8776 "2018-02-23 09:13:08.190" "Severity: 2 (High), Code: HM4207, Source: MySQLRecordset::GetInt64Value, Description: An unknown error occurred while reading value from recordset: messageid"
"ERROR" 8776 "2018-02-23 09:13:08.346" "Severity: 3 (Medium), Code: HM5136, Source: TCPConnection::AsyncReadCompleted, Description: An error occured while parsing data. Data length: 70, Data: 28.500 STATUS Lists.linux-kernel (MESSAGES UIDNEXT UIDVALIDITY UNSEEN). Remote IP: 2003:e0:bd:xxxx"
Apparently it has been occurring about as long as I have been having this problem. Note: Lists.linux-kernel is a folder receiving mail from a list that has multiple thousand mails a day although I limit it to keep only the last 2000. Basically, it has a lot of mail going through it and being deleted roughly a day or two later - I was subscribed out of personal interest, although I have since unsubscribed, partially because most of it isn't interesting anyway, and partially as an attempt to find out if it was part of the reason this problem occurs.

Edit: I have removed the folder from my mailbox because I don't need it anyway, let's see if that fixes this error or if the root cause is elsewhere.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8549
Joined: 2011-09-08 17:48

Re: hMailServer hangs after about an hour

Post by jimimaseye » 2018-02-23 15:11

So are you deleting email files using an external processes instead using the Hmailserver API or email client?

Problems problems problems. You are right to stoip doing this - lets see how things go.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 15:18

Sorry, I really don't see where I am doing things using external programs. I impose the 2000-message limit using my normal mail client, and the logs were hMailServer, I am not editing the database externally.

User avatar
jimimaseye
Moderator
Moderator
Posts: 8549
Joined: 2011-09-08 17:48

Re: hMailServer hangs after about an hour

Post by jimimaseye » 2018-02-23 15:36

Ah ok.

So when you say it was limited to 2000, what happens when the 2001st email comes in? How is it handled?
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 15:37

Not that it really matters, but my mail client would delete the oldest one. I simply set a "retention policy" in Thunderbird, nothing more.

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMailServer hangs after about an hour

Post by mattg » 2018-02-23 15:55

jimimaseye wrote:"StartTLS Required" on the standard non-encrypted port is not right
I do this all of the time, and I've set AutoDiscover to say that.
Ports 110 and 143 (and 587) can be and should be StartTLS required I'd say. Ports 110 and 143 aren't non-encrypted ports, but as standards go they shouldn't be SSL encrypted - that would be ports 995 and 993 (and 465 for SMTP)

I set port 25 as StartTLS Optional
darkphoenix wrote:"ERROR" 8776 "2018-02-23 09:13:08.346" "Severity: 3 (Medium), Code: HM5136, Source: TCPConnection::AsyncReadCompleted, Description: An error occured while parsing data. Data length: 70, Data: 28.500 STATUS Lists.linux-kernel (MESSAGES UIDNEXT UIDVALIDITY UNSEEN). Remote IP: 2003:e0:bd:xxxx"
Another IPv6 address...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: hMailServer hangs after about an hour

Post by Dravion » 2018-02-23 16:18

Something is wrong with your MySQL Database Installation. What localesdo you use on Windows and what locales is using MySQL?

If this is just a play hMailServer, just uinstall hMailserver, uninstall MySQL-Server, run all Windws Updates, restart Windows, ReInstall MySQL, reinstall hMailServer and report back.

ps: Use only static ipv6 and ipv4 adressey or disable ipv6 if nor needed.

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 16:26

I don't think there is anything wrong with the MySQL installation, and frankly, I am loathe to kill it just on an idea that it "could be the reason" - I have quite a few other applications running on that database. Also, IPv6 is regularly used by a few of the clients, I think the main reason it appears in those logs is that my main PC prefers v6 over v4.

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 16:31

Okay, it died again. MySQL error doesn't appear again, neither does the SChannel message, nothing in error logs, these are the last few lines of debug log:

"DEBUG" 8324 "2018-02-23 15:19:06.678" "Performing SSL/TLS handshake for session 132. Verify certificate: False"
"DEBUG" 8324 "2018-02-23 15:19:06.679" "Performing SSL/TLS handshake for session 135. Verify certificate: False"
"DEBUG" 8324 "2018-02-23 15:20:41.600" "The read operation failed. Bytes transferred: 0 Remote IP: 89.15.238.17, Session: 135, Code: 10054, Message: Eine vorhandene Verbindung wurde vom Remotehost geschlossen"
"DEBUG" 8324 "2018-02-23 15:20:41.601" "Ending session 135"
"DEBUG" 8324 "2018-02-23 15:20:41.619" "The read operation failed. Bytes transferred: 0 Remote IP: 89.15.238.17, Session: 132, Code: 10054, Message: Eine vorhandene Verbindung wurde vom Remotehost geschlossen"
"DEBUG" 8324 "2018-02-23 15:20:41.619" "Ending session 132"
"DEBUG" 8324 "2018-02-23 15:20:43.481" "The client has timed out. Session: 77"
"DEBUG" 8324 "2018-02-23 15:20:48.482" "The client has timed out. Session: 77"
"DEBUG" 8324 "2018-02-23 15:21:21.861" "Creating session 137"
"DEBUG" 8324 "2018-02-23 15:21:21.862" "TCP connection started for session 134"
"DEBUG" 8324 "2018-02-23 15:21:21.936" "The read operation failed. Bytes transferred: 0 Remote IP: 63.143.42.248, Session: 134, Code: 2, Message: End of file"
"DEBUG" 8324 "2018-02-23 15:21:21.937" "Ending session 134"
"DEBUG" 8324 "2018-02-23 15:21:36.929" "Creating session 138"
"DEBUG" 8324 "2018-02-23 15:21:36.930" "Client connection from 91.200.12.166 was not accepted. Blocked either by IP range or by connection limit."
"DEBUG" 8324 "2018-02-23 15:21:36.930" "Ending session 137"
"DEBUG" 8324 "2018-02-23 15:22:27.713" "Creating session 139"
"DEBUG" 8324 "2018-02-23 15:22:27.714" "TCP connection started for session 138"
"DEBUG" 8324 "2018-02-23 15:22:27.801" "Ending session 138"
"DEBUG" 8324 "2018-02-23 15:22:49.334" "Creating session 140"
"DEBUG" 8324 "2018-02-23 15:22:49.335" "TCP connection started for session 136"
"DEBUG" 8324 "2018-02-23 15:22:49.376" "Performing SSL/TLS handshake for session 136. Verify certificate: False"
"DEBUG" 8324 "2018-02-23 15:22:49.569" "Ending session 136"
"DEBUG" 8324 "2018-02-23 15:22:51.824" "Creating session 141"
"DEBUG" 8324 "2018-02-23 15:22:51.824" "TCP connection started for session 140"
"DEBUG" 8324 "2018-02-23 15:22:51.871" "Performing SSL/TLS handshake for session 140. Verify certificate: False"
"DEBUG" 8324 "2018-02-23 15:22:52.067" "Ending session 140"
"DEBUG" 8324 "2018-02-23 15:23:04.284" "Creating session 142"
"DEBUG" 8324 "2018-02-23 15:23:04.285" "TCP connection started for session 141"
"DEBUG" 8324 "2018-02-23 15:23:04.326" "Performing SSL/TLS handshake for session 141. Verify certificate: False"
"DEBUG" 8324 "2018-02-23 15:23:04.567" "Ending session 141"
"DEBUG" 8324 "2018-02-23 15:23:16.532" "Creating session 143"
"DEBUG" 8324 "2018-02-23 15:23:16.533" "TCP connection started for session 139"
"DEBUG" 8324 "2018-02-23 15:23:16.857" "Ending session 139"
"DEBUG" 8324 "2018-02-23 15:23:49.445" "Creating session 144"
"DEBUG" 8324 "2018-02-23 15:23:49.447" "TCP connection started for session 142"
"DEBUG" 8324 "2018-02-23 15:23:49.633" "Performing SSL/TLS handshake for session 142. Verify certificate: False"

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMailServer hangs after about an hour

Post by mattg » 2018-02-23 16:39

That all looks normal...

Would you try the latest Beta bersion

I just saw this in the change log, and wonder if it is related
Issue 208: If the cipher list contains unsupported ciphers, hMailServer will now report an error but continue running. This change will prevent hMailServer from stop working after an upgrade (which previously happened if the cipher list contained ciphers supported in the old but not in the new version)
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 18:14

Yeah, that didn't work. Like I mentioned before, the SChannel error only occurs sometimes anyway, and the beta still crashes after about an hour. Nothing on log (debug still on), nothing in errors, nothing in the event viewer. I'm kind of running out of ideas here.

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: hMailServer hangs after about an hour

Post by Dravion » 2018-02-23 18:19

The Problem is, a connection could be established but 0 Bytes payload SMTP RFC 5321 or IMAPv4.1
Command tokens waa received at hMailSevers side. Something in the midfle is blocking or your Mail User Agent doesnt sent the correct command tokens, required by SMTP or IMAP. The connectionwill be uphold until a threshold of inactivity is reached and hMailServer will simply drop the inatice connection after a while.

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-23 18:31

There were connections with no payload, but none of them are from me. I know that they time out if you don't send anything, the point is, when I try to connect manually in this hung-up state, I don't even get a 220 ESMTP message, I just get silence, and if I send anything, I don't get a response. I don't think this is a problem related to my MUA as it even occurs when I connect to the server using plain netcat.

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMailServer hangs after about an hour

Post by mattg » 2018-02-24 00:23

What are your thread settings under Performance?
Do you have anti-virus on this machine? Some ANtivirus does mail inspection
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

darkphoenix
New user
New user
Posts: 11
Joined: 2018-02-22 23:09

Re: hMailServer hangs after about an hour

Post by darkphoenix » 2018-02-24 00:55

Performance settings should be on defaults, never changed anything there. No AV either, except for a ClamAV/clamd I used for checking mail at some point, but that's not running right now.

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hMailServer hangs after about an hour

Post by mattg » 2018-02-24 02:03

My performance settings are currently 32,25 & 25
I don't remember what the defaults are...

My server has ~12 domains, ~50 accounts, 200-250 real messages per day + at least triple that in Spam attempts
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

RBoy
New user
New user
Posts: 26
Joined: 2018-12-04 04:28

Re: hMailServer hangs after about an hour

Post by RBoy » 2019-06-04 18:16

Did anyone ever figure this out? I seem to be having a similar issue. My hMailServer on a windows server just seems to hang. It funny because the status page says "Stopping" for some reason. I don't know why it change from running to stopping. The action button is disabled, until I manually restart the server from the services page.

I don't have any scheduled tasks or custom scripts or anything. It' as basic as an installation can get, literally out of the box, one domain with DKIM and one account. The server sends under a 100 emails a day at best or sometimes just a few.

The only thing I see a bunch of auto bans and constant attempts by hackers to try and login to the SMTP server every few minutes (all other protocols are disabled). There are no errors in the logs or the event viewer. This seems to have started recently after the auto bans started filling up.

Any thoughts?

User avatar
jimimaseye
Moderator
Moderator
Posts: 8549
Joined: 2011-09-08 17:48

Re: hMailServer hangs after about an hour

Post by jimimaseye » 2019-06-04 19:32

5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

RBoy
New user
New user
Posts: 26
Joined: 2018-12-04 04:28

Re: hMailServer hangs after about an hour

Post by RBoy » 2019-06-04 20:46

Thank you very much, I don't see a lot of SYN_RCVD under hMailServer but I see see it under svchost.exe and on port 21 and instead of 587. I'll keep and on eye the next time it hangs.

The symptoms are EXACTLY like you said, the pause button doens't work and the server is stuck in Stopping mode.

RBoy
New user
New user
Posts: 26
Joined: 2018-12-04 04:28

Re: hMailServer hangs after about an hour

Post by RBoy » 2019-06-04 21:45

I take that back, I had enabled the firewall after reading your post which was blocking the ports to hMailServer. After creating an exception, I see a TON of SYN_RCVD but they are on port 25.

Can I disable port 25? I'm only using the server to send eMails via TLS. That just means I won't be able to receive eMail right?

User avatar
jimimaseye
Moderator
Moderator
Posts: 8549
Joined: 2011-09-08 17:48

Re: hMailServer hangs after about an hour

Post by jimimaseye » 2019-06-04 23:30

No port 25 means you will only receive emails in the hmailserver by clients (connecting to pass a delivery request) on other ports or by pop3 external download collection; you won't be receiving outside emails from other servers any other way.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

RBoy
New user
New user
Posts: 26
Joined: 2018-12-04 04:28

Re: hMailServer hangs after about an hour

Post by RBoy » 2019-06-06 15:59

Thanks, that didn't work unfortunately, I'll post on the other thread to continue the discussion

RBoy
New user
New user
Posts: 26
Joined: 2018-12-04 04:28

Re: hMailServer hangs after about an hour

Post by RBoy » 2019-06-06 16:33

Apologies, please ignore my earlier posts, they aren't relevant, I found out why my hMailServer is stopping and will create a separate topic for it. (it to do a a VB script that started hanging recently). You information was very helpful anyways for future reference.

Post Reply