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 record for the recipient domain trap.quietpostlab.me to point to mx.trap.quietpostlab.me with a priority of 10. An A record for that host points to the server’s public IPv4 address.

A sending mail server resolves the MX host and connects over TCP port 25. We checked the cloud firewall rule and the local Postfix listener, then tested the connection from outside the server’s network.

Save incoming messages in Maildir

Postfix treats the recipient subdomain as a virtual mailbox domain. The configured addresses on that domain map to a Maildir owned by a dedicated system account. Each delivery creates a file that preserves the message headers, body, and MIME attachments.

We restricted acceptance to the lab domain, rejected third-party relay requests, and disabled SMTP authentication and outbound delivery. We set a 20 MiB message limit, bounded connection counts and timeouts, and enabled log rotation. Postfix defers incoming mail when the queue filesystem runs below its free-space threshold.

Verify delivery and persistence

These are the three checks we used on the server.

sudo postfix check sudo ss -lnt '( sport = :25 )' sudo postqueue -p 

We sent two marked test messages from outside the server, one to its public IP and one to the MX hostname. Both arrived in Maildir. We checked the Chinese subject line, plain text, HTML, and attachment. An archived message was still readable after restarting Postfix. The server also rejected test relay requests for recipients outside the lab domain.

Give each publication its own research address

Some anonymous requests to our original web host returned HTTP 403, so we moved the project notes to GitHub Pages. The web pages and the SMTP service use separate DNS names. We assign a distinct address to each publication and use the actual delivery recipient to measure time to first confirmed spam and count new message patterns after deduplication.

Research contact

Mail sent to this experimental address may be archived for email security research. Please keep personal and confidential information out of your message.

devto-r7m2@trap.quietpostlab.me