首先,去 https://setup.mailu.io/ 获取你对应的docker-compose和 mailu.env
详细设置 在 https://mailu.io/1.7/compose/setup.html#tls-certificates
Step 1 – 下载配置文件
docker-compose.yml in a project directory. First create your project directory.
mkdir /mailu
Then download the project file. A side configuration file makes it easier to read and check the configuration variables generated by the wizard.
cd /mailu
wget http://setup.mailu.io/1.7/file/xxxxxxxxxxxxxxxxxxxxxxxxxxx/docker-compose.yml
wget http://setup.mailu.io/1.7/file/xxxxxxxxxxxxxxxxxxxxxxxxxxx/mailu.env
Step 2 – Review the configuration
Step 3 – Start the Compose project
up command using -p mailu flag for project name.
cd /mailu
docker-compose -p mailu up -d
Before you can use Mailu, you must create the primary administrator user account. This should be [email protected]. Use the following command, changing PASSWORD to your liking:
docker-compose -p mailu exec admin flask mailu admin admin 你的根域名 PASSWORD
Login to the admin interface to change the password for a safe one, at one of the hostnames 你的域名/admin. Also, choose the “Update password” option in the left menu.
关于汉化和证书优化:
1、将docker-compose.yml中的admin的镜像替换成 scjtqs/mailu-admin:latest 可以完成后台管理的汉化。 2、将docker-compose.yml中的front服务的镜像 替换成 scjtqs/mailu-nginx:latest 即可替换成dnspod接口的dns方式验证获取和更新证书。 当然,想要使用dnspod的dns验证,需要提供dnspod的一些账号信息。并将其挂载到front的容器中去 挂载路径:”./cetbot-dns-dnspod-credentials.ini:/etc/cetbot-dns-dnspod-credentials.ini” 例如在docker-compose.yml中:volumes: - "./mailu/certs:/certs" - "./mailu/overrides/nginx:/overrides" - "./cetbot-dns-dnspod-credentials.ini:/etc/cetbot-dns-dnspod-credentials.ini"cetbot-dns-dnspod-credentials.ini中的配置信息:
certbot_dns_dnspod:dns_dnspod_email = "DNSPod 账户的 Email" certbot_dns_dnspod:dns_dnspod_api_token = "api_id,api_token"