{
  "id": 20578502,
  "title": "How We Built a Receive-Only Email Honeypot with Postfix",
  "url": "https://urgent.news/2026/11/18/how-we-built-a-receive-only-email-honeypot-with-postfix",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-18T09:59:11.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/_d50ed5573c549b3d04d73/how-we-built-a-receive-only-email-honeypot-with-postfix-4l9h"
  },
  "original_language": "en",
  "account": "This article details the process of creating a receive-only email honeypot using Postfix. A small lab environment was established on an Ubuntu 24.04 LTS cloud server to gather fresh examples of unsolicited emails for security research purposes. The server runs Postfix and saves incoming messages in a Maildir directory. The project notes are hosted on GitHub Pages to ensure accessibility.\n\nThe DNS records were connected to the SMTP listener by setting an MX record for the recipient domain, \"trap.quietpostlab.me\", to point to the server's public IPv4 address with a priority of 10. An A record was also configured for that host to point to the server's public IPv4 address. When a sending mail server resolves the MX host, it connects over TCP port 25.\n\nPostfix treats the recipient subdomain as a virtual mailbox domain, with configured addresses mapping to a Maildir owned by a dedicated system account. Each delivery creates a file preserving the message headers, body, and MIME attachments. The system was restricted to only accept messages from the lab domain, rejected third-party relay requests, and disabled SMTP authentication and outbound delivery. A message limit of 20 MiB, bounded connection counts, timeouts, and log rotation were set to enhance security and manage resources effectively.\n\nPostfix was configured to defer incoming mail if the queue filesystem ran below its free-space threshold. Three checks were performed on the server to verify delivery and persistence. The first was running \"sudo postfix check\" to ensure Postfix was operating correctly. The second was using \"sudo ss -lnt\" to check that the SMTP listener was active on port 25. The third was running \"sudo postqueue -p\" to verify that messages were being queued successfully.\n\nTwo marked test messages were sent from outside the server, one using the public IP and the other using the MX hostname. Both messages arrived in the Maildir directory. The content of these messages was checked, including the Chinese subject line, plain text, HTML, and attachments. An archived message was still readable after restarting Postfix, confirming the persistence of the stored messages. The server also rejected test relay requests for recipients outside the lab domain, ensuring the honeypot's effectiveness in filtering out unwanted email traffic.\n\nThe project notes were moved from the original web host to GitHub Pages due to anonymous requests being returned with HTTP 403 errors. The web pages and the SMTP service use separate DNS names, allowing distinct addresses to be assigned to each publication. Each publication uses its own SMTP address, and the actual delivery recipient is used to measure the time to the first confirmed spam and count new message patterns after deduplication. Researchers are invited to send messages to a specific experimental address, devto-r7m2@trap.quietpostlab.me, for email security research purposes. Personal and confidential information should not be included in these messages.",
  "summary": "We set up a small lab to collect fresh samples of unsolicited email for security research. An Ubuntu 24.04 LTS cloud server runs Postfix and saves incoming messages to Maildir. The project notes are hosted separately on GitHub Pages. This English version was translated and edited with AI assistance from our original deployment notes. Connect the DNS records to the SMTP listener We set the MX…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}