Scripts2026年7月24日·1 分钟阅读

Mailcow — Dockerized Email Server with Web Administration

A fully self-hosted mail server suite packaged as Docker containers. Bundles Postfix, Dovecot, SOGo groupware, ClamAV, Rspamd, and a modern web UI into a single docker-compose deployment for managing email domains, mailboxes, aliases, and DKIM.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Mailcow
直接安装命令
npx -y tokrepo@latest install 8aa36121-877d-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Mailcow is an open-source mail server suite that packages all the components needed to run a production email service into Docker containers. It provides a polished web UI for managing domains, mailboxes, aliases, DKIM signing, spam filtering, and antivirus scanning without manual configuration of each underlying service.

What Mailcow Does

  • Deploys a complete SMTP/IMAP/POP3 mail server stack via a single docker-compose file
  • Provides a responsive web administration panel for domain, mailbox, and alias management
  • Includes SOGo for webmail, calendar, contacts, and ActiveSync device support
  • Integrates Rspamd for spam filtering and ClamAV for antivirus scanning out of the box
  • Handles DKIM, SPF, DMARC, and TLS certificate management automatically with ACME support

Architecture Overview

Mailcow orchestrates over a dozen Docker containers: Postfix handles SMTP relay and delivery, Dovecot provides IMAP and POP3 access, SOGo serves as the groupware frontend, Rspamd classifies spam, ClamAV scans attachments, and Nginx terminates TLS. A central MySQL database stores configuration, while Redis handles caching and rate limiting. The mailcow UI communicates with each service through APIs and configuration templating.

Self-Hosting & Configuration

  • Requires a Linux host with Docker and Docker Compose, a public IP, and valid DNS records (MX, SPF, DKIM, DMARC)
  • Run generate_config.sh to set hostname, timezone, and initial admin credentials
  • Access the admin UI at https://mail.yourdomain.tld after startup to add domains and mailboxes
  • Configure backup schedules and retention via the built-in backup script or external snapshot tools
  • Update by running ./update.sh which pulls new images and applies migrations automatically

Key Features

  • All-in-one deployment: SMTP, IMAP, webmail, groupware, antivirus, and spam filtering in one stack
  • Modern admin UI with per-domain and per-mailbox quotas, rate limiting, and logging
  • SOGo groupware with full ActiveSync support for mobile device synchronization
  • Built-in quarantine management for reviewing and releasing spam-flagged messages
  • ACME integration for automatic Let's Encrypt TLS certificate provisioning and renewal

Comparison with Similar Tools

  • Mail-in-a-Box — installs directly on the host OS; Mailcow uses Docker for easier isolation and updates
  • Mailu — similar Docker approach but lighter; Mailcow includes richer groupware via SOGo and a more feature-complete admin UI
  • iRedMail — script-based installer for bare metal; Mailcow's containerized design simplifies backup and migration
  • Docker Mailserver — minimalist container setup; Mailcow provides a web UI and integrated groupware out of the box
  • Stalwart — modern Rust-based server; Mailcow offers a more mature ecosystem with proven groupware integration

FAQ

Q: What DNS records do I need before installing? A: At minimum, an A record for your mail hostname, an MX record pointing to it, and SPF/DKIM/DMARC TXT records. Mailcow's documentation provides exact record templates.

Q: Can Mailcow handle multiple domains? A: Yes. You can add unlimited domains through the admin UI, each with independent mailboxes, aliases, and DKIM keys.

Q: How do I back up my mail data? A: Mailcow includes a backup script that snapshots the database, mail storage, and encryption keys. Schedule it via cron for automated backups.

Q: Does it support two-factor authentication? A: Yes. The admin panel and SOGo webmail both support TOTP-based two-factor authentication.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产