Project

General

Profile

Feature #113

Create script that allows for searching by a keyword which returns the log records associated with corresponding SMTP id

Added by Deoren Moor almost 4 years ago. Updated almost 4 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
Category:
Log Search - Conversation
Target version:
Start date:
07/19/2013
Due date:
% Done:

0%

Resolution:

Description

For example I get a Lire log report and I notice a sending domain name that I haven't seen before. We'll call it example.com (how original, right?). I want to run the script like so:

./script.sh 'example.com'

and get back something like this:

Jul 18 18:07:07 mail postfix/smtpd[4111]: 478E03FD9E: client=mail.example.com[192.168.2.6]
Jul 18 18:07:07 mail postfix/cleanup[4114]: 478E03FD9E: message-id=<fakeidb@mail.example.com>
Jul 18 18:07:07 mail postfix/qmgr[956]: 478E03FD9E: from=<noreply@example.com>, size=8545, nrcpt=1 (queue active)
Jul 18 18:07:08 mail postfix/smtp[4115]: 478E03FD9E: to=<real-email@yahoo.com>, orig_to=<jessican@example.com>, relay=mta6.am0.yahoodns.net[66.196.118.35]:25, delay=1.2, delays=0.23/0.01/0.14/0.84, dsn=2.0.0, status=sent (250 ok dirdel)
Jul 18 18:07:08 mail postfix/qmgr[956]: 478E03FD9E: removed

The script should be smart enough to collect a list of ALL the matching SMTP ids and loop over them, adding indentation between the blocks.

History

#1 Updated by Deoren Moor almost 4 years ago

  • Category set to Log Search - Conversation

#2 Updated by Deoren Moor almost 4 years ago

  • Target version set to 0.3

Also available in: Atom PDF