简单介绍下iredmail

 

#docker 的安装就不写了,太简单 yum 一下
#首先下载iredmail镜像
docker pull iredmail/mariadb:stable
#创建所需要的目录
cd /home
mkdir iredmail
cd iredmail
mkdir -p data/{backup-mysql,clamav,custom,imapsieve_copy,mailboxes,mlmmj,mlmmj-archive,mysql,sa_rules,ssl,postfix_queue}
#创建所需要的环境变量文件
echo HOSTNAME=mail.me.com >> iredmail-docker.conf
echo FIRST_MAIL_DOMAIN=me.com >> iredmail-docker.conf
echo FIRST_MAIL_DOMAIN_ADMIN_PASSWORD=my-secret-password >> iredmail-docker.conf
echo MLMMJADMIN_API_TOKEN=$(openssl rand -base64 32) >> iredmail-docker.conf
#echo $RANDOM | md5sum |cut -c 1-32  #token
echo ROUNDCUBE_DES_KEY=$(openssl rand -base64 24) >> iredmail-docker.conf
echo MYSQL_ROOT_PASSWORD=admin@123 >> iredmail-docker.conf
#启动容器
docker run -d --name iredmail --env-file iredmail-docker.conf \
    --hostname mail.me.com \
    --privileged \
    -p 80:80 \
    -p 443:443 \
    -p 110:110 \
    -p 995:995 \
    -p 143:143 \
    -p 993:993 \
    -p 1025:25 \
    -p 465:465 \
    -p 587:587 \
    -v /home/iredmail/data/backup-mysql:/var/vmail/backup/mysql \
    -v /home/iredmail/data/mailboxes:/var/vmail/vmail1 \
    -v /home/iredmail/data/mlmmj:/var/vmail/mlmmj \
    -v /home/iredmail/data/mlmmj-archive:/var/vmail/mlmmj-archive \
    -v /home/iredmail/data/imapsieve_copy:/var/vmail/imapsieve_copy \
    -v /home/iredmail/data/custom:/opt/iredmail/custom \
    -v /home/iredmail/data/ssl:/opt/iredmail/ssl \
    -v /home/iredmail/data/mysql:/var/lib/mysql \
    -v /home/iredmail/data/clamav:/var/lib/clamav \
    -v /home/iredmail/data/sa_rules:/var/lib/spamassassin \
    -v /home/iredmail/data/postfix_queue:/var/spool/postfix \
    iredmail/mariadb:stable
#等待几分钟即可
#修改hosts文件
echo 'x.x.x.x me.com' >> /etc/hosts
echo 'x.x.x.x mail.me.com' >> /etc/hosts
#管理的windows主机同样修改,不然无法连接应用
#增加 "x.x.x.x mail.me.com"
#登录系统
https://mail.me.com/mail
#用户名为:postmaster@me.com
#密码为:my-secret-password
#登录后需要修改一下管理员密码
#登录管理后台
https://mail.me.com/iredadmin
#用户名为:postmaster@me.com
#密码为:已修改
#基本完成

 修改DOMAIN

 添加测试用户,配置用户名、密码、存储空间等

邮件收发测试 

 

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐