Koozali.org: home of the SME Server

Ugly manual method for parsing qpsmtpd timestamps

Offline MSmith

  • *
  • 675
  • +0/-0
Ugly manual method for parsing qpsmtpd timestamps
« 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:




...

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Ugly manual method for parsing qpsmtpd timestamps
« Reply #1 on: September 26, 2014, 11:04:52 PM »
Or just pipe it in tai64nlocal, which will convert those timestamp to readable format ;-)
C'est la fin du monde !!! :lol:

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Ugly manual method for parsing qpsmtpd timestamps
« Reply #2 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
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: Ugly manual method for parsing qpsmtpd timestamps
« Reply #3 on: September 27, 2014, 12:52:23 AM »
Geeezzzz, that wiki is really holding tons of information...

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Ugly manual method for parsing qpsmtpd timestamps
« Reply #4 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

Offline MSmith

  • *
  • 675
  • +0/-0
Re: Ugly manual method for parsing qpsmtpd timestamps
« Reply #5 on: October 01, 2014, 02:51:40 AM »
Thanks! That'll save me some time and trouble in the future. SME Community FTW! :D
...