who know the two numbers which before time and after protocal means

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
V587
New user
New user
Posts: 1
Joined: 2019-03-22 09:04

who know the two numbers which before time and after protocal means

Post by V587 » 2019-03-22 09:10

The Log like below ,I want to know 2136 and 6 means?

"SMTPD" 2136 6 "2019-03-22 03:15:35.853" "103.99.0.192" "SENT: 220 "
"SMTPD" 2128 6 "2019-03-22 03:15:36.025" "103.99.0.192" "RECEIVED: EHLO User"
"SMTPD" 2128 6 "2019-03-22 03:15:36.025" "103.99.0.192" "SENT: 250-CNGB00153[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"

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

Re: who know the two numbers which before time and after protocal means

Post by jimimaseye » 2019-03-22 10:03

The 1st number is an internal identifier that is linked to individual processes that are taking place in code as it processes. It will mean nothing to you.

The 2nd number ("6") are unique 'sessions' that link for each email conversation that is taking place. This is the only number that is useful to you.

To see it in action post a section of log file in to https://log.damnation.org.uk/ and you will get a better understanding.
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 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

User avatar
SorenR
Senior user
Senior user
Posts: 3155
Joined: 2006-08-21 15:38
Location: Denmark

Re: who know the two numbers which before time and after protocal means

Post by SorenR » 2019-03-22 11:02

Actually, the first number is the Windows Thread ID from the code executing the specific log line(s).
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

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

Re: who know the two numbers which before time and after protocal means

Post by mattg » 2019-03-22 12:42

Well there is me learning something today
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
SorenR
Senior user
Senior user
Posts: 3155
Joined: 2006-08-21 15:38
Location: Denmark

Re: who know the two numbers which before time and after protocal means

Post by SorenR » 2019-03-22 13:18

mattg wrote:
2019-03-22 12:42
Well there is me learning something today
I modified my 5.4.2 to include "obApp.Status.ThreadID" :mrgreen:
I use it for my LogWriter so I can crossmatch with the normal logging.

Code: Select all

diff -bur hmailserver-5.4.2-B1964/hmailserver/source/Server/COM/InterfaceStatus.cpp hmailserver-5.4.2/hmailserver/source/Server/COM/InterfaceStatus.cpp
--- hmailserver-5.4.2-B1964/hmailserver/source/Server/COM/InterfaceStatus.cpp	2014-06-07 10:03:10.000000000 +0200
+++ hmailserver-5.4.2/hmailserver/source/Server/COM/InterfaceStatus.cpp	2019-03-04 14:45:12.484375000 +0100
@@ -125,4 +125,20 @@
    }
 }
 
+STDMETHODIMP 
+InterfaceStatus::get_ThreadID(long *pVal)
+{
+   try
+   {
+      if (!m_pStatus)
+         return GetAccessDenied();
+
+      *pVal = m_pStatus->GetThreadID();
+      return S_OK;
+   }
+   catch (...)
+   {
+      return COMError::GenerateGenericMessage();
+   }
+}
 
diff -bur hmailserver-5.4.2-B1964/hmailserver/source/Server/COM/InterfaceStatus.h hmailserver-5.4.2/hmailserver/source/Server/COM/InterfaceStatus.h
--- hmailserver-5.4.2-B1964/hmailserver/source/Server/COM/InterfaceStatus.h	2014-06-07 10:03:10.000000000 +0200
+++ hmailserver-5.4.2/hmailserver/source/Server/COM/InterfaceStatus.h	2019-03-04 14:45:12.375000000 +0100
@@ -51,6 +51,7 @@
    STDMETHOD(get_RemovedViruses)(/*[out, retval]*/ long *pVal);
    STDMETHOD(get_RemovedSpamMessages)(/*[out, retval]*/ long *pVal);
    STDMETHOD(get_SessionCount)(eSessionType iType, long *pVal);
+   STDMETHOD(get_ThreadID)(/*[out, retval]*/ long *pVal);
 
 private:
 
diff -bur hmailserver-5.4.2-B1964/hmailserver/source/Server/Common/Util/ServerStatus.cpp hmailserver-5.4.2/hmailserver/source/Server/Common/Util/ServerStatus.cpp
--- hmailserver-5.4.2-B1964/hmailserver/source/Server/Common/Util/ServerStatus.cpp	2014-06-07 10:03:10.000000000 +0200
+++ hmailserver-5.4.2/hmailserver/source/Server/Common/Util/ServerStatus.cpp	2019-03-04 14:45:12.625000000 +0100
@@ -158,4 +158,11 @@
    {
       return SessionManager::Instance()->GetNumberOfConnections((SessionType) iSessionType);
    }
+
+   int 
+   ServerStatus::GetThreadID() const
+   {
+      DWORD dwThreadID = GetCurrentThreadId();
+      return dwThreadID;
+   }
 }
diff -bur hmailserver-5.4.2-B1964/hmailserver/source/Server/Common/Util/ServerStatus.h hmailserver-5.4.2/hmailserver/source/Server/Common/Util/ServerStatus.h
--- hmailserver-5.4.2-B1964/hmailserver/source/Server/Common/Util/ServerStatus.h	2014-06-07 10:03:10.000000000 +0200
+++ hmailserver-5.4.2/hmailserver/source/Server/Common/Util/ServerStatus.h	2019-03-04 14:45:12.562500000 +0100
@@ -36,6 +36,8 @@
 
       int GetNumberOfSessions(int iSessionType);
 
+      int GetThreadID() const;
+
    private:
 
       int m_iProcessedMessages;
diff -bur hmailserver-5.4.2-B1964/hmailserver/source/Server/hMailServer/hMailServer.idl hmailserver-5.4.2/hmailserver/source/Server/hMailServer/hMailServer.idl
--- hmailserver-5.4.2-B1964/hmailserver/source/Server/hMailServer/hMailServer.idl	2014-06-07 10:03:10.000000000 +0200
+++ hmailserver-5.4.2/hmailserver/source/Server/hMailServer/hMailServer.idl	2019-03-04 14:45:12.250000000 +0100
@@ -497,6 +497,7 @@
    [propget, id(4), helpstring("Gets the number of removed virues")] HRESULT RemovedViruses([out, retval] long *pVal);
    [propget, id(5), helpstring("Gets the number of detected spam messages")] HRESULT RemovedSpamMessages([out, retval] long *pVal);
    [propget, id(6), helpstring("Gets the current number of sessions")] HRESULT SessionCount([in] eSessionType iType, [out, retval] long *pVal);
+   [propget, id(7), helpstring("Gets the current thread number")] HRESULT ThreadID([out, retval] long *pVal);
 };
 
 [
SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

Post Reply