parent
2e325953a4
commit
150ef7eab9
|
|
@ -1,38 +0,0 @@
|
|||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/bark"
|
||||
edit: true
|
||||
envKey: BARK_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 8080
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: WebUI 端口
|
||||
labelEn: WebUI port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: BARK_SERVER_DSN
|
||||
labelZh: 数据库链接
|
||||
labelEn: Database URL
|
||||
required: false
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: BARK_SERVER_BASIC_AUTH_USER
|
||||
labelZh: 用户名 (服务基础验证)
|
||||
labelEn: Basic Auth User
|
||||
required: false
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: BARK_SERVER_BASIC_AUTH_PASSWORD
|
||||
labelZh: 密码 (服务基础验证)
|
||||
labelEn: Basic Auth Password
|
||||
required: false
|
||||
type: text
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
# Docker Mailserver
|
||||
|
||||
docker-mailserver,简称 DMS,是一个可用于生产的全栈但简单的邮件服务器(SMTP、IMAP、LDAP、反垃圾邮件、反病毒等)。它只使用配置文件,不使用
|
||||
SQL 数据库。其形象以 "保持简单和版本化 "为口号。
|
||||
|
||||
## 前置准备
|
||||
|
||||
- `域名`
|
||||
- `DNS 解析`
|
||||
- `服务器`
|
||||
- `Docker` 服务
|
||||
- `推荐配置`: 1核2G内存 容器已启用交换功能
|
||||
- `最小配置`: 1核512M内存 (禁用 ClamAV 服务)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB |
|
|
@ -0,0 +1,136 @@
|
|||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/bark"
|
||||
edit: true
|
||||
envKey: MAILSERVER_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 25
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_SMTP
|
||||
labelZh: SMTP 端口 (保持默认)
|
||||
labelEn: SMTP Port (keep default)
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 143
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_IMAP
|
||||
labelZh: IMAP 端口 (保持默认)
|
||||
labelEn: IMAP Port (keep default)
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 465
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_SMTPS
|
||||
labelZh: SMTP SSL 端口 (保持默认)
|
||||
labelEn: SMTP SSL Port (keep default)
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 587
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_ESMTP
|
||||
labelZh: SMTP 提交端口 (保持默认)
|
||||
labelEn: SMTP Submission Port (keep default)
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 993
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_IPAPS
|
||||
labelZh: IMAP SSL 端口 (保持默认)
|
||||
labelEn: IMAP SSL Port (keep default)
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 0
|
||||
edit: true
|
||||
envKey: ENABLE_POP3
|
||||
labelZh: 启用 POP3
|
||||
labelEn: Enable POP3
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: 启用
|
||||
value: 1
|
||||
- label: 禁用
|
||||
value: 0
|
||||
- default: 110
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_POP
|
||||
labelZh: POP3 端口 (保持默认)
|
||||
labelEn: POP3 Port (keep default)
|
||||
required: false
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 995
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_POPS
|
||||
labelZh: POP3 SSL 端口 (保持默认)
|
||||
labelEn: POP3 SSL Port (keep default)
|
||||
required: false
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "postmaster@domain.com"
|
||||
edit: true
|
||||
envKey: POSTMASTER_ADDRESS
|
||||
labelZh: 管理员邮箱地址
|
||||
labelEn: Postmaster email address
|
||||
required: true
|
||||
type: text
|
||||
- default: 0
|
||||
edit: true
|
||||
envKey: ENABLE_AMAVIS
|
||||
labelZh: 内容过滤器 (Amavis支持)
|
||||
labelEn: Content filter (Amavis support)
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: 启用
|
||||
value: 1
|
||||
- label: 禁用
|
||||
value: 0
|
||||
- default: 0
|
||||
edit: true
|
||||
envKey: ENABLE_CLAMAV
|
||||
labelZh: 邮件病毒扫描 (ClamAV支持)
|
||||
labelEn: Mail virus scanning (ClamAV support)
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: 启用
|
||||
value: 1
|
||||
- label: 禁用
|
||||
value: 0
|
||||
- default: "manual"
|
||||
edit: true
|
||||
envKey: SSL_TYPE
|
||||
labelZh: SSL 证书类型
|
||||
labelEn: SSL certificate type
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: Let's Encrypt
|
||||
value: "letsencrypt"
|
||||
- label: 本地证书
|
||||
value: "manual"
|
||||
- label: 禁用 SSL
|
||||
value: ""
|
||||
- default: "public.crt"
|
||||
edit: true
|
||||
envKey: CERTS_PUBLIC_CRT
|
||||
labelZh: SSL Public 证书文件名
|
||||
labelEn: SSL Public certificate file name
|
||||
required: false
|
||||
type: text
|
||||
- default: "private.key"
|
||||
edit: true
|
||||
envKey: CERTS_PRIVATE_KEY
|
||||
labelZh: SSL Private 证书文件名
|
||||
labelEn: SSL Private certificate file name
|
||||
required: false
|
||||
type: text
|
||||
|
|
@ -21,18 +21,27 @@ services:
|
|||
- ${PANEL_APP_PORT_SMTPS}:465
|
||||
- ${PANEL_APP_PORT_ESMTP}:587
|
||||
- ${PANEL_APP_PORT_IPAPS}:993
|
||||
- ${PANEL_APP_PORT_POP:-}:110
|
||||
- ${PANEL_APP_PORT_POPS:-}:995
|
||||
env_file:
|
||||
- /etc/1panel/envs/global.env
|
||||
- /etc/1panel/envs/mailserver/mailserver.env
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${DOCKER_MAILSERVER_ROOT_PATH}/dms/mail-data/:/var/mail/
|
||||
- ${DOCKER_MAILSERVER_ROOT_PATH}/dms/mail-state/:/var/mail-state/
|
||||
- ${DOCKER_MAILSERVER_ROOT_PATH}/dms/mail-logs/:/var/log/mail/
|
||||
- ${DOCKER_MAILSERVER_ROOT_PATH}/dms/config/:/tmp/docker-mailserver/
|
||||
- ${MAILSERVER_ROOT_PATH}/dms/mail-data/:/var/mail/
|
||||
- ${MAILSERVER_ROOT_PATH}/dms/mail-state/:/var/mail-state/
|
||||
- ${MAILSERVER_ROOT_PATH}/dms/mail-logs/:/var/log/mail/
|
||||
- ${MAILSERVER_ROOT_PATH}/dms/config/:/tmp/docker-mailserver/
|
||||
- ${MAILSERVER_ROOT_PATH}/certs/:/tmp/dms/certs/
|
||||
- ${MAILSERVER_ROOT_PATH}/dms-backups/:/backup/
|
||||
environment:
|
||||
-
|
||||
- LOG_LEVEL=info
|
||||
- SUPERVISOR_LOGLEVEL=info
|
||||
- ACCOUNT_PROVISIONER=FILE
|
||||
- SSL_CERT_PATH=/tmp/dms/certs/${CERTS_PUBLIC_CRT:-public.crt}
|
||||
- SSL_KEY_PATH=/tmp/dms/certs/${CERTS_PRIVATE_KEY:-private.key}
|
||||
- SPOOF_PROTECTION=1
|
||||
healthcheck:
|
||||
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
|
||||
timeout: 3s
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
# Docker Mailserver
|
||||
|
||||
docker-mailserver,简称 DMS,是一个可用于生产的全栈但简单的邮件服务器(SMTP、IMAP、LDAP、反垃圾邮件、反病毒等)。它只使用配置文件,不使用
|
||||
SQL 数据库。其形象以 "保持简单和版本化 "为口号。
|
||||
|
||||
## 前置准备
|
||||
|
||||
- `域名`
|
||||
- `DNS 解析`
|
||||
- `服务器`
|
||||
- `Docker` 服务
|
||||
- `推荐配置`: 1核2G内存 容器已启用交换功能
|
||||
- `最小配置`: 1核512M内存 (禁用 ClamAV 服务)
|
||||
|
||||
### DNS 配置
|
||||
|
||||
假设你的域名是 `example.com`
|
||||
|
||||
邮件服务器的完全限定域名 (FQDN) 是 mail.example.com,你需要配置以下记录:
|
||||
|
||||
- `A` 记录: `mail.example.com` 指向你的服务器 IP 地址
|
||||
- MX 记录告诉每个人哪个 (DNS) 名称负责您域中的电子邮件。
|
||||
- `MX` 记录: `example.com` 指向 `mail.example.com`
|
||||
- A 记录告诉每个人 DNS 名称
|
||||
- `PTR` 记录(可选): 你的服务器 IP 地址指向 `mail.example.com`
|
||||
- PTR 记录是 A 记录的对应记录
|
||||
|
||||
当然,您也可以完全在 example.com 上配置,您需要更改您的 MX 记录:
|
||||
|
||||
- `MX` 记录: `example.com` 指向 `example.com`
|
||||
- `A` 记录: `example.com` 指向您的服务器 IP 地址
|
||||
|
||||
什么是 PTR 记录?[请参阅](https://en.wikipedia.org/wiki/Reverse_DNS_lookup)
|
||||
|
||||
此项服务在 DNS 解析商中可能存在收费,如您不想使用此项服务,可以不配置 PTR 记录。
|
||||
|
||||
### 证书准备
|
||||
|
||||
您需要一个有效的 SSL 证书,您可以使用 `Let's Encrypt` 或者其他证书颁发机构颁发的证书。
|
||||
|
||||
将证书文件放置在 持久化目录的 `certs` 目录下,文件名为 `public.crt` 和 `private.key`。
|
||||
|
||||
## 安装完成
|
||||
|
||||
首次启动至少要添加一个账户,您有两分钟的时间来执行此操作。请在容器终端中运行以下命令。
|
||||
|
||||
如果您错过了这个时间,您可以通过删除容器并重新启动来重新启动此过程。
|
||||
|
||||
> 创建 用户
|
||||
>
|
||||
> `setup email add <NEW ADDRESS>`
|
||||
|
||||
```sh
|
||||
setup email add user@example.com
|
||||
```
|
||||
|
||||
> 设置别名
|
||||
>
|
||||
> `setup alias add <ALIAS> <EMAIL>`
|
||||
|
||||
```sh
|
||||
setup alias add postmaster@example.com user@example.com
|
||||
```
|
||||
|
||||
> 更新证书
|
||||
|
||||
将证书文件放置在 持久化目录的 `certs` 目录下,文件名为 `public.crt` 和 `private.key`。
|
||||
|
||||
重启容器,即可更新证书。
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
name: Docker Mailserver
|
||||
name: Mailserver
|
||||
title: 是一个可用于生产的全栈但简单的邮件服务器
|
||||
description: 是一个可用于生产的全栈但简单的邮件服务器
|
||||
additionalProperties:
|
||||
key: docker-mailserver
|
||||
name: Docker Mailserver
|
||||
key: mailserver
|
||||
name: Mailserver
|
||||
tags:
|
||||
- Email
|
||||
- Local
|
||||
|
|
@ -12,6 +12,6 @@ additionalProperties:
|
|||
type: runtime
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
website: https://docker-mailserver.github.io/
|
||||
website: https://docker-mailserver.github.io/docker-mailserver/latest/
|
||||
github: https://github.com/docker-mailserver/docker-mailserver/
|
||||
document: https://docker-mailserver.github.io/
|
||||
document: https://docker-mailserver.github.io/docker-mailserver/latest/
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Loading…
Reference in New Issue