<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 王浩宇</title>
    <description>The latest articles on DEV Community by 王浩宇 (@_d50ed5573c549b3d04d73).</description>
    <link>https://dev.to/_d50ed5573c549b3d04d73</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4251574%2F873b6e7c-3b6f-4f65-a89a-cb11402e9a50.png</url>
      <title>DEV Community: 王浩宇</title>
      <link>https://dev.to/_d50ed5573c549b3d04d73</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_d50ed5573c549b3d04d73"/>
    <language>en</language>
    <item>
      <title>How We Built a Receive-Only Email Honeypot with Postfix</title>
      <dc:creator>王浩宇</dc:creator>
      <pubDate>Wed, 18 Nov 2026 09:59:11 +0000</pubDate>
      <link>https://dev.to/_d50ed5573c549b3d04d73/how-we-built-a-receive-only-email-honeypot-with-postfix-4l9h</link>
      <guid>https://dev.to/_d50ed5573c549b3d04d73/how-we-built-a-receive-only-email-honeypot-with-postfix-4l9h</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This English version was translated and edited with AI assistance from our original deployment notes.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect the DNS records to the SMTP listener
&lt;/h2&gt;

&lt;p&gt;We set the MX record for the recipient domain &lt;code&gt;trap.quietpostlab.me&lt;/code&gt; to point to &lt;code&gt;mx.trap.quietpostlab.me&lt;/code&gt; with a priority of 10. An A record for that host points to the server’s public IPv4 address.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Save incoming messages in Maildir
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify delivery and persistence
&lt;/h2&gt;

&lt;p&gt;These are the three checks we used on the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo postfix check
sudo ss -lnt &lt;span class="s1"&gt;'( sport = :25 )'&lt;/span&gt;
sudo postqueue -p
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give each publication its own research address
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Research contact
&lt;/h2&gt;

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

&lt;p&gt;&lt;a href="mailto:devto-r7m2@trap.quietpostlab.me"&gt;devto-r7m2@trap.quietpostlab.me&lt;/a&gt;&lt;/p&gt;

</description>
      <category>postfix</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
