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:
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: