sm-logtool v1.0.0 released: terminal log explorer for SmarterMail
Problem reported by John C. Reid - Today at 1:15 PM
Submitted
Hi everyone,

I wanted to share a tool I’ve been building for working with SmarterMail logs: sm-logtool, now at v1.0.0.


sm-logtool is a Python-based log explorer for SmarterMail with both:
  • a TUI (terminal UI) for interactive browsing and searching
  • a CLI mode for quick scripted searches and automation
I developed it primarily for the SmarterMail Linux server option, but since it is written in Python, it should work on Windows servers as well. If anyone tries it on Windows, I’d definitely like to hear how it goes.

What it does

sm-logtool is designed to make SmarterMail logs easier to work with when you need to dig into real issues instead of doing one-off checks.

 It includes:
  • interactive wizard-style log browsing
  • support for multiple SmarterMail log types
  • literal, wildcard, regex, and fuzzy search
  • grouped results that keep related log traffic together
  • syntax-highlighted output
  • live progress and cancel support for longer searches
  • a CLI mode for scripting and repeatable checks
  • a built-in theme converter so you can create your own color themes for the TUI from common theme formats like:
    • .itermcolors: iTerm2 color scheme files
    • .colors: line-based terminal color theme files
    • .colortheme: line-based terminal color theme files
Why use it instead of the built-in SmarterMail log viewer/search?

 The built-in tools are useful, but I wanted something that was more practical for deeper troubleshooting and repeated investigation work.

A few advantages of sm-logtool:

  • It gives you a dedicated search workflow built specifically around SmarterMail logs.
  • It supports more flexible search modes than a basic text search, including regex and fuzzy matching.
  • It is better suited for iterative troubleshooting, where you search, refine, compare results, and dig deeper. It does this by letting you search within search results as many levels deep as you need, with a back button.
  • The CLI mode makes it easy to automate searches or incorporate them into your own admin workflow.
  • The TUI is built for working directly in the terminal, which is especially convenient on Linux servers over SSH.
  • The theme system makes the interface easier to tune for your own eyes and terminal setup.
Setup and configuration

 Setup is intentionally simple.

 Install with pipx install sm-logtool (recommended) or python -m pip install sm-logtool, point it at your SmarterMail logs, and you’re basically ready to go. Configuration is lightweight, and the project includes a sample config template. It stages log copies into a working directory so you can search safely without touching the original logs.

 You can also optionally improve search performance greatly, especially fuzzy search, by installing with pipx install "sm-logtool[speedups]" or python -m pip install "sm-logtool[speedups]"

 When new releases come out, upgrading is as easy as pipx upgrade sm-logtool or python -m pip install --upgrade sm-logtool.

In general, pipx is preferred as it has better dependency handling. 

 If you want a terminal-based tool that is easy to install, easy to configure, and more capable than basic built-in searching, this may be useful.

Feedback welcome

 If you manage SmarterMail and this looks interesting, please give it a try and let me know what works, what doesn’t, and what you’d want added or improved.

 I’d especially appreciate feedback on:
  • Windows server use
  • additional log workflows people want most
  • usability improvements
  • theme ideas
  • scripting/automation use cases
 Project page again:

John C. Reid  / Technology Director
John@prime42.net  / (530) 691-0042
1300 West Street, Suite 206, Redding, CA 96001

Zach Sylvester Replied
Employee Post
Hey John, 

That is a really cool project. One thing that might be nice is to build in an MCP server so AI claude/codex etc could use MCP tools to look for issues in SmarterMail logs. Heres an example of what an MCP interface looks like. 

https://github.com/zjs81/barnacle-search/blob/master/src/code_indexer/server.py#L641

Regards, 

Zach Sylvester

Software Developer
SmarterTools Inc.
John C. Reid Replied
@Zach Sylvester,

I can certainly look into that. Would you mind creating a feature request issue on the project page?
John C. Reid  / Technology Director
John@prime42.net  / (530) 691-0042
1300 West Street, Suite 206, Redding, CA 96001

John C. Reid Replied
One thing I really think that it needs, but I am not quite sure how to implement it: I would like to be able to select an SMTP log conversation, and have it find the associated delivery log entries for you. 

I would love suggestions on how that might look in the TUI interface. 
John C. Reid  / Technology Director
John@prime42.net  / (530) 691-0042
1300 West Street, Suite 206, Redding, CA 96001

Reply to Thread

Enter the verification text