Short script for searching mail logs

Today I had to search through dozens of mail logs (syslog) located on several mail relays and find all entries related to a particular user.

Given:

  • All servers are managed via a remote tty console,
  • The ksh-script must be copy&pasteable
  • All logs are gzipped
  • I need all entries with the same message number (the ninth field) as the found log entry

This is what I came up with:

Continue reading “Short script for searching mail logs”