Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: MSmith on September 26, 2014, 10:05:19 PM

Title: Ugly manual method for parsing qpsmtpd timestamps
Post by: MSmith on September 26, 2014, 10:05:19 PM
So I had a need to look in the qpsmtpd logs as far back as possible to see 1) if any emails had been received from a specific address 2) if so, when, and what happened?

http://wiki.contribs.org/Email_Statistics taught me about the excellent qplogtail and qploggrep.

BUT. the information returned by qploggrep included a to-me-unreadable timestamp, like this:

@4000000054179514183d3d04

Quick and dirty: ignore @40000000 and copy the next eight hex characters: 54179514

Paste them into this website: 

http://www.epochconverter.com/epoch/unix-hex-timestamp.php

VoilĂ !

GMT: Tue, 16 Sep 2014 01:40:36 GMT
Your time zone: 9/15/2014 8:40:36 PM
Decimal timestamp/epoch: 1410831636

Naturally this ugly method is only useful if you need a couple of dates/times. I'm sure one of you BASH wizards will quickly cobble something together that will parse these, send you a nicely formatted email with the results and wash and wax your vehicle  :smile:




Title: Re: Ugly manual method for parsing qpsmtpd timestamps
Post by: Daniel B. on September 26, 2014, 11:04:52 PM
Or just pipe it in tai64nlocal, which will convert those timestamp to readable format ;-)
Title: Re: Ugly manual method for parsing qpsmtpd timestamps
Post by: janet on September 27, 2014, 12:09:06 AM
MSmith

Quote
...just pipe it in tai64nlocal

Example here
http://wiki.contribs.org/Virus:Email_Attachment_Blocking#Checking_logs
Title: Re: Ugly manual method for parsing qpsmtpd timestamps
Post by: guest22 on September 27, 2014, 12:52:23 AM
Geeezzzz, that wiki is really holding tons of information...
Title: Re: Ugly manual method for parsing qpsmtpd timestamps
Post by: mmccarn on September 27, 2014, 02:56:58 PM
So I had a need to look in the qpsmtpd logs as far back as possible to see 1) if any emails had been received from a specific address 2) if so, when, and what happened?

http://wiki.contribs.org/Email_Statistics taught me about the excellent qplogtail and qploggrep.

BUT. the information returned by qploggrep included a to-me-unreadable timestamp, like this:

@4000000054179514183d3d04
...

I've added a note to the wiki entry for qploggrep about tai64nlocal:
http://wiki.contribs.org/Email_Statistics#qploggrep
Title: Re: Ugly manual method for parsing qpsmtpd timestamps
Post by: MSmith on October 01, 2014, 02:51:40 AM
Thanks! That'll save me some time and trouble in the future. SME Community FTW! :D