Posted on ::

When I send an email, did the recipient read it? So I wrote mailpixtracker, a small self-hosted CGI script that tracks when your emails are opened, via the classic invisible 1x1 pixel trick.

Think of MailTracker or MailTrack, but without all the marketing machinery: no account on a third-party server, no spyware concerns, no "business intelligence" dashboards. Just three bash scripts on your own web server.

How it works🔗

You create a new tracker with an optional name on your mailpixtracker page. It gives you a tiny HTML snippet to paste in your email such as:

<img src='https://my.mailpixtracker.org/_/12-I5rHJCFap' width=1 height=1>

When someone opens your email and their mailer loads images, your server logs the request: date, IP, hostname, user-agent. No data ever leaves your server.

Features🔗

  • No accounts: The URL is the authentication, via Capability URLs. The admin URL is your unguessable "password" — share it with nobody and you are safe.
  • Plain files: Logs are tab-separated text, one line per open. No database.
  • Colored logs: Each distinct IP gets its own perceptually-spaced color, so you can spot repeat readers at a glance. Your own opens (while composing the email) show in dim grey, so they do not pollute the picture.
  • New entries highlighted: Entries added since your last visit get a yellow marker.
  • Notes field: Each tracker has an editable name and notes — handy to remember what you sent, to whom, and when.
  • Guest accounts: Create isolated spaces for different purposes (work, family, surfing...) with admin (you) accounts, or guest accounts that you can just give to others with a link. Non-admin guests only see their own trackers.
  • Geolocalization (optional): With the MaxMind databases installed, logs show the organization and country of each reader.

Caveats🔗

Email tracking is not foolproof. Most mailers now prompt before loading images, so people can read your email without ever triggering the tracker. Mailpixtracker will not tell you everything — but when it does fire, it is accurate, and the logs are all yours.

Also note that it is a tool for personal curiosity, not for marketing analytics: it has no click tracking, no A/B testing, no "campaigns". If you want that, there are plenty of SaaS products; this one is the lazy, self-hosted, private alternative.

Install🔗

For instructions, see the code is at github.com/ColasNahaboo/mailpixtracker, it is multi-licensed (MIT, Apache 2.0, MPL 2.0, LGPL v3, GPL v3) — pick whichever suits your project.

Table of Contents