Limit size of 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.
HolyOne
New user
New user
Posts: 1
Joined: 2017-08-08 09:31

Limit size of log files

Postby HolyOne » 2017-08-08 09:34

Please add a feature to limit Log files for a limited timespan.
It fills all hard disk space on long mailings

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

Re: Limit size of log files

Postby jimimaseye » 2017-08-08 10:26

(Here's another one folks. His next posts will be posting spam and the hammer will hit him hard. Still lets play along......)

Turn off logging!
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
Dravion
Senior user
Senior user
Posts: 719
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Limit size of log files

Postby Dravion » 2017-08-08 12:08

You can use Logfile rotation, which is also common practice on most Linux and Unix-Systems

Here is a Powershellscript which will do the Job on Windows
https://gallery.technet.microsoft.com/s ... l-a96ec7d4

It is checking the size of the logfile or number of entries and if a given count is reached it will move the current
logfile under a new timestamped filename and creates a new current logfile which is of cause empty.

On Linux its best practice to create a Cronjob or a time triggered SystemD Job for daily logrotation but on Windows
a new task which invokes the script from time to time will do the same.Additionally you can compress the older
logfiles first to save Harddisk space.
My experimental builds of hMailserver 32/64-Bit+Unicode
https://github.com/Dravion/hmailserver/releases

HMSInfo 32/64-Bit
https://github.com/Dravion/HMSInfo/releases

User avatar
RvdH
Senior user
Senior user
Posts: 460
Joined: 2008-06-27 14:42
Location: Netherlands

Re: Limit size of log files

Postby RvdH » 2017-08-08 14:15

The logfile is rotated every day automatically isn't? Do not log IMAP that would your logfiles rather small
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

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

Re: Limit size of log files

Postby mattg » 2017-08-09 01:24

Yep I log all but IMAP too

jimimaseye doesn't log POP3 either, but I think his POP3 logs are large due to many external account downloads, all leaving messages on the server. I don't have the issue of large POP3 logs.

I keep all of my logs rather than rotate them, but I do 7z them to less than a 10th their original size. My monthly logs 7z of all logs that I create (I have heaps of custom logs as well as what hMailsevrer does) are mostly about 15MB when 7zipped.

Perhaps a better feature request would be the ability to turn down the verboseness of POP3 and IMAP logging, so that just connections and log-ons are logged, not all of the 'messages UIDs' etc
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
jimimaseye
Moderator
Moderator
Posts: 6504
Joined: 2011-09-08 17:48

Re: Limit size of log files

Postby jimimaseye » 2017-08-09 14:04

mattg wrote:jimimaseye doesn't log POP3 either, but I think his POP3 logs are large due to many external account downloads, all leaving messages on the server. I don't have the issue of large POP3 logs.

Thats right. The reason my POP3 logs are so large is because all of my emails are collected by External Download (we dont use POP3 clients - we are all IMAP). As I use a retain period of 30 days before deletion from host server, we get an entry of each email message UID residing on the host system appearing in the connection log and this can be a lot of entries (30 days worth). The log, therefore, can be such as the following every minute (as thats my poll frequency) and for every external download account, and you can imagine the list getting VERY long:

Code: Select all

"POP3C"   4180   3036   "2017-08-09 12:56:27.585"   "195.26.90.20"   "RECEIVED: +OK mailsub2.host.net Cyrus POP3 Murder v2.4.16-Kolab-2.4.16-1.el6 server ready <13132088822518232992.1502279791@mailsub2.host.net>"
"POP3C"   4180   3036   "2017-08-09 12:56:27.585"   "195.26.90.20"   "SENT: USER sylvester@mydomain.net"
"POP3C"   4968   3036   "2017-08-09 12:56:27.616"   "195.26.90.20"   "RECEIVED: +OK Name is a valid mailbox"
"POP3C"   4968   3036   "2017-08-09 12:56:27.616"   "195.26.90.20"   "SENT: ***"
"POP3C"   4424   3036   "2017-08-09 12:56:27.647"   "195.26.90.20"   "RECEIVED: +OK Mailbox locked and ready SESSIONID=<ms7.myhost.net-17496-1502279791-1>"
"POP3C"   4424   3036   "2017-08-09 12:56:27.647"   "195.26.90.20"   "SENT: UIDL"
"POP3C"   3580   3036   "2017-08-09 12:56:27.897"   "195.26.90.20"   "RECEIVED: +OK unique-id listing follows[nl]1 1356714592.33802[nl]2 1356714592.33803[nl]3 1356714592.33804[nl]4 1356714592.33805[nl]5 1356714592.33806[nl]6 1356714592.33807[nl]7 1356714592.33808[nl]8 1356714592.33809[nl]9 1356714592.33810[nl]10 1356714592.33811[nl]11 1356714592.33812[nl]12 1356714592.33813[nl]13 1356714592.33814[nl]14 1356714592.33815[nl]15 1356714592.33816[nl]16 1356714592.33817[nl]17 1356714592.33818[nl]18 1356714592.33819[nl]19 1356714592.33820[nl]20 1356714592.33821[nl]21 1356714592.33822[nl]22 1356714592.33823[nl]23 1356714592.33824[nl]24 1356714592.33825[nl]25 1356714592.33826[nl]26 1356714592.33827[nl]27 1356714592.33828[nl]28 1356714592.33829[nl]29 1356714592.33830[nl]30 1356714592.33831[nl]31 1356714592.33832[nl]32 1356714592.33833[nl]33 1356714592.33834[nl]34 1356714592.33835[nl]35 1356714592.33836[nl]36 1356714592.33837[nl]37 1356714592.33838[nl]38 1356714592.33839[nl]39 1356714592.33840[nl]40 1356714592.33841[nl]41 1356714592.33842[nl]42 1356714592.33843[nl]43 1356714592.33844[nl]44 1356714592.33845[nl]45 1356714592.33846[nl]46 1356714592.33847[nl]47 1356714592.33848[nl]48 1356714592.33849[nl]49 1356714592.33850[nl]50 1356714592.33851[nl]51 1356714592.33852[nl]52 1356714592.33853[nl]53 1356714592.33854[nl]54 1356714592.33855[nl]55 1356714592.33856[nl]56 1356714592.33857[nl]57 1356714592.33858[nl]58 1356714592.33859[nl]59 1356714592.33860[nl]60 1356714592.33861[nl]61 1356714592.33862[nl]62 1356714592.33863[nl]63 1356714592.33864[nl]64 1356714592.33865[nl]65 1356714592.33866[nl]66 1356714592.33867[nl]67 1356714592.33868[nl]68 1356714592.33869[nl]69 1356714592.33870[nl]70 1356714592.33871[nl]71 1356714592.33872[nl]72 1356714592.33873[nl]73 1356714592.33874[nl]74 1356714592.33875[nl]75 1356714592.33876[nl]76 1356714592.33877[nl]77 1356714592.33878[nl]78 1356714592.33879[nl]79 1356714592.33880[nl]80 1356714592.33881[nl]81 1356714592.33882[nl]82 1356714592.33883[nl]83 1356714592.33884[nl]84 1356714592.33885[nl]85 1356714592.33886[nl]86 1356714592.33887[nl]87 1356714592.33888[nl]88 1356714592.33889[nl]89 1356714592.33890[nl]90 1356714592.33891[nl]91 1356714592.33892[nl]92 1356714592.33893[nl]93 1356714592.33894[nl]94 1356714592.33895[nl]95 1356714592.33896[nl]96 1356714592.33897[nl]97 1356714592.33898[nl]98 1356714592.33899[nl]99 1356714592.33900[nl]100 1356714592.33901[nl]101 1356714592.33902[nl]102 1356714592.33903[nl]103 1356714592.33904[nl]104 1356714592.33905[nl]105 1356714592.33906[nl]106 1356714592.33907[nl]107 1356714592.33908[nl]108 1356714592.33909[nl]109 1356714592.33910[nl]110 1356714592.33911[nl]111 1356714592.33912[nl]112 1356714592.33913[nl]113 1356714592.33914[nl]114 1356714592.33915[nl]115 1356714592.33916[nl]116 1356714592.33917[nl]117 1356714592.33918[nl]118 1356714592.33919[nl]119 1356714592.33920[nl]120 1356714592.33921[nl]121 1356714592.33922[nl]122 1356714592.33923[nl]123 1356714592.33924[nl]124 1356714592.33925[nl]125 1356714592.33926[nl]126 1356714592.33927[nl]127 1356714592.33928[nl]128 1356714592.33929[nl]129 1356714592.33930[nl]130 1356714592.33931[nl]131 1356714592.33932[nl]132 1356714592.33933[nl]133 1356714592.33934[nl]134 1356714592.33935[nl]135 1356714592.33936[nl]136 1356714592.33937[nl]137 1356714592.33938[nl]138 1356714592.33939[nl]139 1356714592.33940[nl]140 1356714592.33941[nl]141 1356714592.33942[nl]142 1356714592.33943[nl]143 1356714592.33944[nl]144 1356714592.33945[nl]145 1356714592.33946[nl]146 1356714592.33947[nl]147 1356714592.33948[nl]148 1356714592.33949[nl]149 1356714592.33950[nl]150 1356714592.33951[nl]151 1356714592.33952[nl]152 1356714592.33953[nl]153 1356714592.33954[nl]154 1356714592.33955[nl]155 1356714592.33956[nl]156 1356714592.33957[nl]157 1356714592.33958[nl]158 1356714592.33959[nl]159 1356714592.33960[nl]160 1356714592.33961[nl]161 1356714592.33962[nl]162 1356714592.33963[nl]163 1356714592.33964[nl]164 1356714592.33965[nl]165 1356714592.33966[nl]166 1356714592.33967[nl]167 1356714592.33968[nl]168 1356714592.33969[nl]169 1356714592.33970[nl]170 1356714592.33971[nl]171 1356714592.33972[nl]172 1356714592.33973[nl]173 1356714592.33974[nl]174 1356714592.33975[nl]175 1356714592.33976[nl]176 1356714592.33977[nl]177 1356714592.33978[nl]178 1356714592.33979[nl]179 1356714592.33980[nl]180 1356714592.33981[nl]181 1356714592.33982[nl]182 1356714592.33983[nl]183 1356714592.33984[nl]184 1356714592.33985[nl]185 1356714592.33986[nl]186 1356714592.33987[nl]187 1356714592.33988[nl]188 1356714592.33989[nl]189 1356714592.33990[nl]190 1356714592.33991[nl]191 1356714592.33992[nl]192 1356714592.33993[nl]193 1356714592.33994[nl]194 1356714592.33995[nl]195 1356714592.33996[nl]196 1356714592.33997[nl]197 1356714592.33998[nl]198 1356714592.33999[nl]199 1356714592.34000[nl]200 1356714592.34001[nl]201 1356714592.34002[nl]202 1356714592.34003[nl]203 1356714592.34004[nl]204 1356714592.34005[nl]205 1356714592.34006[nl]206 1356714592.34007[nl]207 1356714592.34008[nl]208 1356714592.34009[nl]209 1356714592.34010[nl]210 1356714592.34011[nl]211 1356714592.34012[nl]212 1356714592.34013[nl]213 1356714592.34014[nl]214 1356714592.34015[nl]215 1356714592.34016[nl]216 1356714592.34017[nl]217 1356714592.34018[nl]218 1356714592.34019[nl]219 1356714592.34020[nl]220 1356714592.34021[nl]221 1356714592.34022[nl]222 1356714592.34023[nl]223 1356714592.34024[nl]224 1356714592.34025[nl]225 1356714592.34026[nl]226 1356714592.34027[nl]227 1356714592.34028[nl]228 1356714592.34029[nl]229 1356714592.34030[nl]230 1356714592.34031[nl]231 1356714592.34032[nl]232 1356714592.34033[nl]233 1356714592.34034[nl]234 1356714592.34035[nl]235 1356714592.34036[nl]236 1356714592.34037[nl]237 1356714592.34038[nl]238 1356714592.34039[nl]239 1356714592.34040[nl]240 1356714592.34041[nl]241 1356714592.34042[nl]242 1356714592.34043[nl]243 1356714592.34044[nl]244 1356714592.34045[nl]245 1356714592.34046[nl]246 1356714592.34047[nl]247 1356714592.34048[nl]248 1356714592.34049[nl]249 1356714592.34050[nl]250 1356714592.34051[nl]251 1356714592.34052[nl]252 1356714592.34053[nl]253 1356714592.34054[nl]254 1356714592.34055[nl]255 1356714592.34056[nl]256 1356714592.34057[nl]257 1356714592.34058[nl]258 1356714592.34059[nl]259 1356714592.34060[nl]260 1356714592.34061[nl]261 1356714592.34062[nl]262 1356714592.34063[nl]263 1356714592.34064[nl]264 1356714592.34065[nl]265 1356714592.34066[nl]266 1356714592.34067[nl]267 1356714592.34068[nl]268 1356714592.34069[nl]269 1356714592.34070[nl]270 1356714592.34071[nl]271 1356714592.34072[nl]272 1356714592.34073[nl]273 1356714592.34074[nl]274 1356714592.34075[nl]275 1356714592.34076[nl]276 1356714592.34077[nl]277 1356714592.34078[nl]278 1356714592.34079[nl]279 1356714592.34080[nl]280 1356714592.34081[nl]281 1356714592.34082[nl]282 1356714592.34083[nl]283 1356714592.34084[nl]284 1356714592.34085[nl]285 1356714592.34086[nl]286 1356714592.34087[nl]287 1356714592.34088[nl]288 1356714592.34089[nl]289 1356714592.34090[nl]290 1356714592.34091[nl]291 1356714592.34092[nl]292 1356714592.34093[nl]293 1356714592.34094[nl]294 1356714592.34095[nl]295 1356714592.34096[nl]296 1356714592.34097[nl]297 1356714592.34098[nl]298 1356714592.34099[nl]299 1356714592.34100[nl]300 1356714592.34101[nl]301 1356714592.34102[nl]302 1356714592.34103[nl]303 1356714592.34104[nl]304 1356714592.34105[nl]305 1356714592.34106[nl]306 1356714592.34107[nl]307 1356714592.34108[nl]308 1356714592.34109[nl]309 1356714592.34110[nl]310 1356714592.34111[nl]311 1356714592.34112[nl]312 1356714592.34113[nl]313 1356714592.34114[nl]314 1356714592.34115[nl]315 1356714592.34116[nl]316 1356714592.34117[nl]317 1356714592.34118[nl]318 1356714592.34119[nl]319 1356714592.34120[nl]320 1356714592.34121[nl]321 1356714592.34122[nl]322 1356714592.34123[nl]323 1356714592.34124[nl]324 1356714592.34125[nl]325 1356714592.34126[nl]326 1356714592.34127[nl]327 1356714592.34128[nl]328 1356714592.34129[nl]329 1356714592.34130[nl]330 1356714592.34131[nl]331 1356714592.34132[nl]332 1356714592.34133[nl]333 1356714592.34134[nl]334 1356714592.34135[nl]335 1356714592.34136[nl]336 1356714592.34137[nl]337 1356714592.34138[nl]338 1356714592.34139[nl]339 1356714592.34140[nl]340 1356714592.34141[nl]341 1356714592.34142[nl]342 1356714592.34143[nl]343 1356714592.34144[nl]344 1356714592.34145[nl]345 1356714592.34146[nl]346 1356714592.34147[nl]347 1356714592.34148[nl]348 1356714592.34149[nl]349 1356714592.34150[nl]350 1356714592.34151[nl]351 1356714592.34152[nl]352 1356714592.34153[nl]353 1356714592.34154[nl]354 1356714592.34155[nl]355 1356714592.34156[nl]356 1356714592.34157[nl]357 1356714592.34158[nl]358 1356714592.34159[nl]359 1356714592.34160[nl]360 1356714592.34161[nl]361 1356714592.34162[nl]362 1356714592.34163[nl]363 1356714592.34164[nl]364 1356714592.34165[nl]365 1356714592.34166[nl]366 1356714592.34167[nl]367 1356714592.34168[nl]368 1356714592.34169[nl]369 1356714592.34170[nl]370 1356714592.34171[nl]371 1356714592.34172[nl]372 1356714592.34173[nl]373 1356714592.34174[nl]374 1356714592.34175[nl]375 1356714592.34176[nl]376 1356714592.34177[nl]377 1356714592.34178[nl]378 1356714592.34179[nl]379 1356714592.34180[nl]380 1356714592.34181[nl]381 1356714592.34182[nl]382 1356714592.34183[nl]383 1356714592.34184[nl]384 1356714592.34185[nl]385 1356714592.34186[nl]386 1356714592.34187[nl]387 1356714592.34188[nl]388 1356714592.34189[nl]389 1356714592.34190[nl]390 1356714592.34191[nl]391 1356714592.34192[nl]392 1356714592.34193[nl]393 1356714592.34194[nl]394 1356714592.34195[nl]395 1356714592.34196[nl]396 1356714592.34197[nl]397 1356714592.34198[nl]398 1356714592.34199[nl]399 1356714592.34200[nl]400 1356714592.34201[nl]401 1356714592.34202[nl]402 1356714592.34203[nl]403 1356714592.34204[nl]404 1356714592.34205[nl]405 1356714592.34206[nl]406 1356714592.34207[nl]407 1356714592.34208[nl]408 1356714592.34209[nl]409 1356714592.34210[nl]410 1356714592.34211[nl]411 1356714592.34212[nl]412 1356714592.34213[nl]413 1356714592.34214[nl]414 1356714592.34215[nl]415 1356714592.34216[nl]416 1356714592.34217[nl]417 1356714592.34218[nl]418 1356714592.34219[nl]419 1356714592.34220[nl]420 1356714592.34221[nl]421 1356714592.34222[nl]422 1356714592.34223[nl]423 1356714592.34224[nl]424 1356714592.34225[nl]425 1356714592.34226[nl]426 1356714592.34227[nl]427 1356714592.34228[nl]428 1356714592.34229[nl]429 1356714592.34230[nl]430 1356714592.34231[nl]431 1356714592.34232[nl]432 1356714592.34233[nl]433 1356714592.34234[nl]434 1356714592.34235[nl]435 1356714592.34236[nl]436 1356714592.34237[nl]437 1356714592.34238[nl]438 1356714592.34239[nl]439 1356714592.34240[nl]440 1356714592.34241[nl]441 1356714592.34242[nl]442 1356714592.34243[nl]443 1356714592.34244[nl]444 1356714592.34245[nl]445 1356714592.34246[nl]446 1356714592.34247[nl]447 1356714592.34248[nl]448 1356714592.34249[nl]449 1356714592.34250[nl]450 1356714592.34251[nl]451 1356714592.34252[nl]452 1356714592.34253[nl]453 1356714592.34254[nl]454 1356714592.34255[nl]455 1356714592.34256[nl]456 1356714592.34257[nl]457 1356714592.34258[nl]458 1356714592.34259[nl]459 1356714592.34260[nl]460 1356714592.34261[nl]461 1356714592.34262[nl]462 1356714592.34263[nl]463 1356714592.34264[nl]464 1356714592.34265[nl]465 1356714592.34266[nl]466 1356714592.34267[nl]467 1356714592.34268[nl]468 1356714592.34269[nl]469 1356714592.34270[nl]470 1356714592.34271[nl]471 1356714592.34272[nl]472 1356714592.34273[nl]473 1356714592.34274[nl]474 1356714592.34275[nl]475 1356714592.34276[nl]476 1356714592.34277[nl]477 1356714592.34278[nl]478 1356714592.34279[nl]479 1356714592.34280[nl]480 1356714592.34281[nl]481 1356714592.34282[nl]482 1356714592.34283[nl]483 1356714592.34284[nl]484 1356714592.34285[nl]485 1356714592.34286[nl]486 1356714592.34287[nl]487 1356714592.34288[nl]488 1356714592.34289[nl]489 1356714592.34290[nl]490 1356714592.34291[nl]491 1356714592.34292[nl]492 1356714592.34293[nl]493 1356714592.34294[nl]494 1356714592.34295[nl]495 1356714592.34296[nl]496 1356714592.34297[nl]497 1356714592.34298[nl]498 1356714592.34299[nl]499 1356714592.34300[nl]500 1356714592.34301[nl]501 1356714592.34302[nl]502 1356714592.34303[nl]503 1356714592.34304[nl]504 1356714592.34305[nl]505 1356714592.34306[nl]506 1356714592.34307[nl]507 1356714592.34308[nl]508 1356714592.34309[nl]509 1356714592.34310[nl]510 1356714592.34311[nl]511 1356714592.34312[nl]512 1356714592.34313[nl]513 1356714592.34314[nl]514 1356714592.34315[nl]515 1356714592.34316[nl]516 1356714592.34317[nl]517 1356714592.34318[nl]518 1356714592.34319[nl]519 1356714592.34320[nl]520 1356714592.34321[nl]521 1356714592.34322[nl]522 1356714592.34323[nl]523 1356714592.34324[nl]524 1356714592.34325[nl]525 1356714592.34326[nl]526 1356714592.34327[nl]527 1356714592.34328[nl]528 1356714592.34329[nl]529 1356714592.34330[nl]530 1356714592.34331[nl]531 1356714592.34332[nl]532 1356714592.34333[nl]533 1356714592.34334[nl]534 1356714592.34335[nl]535 1356714592.34336[nl]536 1356714592.34337[nl]537 1356714592.34338[nl]538 1356714592.34339[nl]539 1356714592.34340[nl]540 1356714592.34341[nl]541 1356714592.34342[nl]542 1356714592.34343[nl]543 1356714592.34344[nl]544 1356714592.34345[nl]545 1356714592.34346[nl]546 1356714592.34347[nl]547 1356714592.34348[nl]548 1356714592.34349[nl]549 1356714592.34350[nl]550 1356714592.34351[nl]551 1356714592.34352[nl]552 1356714592.34353[nl]553 1356714592.34354[nl]554 1356714592.34355[nl]555 1356714592.34356[nl]556 1356714592.34357[nl]557 1356714592.34358[nl]558 1356714592.34359[nl]559 1356714592.34360[nl]560 1356714592.34361[nl]561 1356714592.34362[nl]562 1356714592.34363[nl]563 1356714592.34364[nl]564 1356714592.34365[nl]565 1356714592.34366[nl]566 1356714592.34367[nl]567 1356714592.34368[nl]568 1356714592.34369[nl]569 1356714592.34370[nl]570 1356714592.34371[nl]571 1356714592.34372[nl]572 1356714592.34373[nl]573 1356714592.34374[nl]574 1356714592.34375[nl]575 1356714592.34376[nl]576 1356714592.34377[nl]577 1356714592.34378[nl]578 1356714592.34379[nl]579 1356714592.34380[nl]580 1356714592.34381[nl]581 1356714592.34382[nl]582 1356714592.34383[nl]583 1356714592.34384[nl]584 1356714592.34385[nl]585 1356714592.34386[nl]586 1356714592.34387[nl]587 1356714592.34388[nl]588 1356714592.34389[nl]589 1356714592.34390[nl]590 1356714592.34391[nl]591 1356714592.34392[nl]592 1356714592.34393[nl]593 1356714592.34394[nl]594 1356714592.34395[nl]595 1356714592.34396[nl]596 1356714592.34397[nl]597 1356714592.34398[nl]598 1356714592.34399[nl]599 1356714592.34400[nl]600 1356714592.34401[nl]601 1356714592.34402[nl]602 1356714592.34403[nl]603 1356714592.34404[nl]604 1356714592.34405[nl]605 1356714592.34406[nl]606 1356714592.34407[nl]607 1356714592.34408[nl]608 1356714592.34409[nl]609 1356714592.34410[nl]610 1356714592.34411[nl]611 1356714592.34412[nl]612 1356714592.34413[nl]613 1356714592.34414[nl]614 1356714592.34415[nl]615 1356714592.34416[nl]616 1356714592.34417[nl]617 1356714592.34418[nl]618 1356714592.34419[nl]619 1356714592.34420[nl]620 1356714592.34421[nl]621 1356714592.34422[nl]622 1356714592.34423[nl]623 1356714592.34424[nl]624 1356714592.34425[nl]625 1356714592.34426[nl]626 1356714592.34427[nl]627 1356714592.34428[nl]628 1356714592.34429[nl]629 1356714592.34430[nl]630 1356714592.34431[nl]631 1356714592.34432[nl]632 1356714592.34433[nl]633 1356714592.34434[nl]634 1356714592.34435[nl]635 1356714592.34436[nl]636 1356714592.34437[nl]637 1356714592.34438[nl]638 1356714592.34439[nl]639 1356714592.34440[nl]640 1356714592.34441[nl]641 1356714592.34442[nl]642 1356714592.34443[nl]643 1356714592.34444[nl]644 1356714592.34445[nl]645 1356714592.34446[nl]646 1356714592.34447[nl]647 1356714592.34448[nl]648 1356714592.34449[nl]649 1356714592.34450[nl]650 1356714592.34451[nl]651 1356714592.34452[nl]652 1356714592.34453[nl]653 1356714592.34454[nl]654 1356714592.34455[nl]655 1356714592.34456[nl]656 1356714592.34457[nl]657 1356714592.34458[nl]658 1356714592.34459[nl]659 1356714592.34460[nl]660 1356714592.34461[nl]661 1356714592.34462[nl]662 1356714592.34463[nl]663 1356714592.34464[nl]664 1356714592.34465[nl]665 1356714592.34466[nl]666 1356714592.34467[nl]667 1356714592.34468[nl]668 1356714592.34469[nl]669 1356714592.34470[nl]670 1356714592.34471[nl]671 1356714592.34472[nl]672 1356714592.34473[nl]673 1356714592.34474[nl]674 1356714592.34475[nl]675 1356714592.34476[nl]676 1356714592.34477[nl]677 1356714592.34478[nl]678 1356714592.34479[nl]679 1356714592.34480[nl]680 1356714592.34481[nl]681 1356714592.34482[nl]682 1356714592.34483[nl]683 1356714592.34484[nl]684 1356714592.34485[nl]685 1356714592.34486[nl]686 1356714592.34487[nl]687 1356714592.34488[nl]688 1356714592.34489[nl]689 1356714592.34490[nl]690 1356714592.34491[nl]691 1356714592.34492[nl]692 1356714592.34493[nl]693 1356714592.34494[nl]694 1356714592.34495[nl]695 1356714592.34496[nl]696 1356714592.34497[nl]697 1356714592.34498[nl]698 1356714592.34499[nl]699 1356714592.34500[nl]700 1356714592.34501[nl]701 1356714592.34502[nl]702 1356714592.34503[nl]703 1356714592.34504[nl]704 1356714592.34505[nl]705 1356714592.34506[nl]706 1356714592.34507[nl]707 1356714592.34508[nl]708 1356714592.34509[nl]709 1356714592.34510[nl]710 1356714592.34511[nl]711 1356714592.34512[nl]712 1356714592.34513[nl]713 1356714592.34514[nl]714 1356714592.34515[nl]715 1356714592.34516[nl]716 1356714592.34517[nl]717 1356714592.34518[nl]718 1356714592.34519[nl]719 1356714592.34520[nl]720 1356714592.34521[nl]721 1356714592.34522[nl]722 1356714592.34523[nl]723 1356714592.34524[nl]724 1356714592.34525[nl]725 1356714592.34526[nl]726 1356714592.34527[nl]727 1356714592.34528[nl]728 1356714592.34529[nl]729 1356714592.34530[nl]730 1356714592.34531[nl]731 1356714592.34532[nl]732 1356714592.34533[nl]733 1356714592.34534[nl]734 1356714592.34535[nl]735 1356714592.34536[nl]736 1356714592.34537[nl]737 1356714592.34538[nl]738 1356714592.34539[nl]739 1356714592.34540[nl]740 1356714592.34541[nl]741 1356714592.34542[nl]742 1356714592.34543[nl]743 1356714592.34544[nl]744 1356714592.34545[nl]745 1356714592.34546[nl]746 1356714592.34547[nl]747 1356714592.34548[nl]748 1356714592.34549[nl]749 1356714592.34550[nl]750 1356714592.34551[nl]751 1356714592.34552[nl]752 1356714592.34553[nl]753 1356714592.34554[nl]754 1356714592.34555[nl]755 1356714592.34556[nl]756 1356714592.34557[nl]757 1356714592.34558[nl]758 1356714592.34559[nl]759 1356714592.34560[nl]760 1356714592.34561[nl]761 1356714592.34562[nl]762 1356714592.34563[nl]763 1356714592.34564[nl]764 1356714592.34565[nl]765 1356714592.34566[nl]766 1356714592.34567[nl]767 1356714592.34568[nl]768 1356714592.34569[nl]769 1356714592.34570[nl]770 1356714592.34571[nl]771 1356714592.34572[nl]772 1356714592.34573[nl]773 1356714592.34574[nl]774 1356714592.34575[nl]775 1356714592.34576[nl]776 1356714592.34577[nl]777 1356714592.34578[nl]778 1356714592.34579[nl]779 1356714592.34580[nl]780 1356714592.34581[nl]781 1356714592.34582[nl]782 1356714592.34583[nl]783 1356714592.34584[nl]784 1356714592.34585[nl]785 1356714592.34586[nl]786 1356714592.34587[nl]787 1356714592.34588[nl]788 1356714592.34589[nl]789 1356714592.34590[nl]790 1356714592.34591[nl]791 1356714592.34592[nl]792 1356714592.34593[nl]793 1356714592.34594[nl]794 1356714592.34595[nl]795 1356714592.34596[nl]796 1356714592.34597[nl]797 1356714592.34598[nl]798 1356714592.34599[nl]799 1356714592.34600[nl]800 1356714592.34601[nl]801 1356714592.34602[nl]802 1356714592.34603[nl]803 1356714592.34604[nl]804 1356714592.34605[nl]805 1356714592.34606[nl]806 1356714592.34607[nl]807 1356714592.34608[nl]808 1356714592.34609[nl]809 1356714592.34610[nl]810 1356714592.34611[nl]811 1356714592.34612[nl]812 1356714592.34613[nl]813 1356714592.34614[nl]814 1356714592.34615[nl]815 1356714592.34616[nl]816 1356714592.34617[nl]817 1356714592.34618[nl]818 1356714592.34619[nl]819 1356714592.34620[nl]820 1356714592.34621[nl]821 1356714592.34622[nl]822 1356714592.34623[nl]823 1356714592.34624[nl]824 1356714592.34625[nl]825 1356714592.34626[nl]826 1356714592.34627[nl]827 1356714592.34628[nl]828 1356714592.34629[nl]829 1356714592.34630[nl]830 1356714592.34631[nl]831 1356714592.34632[nl]832 1356714592.34633[nl]833 1356714592.34634[nl]834 1356714592.34635[nl]835 1356714592.34636[nl]836 1356714592.34637[nl]837 1356714592.34638[nl]838 1356714592.34639[nl]839 1356714592.34640[nl]840 1356714592.34641[nl]841 1356714592.34642[nl]842 1356714592.34643[nl]843 1356714592.34644[nl]844 1356714592.34645[nl]845 1356714592.34646[nl]846 1356714592.34647[nl]847 1356714592.34648[nl]848 1356714592.34649[nl]849 1356714592.34650[nl]850 1356714592.34651[nl]851 1356714592.34652[nl]852 1356714592.34653[nl]853 1356714592.34654[nl]854 1356714592.34655[nl]855 1356714592.34656[nl]856 1356714592.34657[nl]857 1356714592.34658[nl]858 1356714592.34659[nl]859 1356714592.34660[nl]860 1356714592.34661[nl]861 1356714592.34662[nl]862 1356714592.34663[nl]863 1356714592.34664[nl]864 1356714592.34665[nl]865 1356714592.34666[nl]866 1356714592.34667[nl]867 1356714592.34668[nl]868 1356714592.34669[nl]869 1356714592.34670[nl]870 1356714592.34671[nl]871 1356714592.34672[nl]872 1356714592.34673[nl]873 1356714592.34674[nl]874 1356714592.34675[nl]875 1356714592.34676[nl]876 1356714592.34677[nl]877 1356714592.34678[nl]878 1356714592.34679[nl]879 1356714592.34680[nl]880 1356714592.34681[nl]881 1356714592.34682[nl]882 1356714592.34683[nl]883 1356714592.34684[nl]884 1356714592.34685[nl]885 1356714592.34686[nl]886 1356714592.34687[nl]887 1356714592.34688[nl]888 1356714592.34689[nl]889 1356714592.34690[nl]890 1356714592.34691[nl]891 1356714592.34692[nl]892 1356714592.34693[nl]893 1356714592.34694[nl]894 1356714592.34695[nl]895 1356714592.34696[nl]896 1356714592.34697[nl]897 1356714592.34698[nl]898 1356714592.34699[nl]899 1356714592.34700[nl]900 1356714592.34701[nl]901 1356714592.34702[nl]902 1356714592.34703[nl]903 1356714592.34704[nl]904 1356714592.34705[nl]905 1356714592.34706[nl]906 1356714592.34707[nl]907 1356714592.34708[nl]908 1356714592.34709[nl]909 1356714592.34710[nl]910 1356714592.34711[nl]911 1356714592.34712[nl]912 1356714592.34713[nl]913 1356714592.34714[nl]914 1356714592.34715[nl]915 1356714592.34716[nl]916 1356714592.34717[nl]917 1356714592.34718[nl]918 1356714592.34719[nl]919 1356714592.34720[nl]920 1356714592.34721[nl]921 1356714592.34722[nl]922 1356714592.34723[nl]923 1356714592.34724[nl]924 1356714592.34725[nl]925 1356714592.34726[nl]926 1356714592.34727[nl]927 1356714592.34728[nl]928 1356714592.34729[nl]929 1356714592.34730[nl]930 1356714592.34731[nl]931 1356714592.34732[nl]932 1356714592.34733[nl]933 1356714592.34734[nl]934 1356714592.34735[nl]935 1356714592.34736[nl]936 1356714592.34737[nl]937 1356714592.34738[nl]938 1356714592.34739[nl]939 1356714592.34740[nl]940 1356714592.34741[nl]941 1356714592.34742[nl]."
"POP3C"   3580   3036   "2017-08-09 12:56:29.051"   "195.26.90.20"   "SENT: QUIT"
"POP3C"   3580   3036   "2017-08-09 12:56:29.082"   "195.26.90.20"   "RECEIVED: +OK"



Long, aint it...and that repeats every minute and doesnt help with anything.

Thats why I dont log POP3.
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
RvdH
Senior user
Senior user
Posts: 460
Joined: 2008-06-27 14:42
Location: Netherlands

Re: Limit size of log files

Postby RvdH » 2017-08-13 11:46

To circumvent that you could use the MaxLogLineLen=SIZE INI setting, isnt?
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup

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

Re: Limit size of log files

Postby jimimaseye » 2017-08-13 15:41

RvdH wrote:To circumvent that you could use the MaxLogLineLen=SIZE INI setting, isnt?

Thats a good shout.

I just tested it. It requires also setting the "LogLevel=1" setting as well as the 'MaxLogLineLen=300' (otherwise it doesnt work and not will it work if DEBUG logging is set, or the LogLevel is at the default of 9) - this was the output:

Code: Select all

"POP3C" 2192 8 "2017-08-13 14:35:53.751" "195.26.90.20" "RECEIVED: +OK mailsub1.myhost.net Cyrus POP3 Murder v2.4.16-Kolab-2.4.16-1.el6 server ready <607470744024558928.1502627686@mailsub1.myhost.net>"
"POP3C" 2192 8 "2017-08-13 14:35:53.751" "195.26.90.20" "SENT: USER sylvester@mydomain.net"
"POP3C" 4316 8 "2017-08-13 14:35:53.782" "195.26.90.20" "RECEIVED: +OK Name is a valid mailbox"
"POP3C" 4316 8 "2017-08-13 14:35:53.782" "195.26.90.20" "SENT: ***"
"POP3C" 2192 8 "2017-08-13 14:35:53.813" "195.26.90.20" "RECEIVED: +OK Mailbox locked and ready SESSIONID=<ms7.myhost.net-3325-1502631355-1>"
"POP3C" 2192 8 "2017-08-13 14:35:53.813" "195.26.90.20" "SENT: UIDL"
"POP3C" 2192 8 "2017-08-13 14:35:54.047" "195.26.90.20" "RECEIVED: +OK unique-id listing follows[nl]1 1356714592.33938[nl]2 1356714592.33939[nl]3 1356714592.33940[nl]4 1356714592.33941[nl]5 1356714592.33942[nl]6 1356714592.33943[nl]7 1356714592.33944[nl]8 1356714592.339 ... 1356714592.34827[nl]."
"POP3C" 2192 8 "2017-08-13 14:35:55.280" "195.26.90.20" "SENT: DELE 1"
"POP3C" 3016 8 "2017-08-13 14:35:55.311" "195.26.90.20" "RECEIVED: +OK message deleted"
"POP3C" 3016 8 "2017-08-13 14:35:55.311" "195.26.90.20" "SENT: QUIT"
"POP3C" 4368 8 "2017-08-13 14:35:55.373" "195.26.90.20" "RECEIVED: +OK"


Considerably smaller. Note how it truncates the long line:

"POP3C" 2192 8 "2017-08-13 14:35:54.047" "195.26.90.20" "RECEIVED: +OK unique-id listing follows[nl]1 1356714592.33938[nl]2 1356714592.33939[nl]3 1356714592.33940[nl]4 1356714592.33941[nl]5 1356714592.33942[nl]6 1356714592.33943[nl]7 1356714592.33944[nl]8 1356714592.339 ... 1356714592.34827[nl]."


EDIT:

According to code this setting is disabled if LogLevel > 2 (instead of > 1 as it said in the writeup). So Ive changed the writeup to reflect this.
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


Return to “Feature requests”



Who is online

Users browsing this forum: No registered users and 2 guests