Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

ControlCenter

> 编程语言
Open source

Mirrored from GitLab! Monitoring and automation for Open Source email servers, starting with Postfix. Please do not submit issues or PRs here - join us at: http

99 stars0 likes1 views
WebsiteGitHub

About

Mirrored from GitLab! Monitoring and automation for Open Source email servers, starting with Postfix. Please do not submit issues or PRs here - join us at: http

Lightmeter ControlCenter

Note: This application has been deprecated and is unlikely to receive future updates.


Contents

  • Introduction
  • Supported Mail Transfer Agents
  • Quickstart
  • Install
    • Install from binaries
    • Docker image
    • NixOS Package and Module
  • Upgrade
  • Usage
    • Rotated files
    • Imported logs
    • API
    • Headless mode
    • Authentication
  • Feature documentation
    • Notifications
    • Domain mapping
    • Message detective
    • Peer network powered features
      • Brute force protection
  • Known issues
  • Development
    • Frontend development with VueJs
    • Browser automation tests
    • Making user interfaces translatable (i18n)
  • Troubleshooting
  • Supported by
  • License and Copyright information

Introduction

Welcome to Lightmeter Control Center, the Open Source mailops monitoring application.

Supported Mail Transfer Agents

Currently Postfix MTA is supported. Future support for additional MTAs is planned.

Quickstart

  1. Install Lightmeter Control Center as you prefer:
    1. Download Docker Image
    2. Download source code or a Linux binary from GitHub
    3. Browse the source repository on GitHub
  2. When using the binaries you can run Lightmeter using ./lightmeter -workspace ~/lightmeter_workspace -watch_dir /var/log This command will start the application monitoring /var/log in real time (including old logs found there), and store operation files in lightmeter_workspace folder in your user's home directory.
  3. If you are using the docker image, please look at the Usage, Docker image section in the README.md
  4. Open http://localhost:8080/ to see the web interface
  5. Secure web access to the Web UI as necessary (see Known issues)
  6. If necessary, change the date range to see charts for the period of the logs you just imported

Installation

Install using Docker

Docker images are generated for each release and published to Docker Hub and the GitHub Container Registry.

You can use the latest tag if desired. For usage see Docker image.

The historical nightly-master and nightly-develop image tags are retained. Their automatic schedules are disabled; maintainers can publish them manually through GitHub Actions. Neither nightly tag is recommended for production.

Build from source code

The following dependencies are needed during development:

  • Bash
  • Git on any recent (as in 2020) version.
  • Go compiler version 1.18 or newer.
  • GCC version 9.3 or newer.
  • Libc development files. Both glibc and musl have been successfully tested.
  • GNU Make or compatible.
  • Ragel version 6.X. We have successfully tested version 6.10. Ragel 7 is currently NOT supported.
  • vue cli - Used for the web based UI.

For instance, on Alpine Linux 3.12, they can be installed with:

$ apk add git make gcc go libc-dev ragel npm
$ npm install -g @vue/[email protected] @vue/[email protected]

To build a release version, dynamically linked to the local libc, execute:

make release

And to create a static linked (supported only if your libc can be statically linked) version, execute:

make static_release

That will download all the dependencies and build a file called lightmeter, which you can simply copy to your Postfix server and use it as described in the Usage section.

If you are planning to contribute with code (Thank you! :-)), please check Development.

Upgrade

Limited Automatic data migration during upgrade is supported. As the data format is not yet stable, we cannot guarantee 100% data safety.

We advice you to create a backup of the workspace directory before a major upgrade. A backup can be performed by stopping controlcenter, copying the workspace directory somewhere else (or creating an archive, etc.), upgrade controlcenter, and finally start it again.

Achieving this is easy using manual upgrade based on replacing binary files. For Docker-based installations you should configure a workspace directory outside of the Lightmeter Docker container. See 'Usage' on how to specify which workspace directory Lightmeter should use.

We have planned support for on-the-fly backup for future releases, where this procedure will become easier, safer and more flexible.

Install

Install from binaries

We provide pre-built architecture-dependent binaries on GitHub that should run on any modern Linux distribution. Just download them, set them as executable and executed as described in Usage.

Your operating system should provide certificate authority certificates (ca-certificates package in many distributions) by default, but in case you are keeping your own CA certificates, you'll need to set the environment variable SSL_CERT_DIR to it.

For instance, on Alpine linux, you can use, before executing the binary:

bash
export SSL_CERT_DIR=/usr/share/ca-certificates/mozilla

But this is almost always not needed as Control Center is able to properly find them.

For more information about how the CA certificates are found, please check the correspondent Go source code.

Rsync managed logs

In case the logs directory passed via -watch_dir is not in the same filesystem as postfix writes them, but instead copied via rsync, you must pass the command line argument -logs_use_rsync, otherwise new log lines received after the first rsync execution won't be noticed.

When using rsync, remember NOT to use any in-place synchronization option, such as --append, as Control Center expects the default rsync behaviour on updating files that consists on first create a temporary file in the destination and once it's completely transferred, rename it to the final file.

Docker image

The simplest way to use the latest version with docker is with the command:

bash
$ docker run -p 8080:8080 -v ":/workspace:rw" -v "/var/log/:/logs:ro" \
  docker.io/lightmeter/controlcenter -workspace /workspace -watch_dir /logs

Where `` is a directory where Control Center will keep data that has to be persisted across restarts.

Then open your browser on http://localhost:8080 to access the web based user interface.

You can find released images on Docker Hub and GitHub Container Registry.

NixOS Package and Module

You can find the released pkg, module, testbed and an instruction for "How to build & install it?" on Github.

API

Lightmeter ships with a simple REST API designed for user interfaces. It is used by the Web UI.

Swagger-based API documentation and experimentation pages are generated automatically on development builds. Access them via http://lightmeter-address:8080/api, eg. http://localhost:8080/api.

Headless mode (no Web UI)

Headless mode is allows ControlCenter to run the backend only, without the Web UI. This is currently intended for development purposes. Headless modes will be useful for using only the API part of the application.

Running headless mode requires building ControlCenter for this purpose:

make devheadless # Build ControlCenter
./lightmeter -stdin -log-level DEBUG --listen :8003 # Example command to start ControlCenter quickly (same as running a normal build)

Authentication

  • Single user, password-based authentication is currently supported by default. Multiple user accounts via self-registration, without approval, can be enabled by changing the value of AllowMultipleUsers in auth/auth.go and recompiling.

Password reset

You can reset the administrator password using the command line:

./lightmeter -email_reset '' -password ''

Delete users

  • Delete all users by deleting /auth.db*. E.g.: rm -rf /var/lib/lightmeter_workspace/auth.db*.
  • Delete a single user manually using sqlite using sqlite3 /auth.db 'delete from users where email = ""'. E.g.: sqlite3 /var/lib/lightmeter_workspace/auth.db 'delete from users where email = "[email protected]"'.

Usage

For detailed information, check Usage.

  • Run lightmeter -help to show a list of all available commands
  • Following compilation (or download) of Lightmeter Control Center you should run the binary lightmeter to read logs and launch a local webserver, which allows viewing Lightmeter Control Center via a Web UI in a browser on the same network on port 8080, eg. http://localhost:8080/. You can use -listen ":9999" for instance to use a different port or network interface, in this case all interfaces on port 9999.
  • The web UI authenticated sessions last 1 week by default
  • To supply logs via stdin instead of logfile location, use the command line argument -stdin like `lightmeter -stdin { "log-type" => "mail" } clones => ["lightmeter"] } } }

output { if [log-type] == "mail" and [type] == "lightmeter"{ tcp { host => "address-of-control-center-host" port => 9999 } } }


#### Using a custom log format

Alternatively, add the command line option `-log_format prepend-rfc3339` (or the environment variable `LIGHTMETER_LOG_FORMAT=prepend-rfc3339`),
meaning that it expects a time to come in the beginning of each log line.

Then configure Logstash to something similar to the following (Thank you Alexander Landmesser for the help :-)):

filter { if [log][file][path] == "/var/log/mail.log" { clone { add_field => { "log-type" => "mail" } clones => ["lightmeter"] } } }

output { if [log-type] == "mail" and [type] == "lightmeter"{ tcp { host => "address-of-control-center-host" port => 9999 codec => line { format => "{[@timestamp]} %{[message]}" } } } }

…

sh docker run -it --rm lightmeter/controlcenter:latest -dovecot_conf_gen > /path/to/etc/dovecot/conf.d/10-lightmeter.conf


Or, similarly, when using the standalone binary:

```sh
/path/to/lightmeter -dovecot_conf_gen > /etc/dovecot/conf.d/10-lightmeter.conf

And finally, reload the Dovecot configuration with doveconf reload to apply those changes.

Older Dovecot version

If your Dovecot version is older than 2.3.1, you need to pass an extra argument -dovecot_conf_is_old, as in:

bash
/path/to/lightmeter -dovecot_conf_gen -dovecot_conf_is_old > /etc/dovecot/conf.d/10-lightmeter.conf

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goautomationemailemail-sendermonitoring

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言