iRedMail邮件服务器搭建 新的尝试

 






更新系统

apt update -y  && apt upgrade -y && apt install -y curl wget sudo socat htop amavisd-new


安装 Docker 有了咱就就不装了

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh

curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 

chmod +x /usr/local/bin/docker-compose


创建所需目录

mkdir /iredmail

cd /iredmail
mkdir -p data/{backup-mysql,clamav,custom,imapsieve_copy,mailboxes,mlmmj,mlmmj-archive,mysql,sa_rules,ssl,postfix_queue}


配置文件

nano iredmail-docker.conf

HOSTNAME=mail.kjlion.ga
FIRST_MAIL_DOMAIN=kjlion.ga
FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=kejilionWWDS
MLMMJADMIN_API_TOKEN=KEJILION
ROUNDCUBE_DES_KEY=KEJILION123


DNS各种解析

A记录

MX记录

TXT记录1   参数 v=spf1 mx -all

TXT记录2   执行amavisd-new查看









Docker部署

docker run \
    -d \
    --name iredmail \
    --env-file /iredmail/iredmail-docker.conf \
    --hostname mail.kjlion.ga \
    -p 80:80 \
    -p 443:443 \
    -p 110:110 \
    -p 995:995 \
    -p 143:143 \
    -p 993:993 \
    -p 25:25 \
    -p 465:465 \
    -p 587:587 \
    -v /iredmail/data/backup-mysql:/var/vmail/backup/mysql \
    -v /iredmail/data/mailboxes:/var/vmail/vmail1 \
    -v /iredmail/data/mlmmj:/var/vmail/mlmmj \
    -v /iredmail/data/mlmmj-archive:/var/vmail/mlmmj-archive \
    -v /iredmail/data/imapsieve_copy:/var/vmail/imapsieve_copy \
    -v /iredmail/data/custom:/opt/iredmail/custom \
    -v /iredmail/data/ssl:/opt/iredmail/ssl \
    -v /iredmail/data/mysql:/var/lib/mysql \
    -v /iredmail/data/clamav:/var/lib/clamav \
    -v /iredmail/data/sa_rules:/var/lib/spamassassin \
    -v /iredmail/data/postfix_queue:/var/spool/postfix \
    iredmail/mariadb:stable




管理员网址

https://mail.kjlion.ga/iredadmin/

用户名

postmaster@kjlion.ga

密码

kejilionWWDS









评论

发表评论

此博客中的热门博文

科技lion官方一键脚本上线!VPS监控测试建站维护于一身的全能工具箱

CloudCone付费VPS分享 挺便宜的

新机到手我必做的10件事?让VPS飞速运行更安全!