<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Keep It Simple, Stupid</title>
    <link>https://www.hongy19.net/blog/categories/linux/</link>
    <description>Recent content in Linux on Keep It Simple, Stupid</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 07 Apr 2026 08:25:01 +0000</lastBuildDate>
    <atom:link href="https://www.hongy19.net/blog/categories/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>dovecot configuration</title>
      <link>https://www.hongy19.net/blog/posts/2026-04-dovecot-configuration/</link>
      <pubDate>Mon, 06 Apr 2026 12:31:00 +0000</pubDate>
      <guid>https://www.hongy19.net/blog/posts/2026-04-dovecot-configuration/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;authentication mechanism and password scheme&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://doc.dovecot.org/2.3/configuration_manual/authentication/&#34;&gt;link&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;authentication mechanism -&amp;gt; how password is transferred from cilent from server; passwd scheme: how password is stored in server.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;plain and plaintext&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;auth_mechanisms = plain&lt;/li&gt;&#xA;&lt;li&gt;disable_plaintext_auth = yes&lt;/li&gt;&#xA;&lt;li&gt;plain is one protocol of authentication mechanism, password is plaintext; &amp;ldquo;disable_plaintext_auth=yes&amp;rdquo;  means ssl/tls is mandatory.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;service&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;service = 一个独立运行的 Dovecot 功能组件&#xA;&lt;ul&gt;&#xA;&lt;li&gt;service imap-login # IMAP 登录&lt;/li&gt;&#xA;&lt;li&gt;service imap # IMAP 邮件操作&lt;/li&gt;&#xA;&lt;li&gt;service pop3-login # POP3 登录&lt;/li&gt;&#xA;&lt;li&gt;service pop3 # POP3 邮件收取&lt;/li&gt;&#xA;&lt;li&gt;service auth # 账号密码验证&lt;/li&gt;&#xA;&lt;li&gt;service lda # 本地邮件投递&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;只有被 Dovecot 启用的协议 / 功能，对应的 service 才会真正运行&#xA;&lt;ul&gt;&#xA;&lt;li&gt;/etc/dovecot/dovecot.conf&lt;/li&gt;&#xA;&lt;li&gt;protocols = imap pop3 lmtp&lt;/li&gt;&#xA;&lt;li&gt;写了 imap → 启动 imap-login + imap, 写了 pop3 → 启动 pop3-login + pop3,没写的协议 → 对应的 service 完全不运行&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;namespace&lt;/p&gt;</description>
    </item>
    <item>
      <title>opensmtp configuration</title>
      <link>https://www.hongy19.net/blog/posts/2026-04-opensmtp-configuration/</link>
      <pubDate>Mon, 06 Apr 2026 10:26:00 +0000</pubDate>
      <guid>https://www.hongy19.net/blog/posts/2026-04-opensmtp-configuration/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;hostname hongy19.net is used on listen, not key words in configuration file&lt;/li&gt;&#xA;&lt;li&gt;table&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://man.openbsd.org/table.5&#34;&gt;man page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;table could be file or db&lt;/li&gt;&#xA;&lt;li&gt;table could be list or mapping&lt;/li&gt;&#xA;&lt;li&gt;credential in a relay context&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the credentials are a mapping of labels and username:password pairs, format: label1 user:password&lt;/li&gt;&#xA;&lt;li&gt;passwords are not encrypted (smtpctl encrypt subcommand.)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;table examples&#xA;&lt;ul&gt;&#xA;&lt;li&gt;table users   file:/etc/smtpd/users&lt;/li&gt;&#xA;&lt;li&gt;table creds   file:/etc/smtpd/creds&lt;/li&gt;&#xA;&lt;li&gt;table domainemail  {hongy19 = &lt;a href=&#34;mailto:hongy19@hongy19.net&#34;&gt;hongy19@hongy19.net&lt;/a&gt;}&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;relay&#xA;&lt;ul&gt;&#xA;&lt;li&gt;action &amp;ldquo;outbound&amp;rdquo; relay host smtps://smtp2go@mail.smtp2go.com:465 auth &lt;!-- raw HTML omitted --&gt; mail-from &amp;ldquo;@hongy19.net -&amp;gt; doesn&amp;rsquo;t work for smtp2go&lt;/li&gt;&#xA;&lt;li&gt;action &amp;ldquo;outbound&amp;rdquo; relay host smtps://smtp2go@mail.smtp2go.com:465 pki hongy19.net auth &lt;!-- raw HTML omitted --&gt; mail-from &amp;ldquo;@hongy19.net&amp;rdquo;   -&amp;gt; work for smtp2go&lt;/li&gt;&#xA;&lt;li&gt;action &amp;ldquo;outbound&amp;rdquo; relay host smtp+tls://smtp2go@mail.smtp2go.com:587 auth &lt;!-- raw HTML omitted --&gt; mail-from &amp;ldquo;@hongy19.net&amp;rdquo; -&amp;gt; work for smtp2go&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>move dovecot, opensmtpd, nginx from Archlinux to Ubuntu</title>
      <link>https://www.hongy19.net/blog/posts/2026-04-move-dovecot-opensmtpd-nginx-from/</link>
      <pubDate>Sun, 05 Apr 2026 14:52:00 +0000</pubDate>
      <guid>https://www.hongy19.net/blog/posts/2026-04-move-dovecot-opensmtpd-nginx-from/</guid>
      <description>&lt;p&gt;I plan to move Archlinux at vultr to Ubuntu at Tencent.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;firewall at Tencent,&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;no need to convert iptables to ufw since Tencent cloud has firewall&lt;/li&gt;&#xA;&lt;li&gt;&amp;ldquo;在轻量数据库中，支持配置防火墙规则来控制访问权限，进行网络隔离以增强安全性。如果不配置防火墙规则，则表示不限制访问数据库的来源，未经授权的访问也可连接数据库。如果配置防火墙规则，限制了来源、协议以及端口，例如：配置来源为172.1.4.12、协议为TCP、端口为45，访问策略为允许，则表示仅允许来源为172.1.4.12，来自 TCP 协议且端口号为45的应用访问轻量数据库。&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;open Tencent firewall port: 80, 443; 25,465,587; 993&lt;/li&gt;&#xA;&lt;li&gt;Tencent not support send smtp email but it is Ok to receive email, see &lt;a href=&#34;https://cloud.tencent.com/document/product/1288/65749?from=console_document_search&#34;&gt;link&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;letsencrypt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;sudo tar -cpzvf letsencrypt_archive.tar.gz -C /etc letsencrypt&lt;/li&gt;&#xA;&lt;li&gt;&amp;ldquo;-C /etc&amp;rdquo;: Change directory to /etc first (so the archive contains letsencrypt/ instead of full /etc/letsencrypt/ path)&lt;/li&gt;&#xA;&lt;li&gt;sudo tar -xzvpf letsencrypt_archive.tar.gz -C /etc&lt;/li&gt;&#xA;&lt;li&gt;sudo apt install certbot python3-certbot-nginx&lt;/li&gt;&#xA;&lt;li&gt;dpkg -L certbot&lt;/li&gt;&#xA;&lt;li&gt;sudo vim /usr/lib/systemd/system/certbot.service&lt;/li&gt;&#xA;&lt;li&gt;add &amp;ldquo;ExecStartPost=/bin/systemctl reload nginx.service ; /bin/systemctl restart smtpd ; /bin/systemctl restart dovecot&amp;rdquo; and sudo systemctl daemon-reload&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ubuntu.com/tutorials/install-and-configure-nginx#1-overview&#34;&gt;nginx&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
