Separet log files

Use this forum if you want to suggest a new feature to hMailServer. Before posting, please search the forum to confirm that it has not already been suggested.
Post Reply

Do you want separet logfiles?

Yes
12
50%
Yes, but not as default
10
42%
No
2
8%
 
Total votes: 24

Konradsen
New user
New user
Posts: 1
Joined: 2007-07-26 16:15
Location: Odense, DK
Contact:

Separet log files

Post by Konradsen » 2008-01-10 20:40

I personally don't like, that all types of log entry's is stored in only one logfile, named after the date. I would like to seperate the logfiles, so the different kind of logging, goes into different kind of logfiles, eg.:

Debug logs -> debug_2008-01-29.log
POP3 logs -> pop3_2008-01-29.log
SMTP Logs -> smtp_2008-01-29.log
TCP/IP Logs -> tcpip_2008-01-29.log

ect... you get the point.

It could be default, or just implemented, so you could choose it.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2008-01-10 20:53

I personally prefer the log file to be in one, I can follow transactions quite easily being in one file rather than having to search multiple files.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Post by Kaan1983 » 2008-01-10 22:53

I think chronological order is important, but it can also be an option. Or actually Konradsen, if you can open the log files with excel kinda application then you can filter the type? If not the log structure can be changed in that way.

iprat
Normal user
Normal user
Posts: 247
Joined: 2005-05-20 16:50
Location: Barcelona, EU
Contact:

Post by iprat » 2008-01-11 18:01

Kaan1983 wrote:I think chronological order is important, but it can also be an option. Or actually Konradsen, if you can open the log files with excel kinda application then you can filter the type? If not the log structure can be changed in that way.
That would be the best solution, chronological if you don't filter, by service if you filter :D
My perfect combination:
hMailServer 5.6.1 (B2208), ASSP 1.3.3.8 (antispam), Clamav 0.98.6 (antivirus)

User avatar
AdrianK_IT
Normal user
Normal user
Posts: 63
Joined: 2009-01-28 19:59
Location: Scottish Borders, UK

Re: Separet log files

Post by AdrianK_IT » 2013-04-24 17:48

I am re-opening this topic (last covered in 2008) since I have been studying my logs in detail recently to monitor the results of implementing various anti-spam measures, and without some on-the-fly editing of the log output when viewed, hMailServer logs are headache-inducingly difficult to read!

I'm interested in viewing SMTP conversations and DNS lookups eg to zen.spamhaus.org, but I have no regular interest in other TCP/IP traffic; it's not possible to set this option.

When I want to view my logs, I run a php script that opens them in Notepad on my desktop, having filtered out lines containing 'Posting AcceptEx' (irrelevant TCP/IP traffic) and adding two blank lines after 'SENT: 221 goodbye', making the end/start of each conversation very easy to find (mostly - sometimes they overlap when the server is busy).
aka itproxy | Asus T100TA | Win 8.1 32-bit | Apache 2.4 | hMail 5.6 | AfterLogic 5.0 | MySQL 5.5 | PHP 5.4 | FileZilla 0.9 | BIND 9.11 | TightVNC 2.7 | FreeSSH 1.2 | BitviseSSH 6.0 | Comodo 7.0

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

Re: Separet log files

Post by Bill48105 » 2013-04-24 22:08

itproxy wrote:I am re-opening this topic (last covered in 2008) since I have been studying my logs in detail recently to monitor the results of implementing various anti-spam measures, and without some on-the-fly editing of the log output when viewed, hMailServer logs are headache-inducingly difficult to read!

I'm interested in viewing SMTP conversations and DNS lookups eg to zen.spamhaus.org, but I have no regular interest in other TCP/IP traffic; it's not possible to set this option.

When I want to view my logs, I run a php script that opens them in Notepad on my desktop, having filtered out lines containing 'Posting AcceptEx' (irrelevant TCP/IP traffic) and adding two blank lines after 'SENT: 221 goodbye', making the end/start of each conversation very easy to find (mostly - sometimes they overlap when the server is busy).
I did this a LONG time ago in 5.4. (In my experimental back to July 2010 & in official source tree & released after Oct 2010). It's not not obvious because it's considered an experimental feature & not in the GUI requiring INI change:
http://www.hmailserver.com/forum/viewto ... 38#p132238
1st few are log related:

Code: Select all

hMailServer/bin/hMailServer.INI
[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
;NOTE: Not really functional at this point except a few specific places

;MaxLogLineLen=300
With SepSvcLogs=1 set your logs end up like:

Code: Select all

04/23/2013  11:57 PM           153,351 ERROR_hmailserver_2013-04-23.log
04/24/2013  04:06 PM           109,338 ERROR_hmailserver_2013-04-24.log
04/23/2013  11:59 PM        66,794,607 hmailserver_2013-04-23.log
04/24/2013  12:37 AM           562,730 hmailserver_2013-04-24.log
04/24/2013  04:08 PM        11,163,292 hmailserver_events.log
04/23/2013  12:32 AM        20,919,026 hmailserver_events_2013-04-23.log
04/24/2013  12:18 AM        15,181,746 hmailserver_events_2013-04-24.log
04/23/2013  11:59 PM        18,296,936 hmailserver_IMAP_2013-04-23.log
04/24/2013  12:37 AM           350,863 hmailserver_IMAP_2013-04-24.log
04/23/2013  11:59 PM       103,240,799 hmailserver_POP3_2013-04-23.log
04/24/2013  12:37 AM           841,746 hmailserver_POP3_2013-04-24.log
04/23/2013  11:59 PM        40,154,109 hmailserver_SMTP_2013-04-23.log
04/24/2013  12:37 AM           364,640 hmailserver_SMTP_2013-04-24.log
Note that Events does not get rotated automatically by hmail like other log files.. I run a script that rotates it daily.
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. ***

YujiSaeki
Normal user
Normal user
Posts: 36
Joined: 2013-05-12 15:41

Re: Separet log files

Post by YujiSaeki » 2013-05-30 19:22

I'd like separate log files based on domain. Got several domains, several filesystems.

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

Re: Separet log files

Post by Bill48105 » 2013-05-30 19:42

YujiSaeki wrote:I'd like separate log files based on domain. Got several domains, several filesystems.
Yeah that could be handy but I'd have to look at the code to see how difficult it'd be. I have a feeling it'd not be an easy task though as I doubt the domain is available at that point.
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. ***

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Separet log files

Post by ^DooM^ » 2013-06-02 14:45

That would not be simple, hmail would have to buffer all the log data until the other server told hmail which domain the email was being sent to, then hMail would have to write that buffer to the log file. On a server running thousands of domains with hundreds of connections each second, that is going to be both memory and cpu intensive. Not saying it can't be done, just it's not as easy as it sounds.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

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

Re: Separet log files

Post by Bill48105 » 2013-06-02 15:53

^DooM^ wrote:That would not be simple, hmail would have to buffer all the log data until the other server told hmail which domain the email was being sent to, then hMail would have to write that buffer to the log file. On a server running thousands of domains with hundreds of connections each second, that is going to be both memory and cpu intensive. Not saying it can't be done, just it's not as easy as it sounds.
Yeah exactly D. On top of that the code doesn't pass the domain to the logging code so that'd have be added. It's partly why it'd be nice to get syslog output in then a lot more would be possible in Kiwi or such.
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. ***

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Separet log files

Post by ^DooM^ » 2013-06-03 18:07

Agreed adding syslog snmp support would be better time spent.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

DeanoX
Senior user
Senior user
Posts: 480
Joined: 2005-11-05 00:07
Location: Michigan

Re: Separet log files

Post by DeanoX » 2013-06-12 05:06

Can this poll be modified so that votes can be changed please.

Thanks,
-Dean
hMailServer 5.4.2-1964, mysql, ClamAV, SpamAssassin, SquirrelMail, GeoIP.
hMailServer Support Services for US Based Clients.
Low Rates, Quick Service. Send a Private Message for More Information.

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

Re: Separet log files

Post by mattg » 2013-06-12 05:31

done
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

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

Re: Separet log files

Post by Bill48105 » 2013-06-12 06:28

DeanoX wrote:Can this poll be modified so that votes can be changed please.

Thanks,
-Dean
How did you vote?
Btw not even sure why this feature request & post still exists. As I said earlier I added this to hmail back in 2010! lol
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. ***

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

Re: Separet log files

Post by mattg » 2013-06-12 07:51

Bill48105 wrote:Btw not even sure why this feature request & post still exists. As I said earlier I added this to hmail back in 2010! lol
http://www.hmailserver.com/forum/viewto ... =7&t=24896
Bill48105 wrote:The INI settings I add are all considered TEMPORARY (to avoid worrying about database upgrades between sub-versions) and advanced/experimental so they could go away some day be it because the feature is removed/replaced or if deemed useful they will be moved to the GUI & database instead.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

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

Re: Separet log files

Post by Bill48105 » 2013-06-12 15:40

mattg wrote:
Bill48105 wrote:Btw not even sure why this feature request & post still exists. As I said earlier I added this to hmail back in 2010! lol
http://www.hmailserver.com/forum/viewto ... =7&t=24896
Bill48105 wrote:The INI settings I add are all considered TEMPORARY (to avoid worrying about database upgrades between sub-versions) and advanced/experimental so they could go away some day be it because the feature is removed/replaced or if deemed useful they will be moved to the GUI & database instead.
LOL good point but at time time there have been no issues, people are using it & I don't see martin taking the time to rip out the changes so I think it's safe to say it's here to stay. :D Indeed could be added to GUI and database though but we're saving up things to do a bunch at once to avoid multiple DB changes.
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. ***

DeanoX
Senior user
Senior user
Posts: 480
Joined: 2005-11-05 00:07
Location: Michigan

Re: Separet log files

Post by DeanoX » 2013-06-12 18:44

Bill48105 wrote: How did you vote?
Btw not even sure why this feature request & post still exists. As I said earlier I added this to hmail back in 2010! lol
I understand that the capability to separate the logs now exists.

I just wanted to change my vote from yes, to yes, but not as default. That's how I would like it to behave.

Since you brought up in another thread, that adding new features may be on the horizon, I am just going over all the requests.
hMailServer 5.4.2-1964, mysql, ClamAV, SpamAssassin, SquirrelMail, GeoIP.
hMailServer Support Services for US Based Clients.
Low Rates, Quick Service. Send a Private Message for More Information.

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

Re: Separet log files

Post by Bill48105 » 2013-06-12 22:39

DeanoX wrote:
Bill48105 wrote: How did you vote?
Btw not even sure why this feature request & post still exists. As I said earlier I added this to hmail back in 2010! lol
I understand that the capability to separate the logs now exists.

I just wanted to change my vote from yes, to yes, but not as default. That's how I would like it to behave.

Since you brought up in another thread, that adding new features may be on the horizon, I am just going over all the requests.
Ahh gotcha. Thx for going over the requests, that was why I posted the link to the summary lists. Was hoping people would do just that.:) And yes it seems people should be able to change their answer especially after years as things/opinions change.
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. ***

Post Reply