When running a self-hosted mail system inside Docker, Dovecot generates a large number of IMAP/POP3/authentication log entries.If these log files are not rotated properly, they will quickly grow to hundreds of megabytes or even gigabytes, eventually filling up the disk. This article explains how to correctly configure logrotate for Dovecot running inside a Docker container….
Category: Linux
About Linux Tech
在 Docker Dovecot 中啟用 Logrotate:避免 log 爆量、磁碟被塞滿的最佳做法
在自建郵件系統的環境中,Dovecot 通常會產生大量的 IMAP、POP3 與授權相關 Log。若 Log 直接寫入檔案,沒有任何輪替機制(log rotation),磁碟空間會在短時間內被迅速吃光。 本文將示範如何在 Docker 版本的 Dovecot 中,正確設定 logrotate,讓 Log 能夠自動每日或超量輪替、壓縮、保留,並在輪替後讓 Dovecot 重新開啟 Log 檔案。 🔧 1. Dovecot 容器啟動方式(範例) 以下為實際使用的 Dovecot Docker run 指令: 重點是: Dovecot 的 log 實際被寫到 主機(host)上的目錄,因此 logrotate 應該設定在主機端。 🔧 2. 建立 logrotate 設定檔 在主機上建立: 內容如下(已修正中文註解造成的解析錯誤): 若你在檢查 logrotate 時看到 “unknown unit” 表示「指令與中文註解不能放在同一行」,修正後即可正常運作。 🔧 3. 測試 logrotate 成功後,你會看到:…
How to Switch Proxmox Backup Server 4.x to the Community No-Subscription Repository
After installing Proxmox Backup Server (PBS), the system is configured to use the Enterprise Repository by default.This repository requires a paid subscription, and without one, you may see errors such as: Fortunately, Proxmox provides a No-Subscription (Community) repository, which allows free access to updates and security patches.This guide documents the complete process for converting PBS…
Proxmox Backup Server 4.x:切換成社群版 (No-Subscription) 更新源完整教學
Proxmox Backup Server(PBS)在安裝完成後,預設會啟用 Enterprise 企業版更新源,需要付費訂閱才能正常使用。如果你沒有企業授權,每次更新時會看到以下錯誤: 其實 Proxmox 官方也提供 No-Subscription 的免費社群版更新源,只要切換來源,就能正常取得系統更新與安全性修補。 這篇文章記錄 PBS 4.x(Debian 13 trixie) 切換到社群版更新源的完整步驟。 ✅ 1. 檢查目前系統版本 PBS 4.x 對應 Debian 13 trixie,你可以確認: 若顯示 13.x 或 trixie,代表你使用的是 PBS 4.x 對應的系統版本。 ✅ 2. 停用 Enterprise 企業版更新源 PBS 預設的企業版 repository 存放於: 編輯它: 將整個內容全部註解掉或加入: 例如: 這樣即可完全停用企業版更新源。 ✅ 3. 建立社群版 (No-Subscription) 更新源 Proxmox Backup Server 4.x 官方建議使用…
Ubuntu Server: Install Desktop + XRDP (Fix IPv4, NAT, and “Something Has Gone Wrong” Error)
This guide provides a full step-by-step setup for XRDP on Ubuntu Server, covering: 1. Install Desktop Environment (XFCE) Option A — Xubuntu Desktop (full) Option B — Minimal XFCE (recommended) 2. Install XRDP Add SSL permissions: 3. Force XRDP to Listen on IPv4 Edit: Change: to: Restart: Verify IPv4 listener: Expect: 4. Fix NAT Connectivity…
Ubuntu Server 安裝 Desktop + XRDP(完整流程:桌面、RDP、IPv4、NAT、XFCE 修正)
本文介紹如何在 Ubuntu Server 安裝桌面環境與 XRDP,並解決以下常見問題: 本篇提供完整、可直接使用的解決方案。 1. 安裝 Desktop(XFCE)與 XRDP 建議使用 XFCE——輕量、穩定、最適合 Server 遠端桌面。 (1)安裝桌面環境 選擇 A / B 其中一個即可。 A. 安裝完整 Xubuntu Desktop(比較完整) B. 安裝純 XFCE(更輕量,建議) (2)安裝 XRDP 加入 SSL 群組(避免證書存取權限問題): 2. 修正 XRDP 啟動 IPv4(預設只開 IPv6) Ubuntu 22.04 / 24.04 預設 xrdp 會 只監聽 IPv6 (::) → 造成外網或 NAT 無法連線。 編輯: 找到原本的: 改成:…
Ubuntu — Disable IPv6 and Force APT to Use IPv4
(For Ubuntu 22.04 / 24.04 / 24.10 / 24.04 LTS “Noble”) In many enterprise or internal environments, IPv6 is not yet supported.This often causes apt to fail when trying to download packages, showing messages like: This means Ubuntu tried to connect over IPv6, but the network doesn’t support it. 🔍 Problem Description By default, Ubuntu:…
Ubuntu 關閉 IPv6 與強制 apt 使用 IPv4 的完整指南
(適用 Ubuntu 22.04 / 24.04 / 24.10 / 24.04 LTS “Noble”) 在企業或內部環境中,許多網路尚未支援 IPv6,導致 Ubuntu 系統在安裝套件時出現連線錯誤。例如以下訊息: 這表示 apt 嘗試透過 IPv6 連線,但 IPv6 網路不可達,導致安裝或更新中斷。 🔍 問題說明 Ubuntu 預設會: 當伺服器、網關或防火牆未支援 IPv6 時,就會出現「Network is unreachable」或「Connection timed out」的錯誤。 🧰 解決步驟 步驟 1:永久關閉 IPv6 編輯設定檔: 在最後加入以下內容: 套用設定: 確認是否關閉: 若輸出為 1,表示 IPv6 已停用。 步驟 2:強制 apt 使用 IPv4 建立設定檔: 內容輸入: 儲存後執行: 此時…
Replacing AD with Samba: Can OpenLDAP Be the Backend? Practical Feasibility, Options & Migration Guide
Your Context Key Fact: Samba AD DC vs. OpenLDAP Do You Really Need a Domain? You can avoid it—but know the trade-offs Running without a domain still works for SMB and RDS, but you’ll face: Minimal domain (Samba AD) advantages—even with no GPOs: Three Architecture Options A. Samba AD DC replaces AD (recommended, pragmatic) B….
How Docker Containers Communicate Using Container Names
When running multiple Docker containers, one common question is:“Can containers connect to each other using their container names?”The answer is Yes!But — only if they are on the same custom Docker network. 1. Why the Default Network Doesn’t Work By default, Docker creates a bridge network (also known as docker0).However, this default bridge network does…