Skip to content

Find all lines with a specified email address, and any lines with a matching queue ID, in a sendmail log file.

Notifications You must be signed in to change notification settings

clp/sendmail_trace

Repository files navigation

sendmail_trace.pl  version 0.10
===============================

The sendmail_trace application reads a sendmail log file and
collects all lines that contain the email address specified by
the user on the command line.  It also collects any line with
a queue ID that matches any qid found in the line(s) with the
desired address; and prints all lines with the same qid
together.

The program reads the input sendmail log file in one pass.

It uses a FIFO buffer to hold a number of lines that have not
yet been matched to the email address of interest.  The size
of the buffer is set to 100 lines.  If it is too small, some
related lines with matching qid's might not be collected.  If
too large, the program might exhaust memory when processing a
large log file.


The input data file is maillog.mx.
The initial release provides an abbreviated 9999-line input file.

The test scripts in t9999/ rely on reference output files,
stored in the ref_9999_out/ subdir.

Execute the tests using prove:
  prove -vr t9999/


About

Find all lines with a specified email address, and any lines with a matching queue ID, in a sendmail log file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages